Object Tables   «Prev  Next»

Lesson 9

Object Relational Approach to Oracle Conclusion

This module discussed the object-relational approach using Oracle. You have learned about object details that help you build the program logic.
Now that you have completed this module, you should be able to:
  1. Understand the reasons to use Oracle objects versus relational tables
  2. Understand the different terms for Oracle objects
  3. Describe the SQL techniques that allow you to query object tables
  4. Determine when to use collections and variable size arrays
  5. Determine when to use nested tables in querying
  6. Write SQL to query object tables
What is Oracle's approach to object-relational databases?
Oracle Corporation, a prominent figure in the world of relational database management systems, has developed an approach to Object-Relational Databases (ORDBMS) that melds the capabilities of both relational databases and object-oriented programming.
Oracle's Object-Relational Database Management System extends the functionality of its robust Relational Database Management System (RDBMS) with object-oriented features that facilitate complex data representation and operations. It allows developers to handle complex data types, such as multimedia applications or geographic information systems, more efficiently.
Key features of Oracle's ORDBMS approach include:
  1. Abstract Data Types (ADTs): Oracle enables users to define their own data types, or ADTs, which can be used to create column values in a table. ADTs can contain many elements, and these elements can be primitive data types or other ADTs. This allows for complex hierarchical structures and relationships between data.
  2. Object Identifiers: Oracle's ORDBMS assigns a unique system-generated identifier to each object, which is similar to the primary key in a relational table. This Object Identifier (OID) can be referenced in other tables, facilitating object relationships and data integrity.
  3. Object Views: Oracle allows existing relational data to be accessed as objects using Object Views. This feature enables users to present a relational schema as an object schema, providing a way to move to an ORDBMS without changing existing application code.
  4. Inheritance: Oracle's ORDBMS supports type inheritance, a key feature of object-oriented programming. This allows a subtype to inherit characteristics from a supertype, providing for code reusability and data model hierarchy.
  5. Methods: In Oracle, ADTs can include defined operations, or methods. These methods can be used to manipulate the data encapsulated in the object and to enforce business rules related to that data.
  6. Collections (Varrays and Nested Tables): Oracle's ORDBMS supports collections which are ordered groupings of data. Varrays are variable-sized arrays, and nested tables allow users to create tables that are nested within other tables, both features facilitate complex data structures.

By combining object-oriented and relational concepts, Oracle's approach to ORDBMS enables a more sophisticated data modeling structure, enhancing data encapsulation, inheritance, and polymorphism. This approach leverages the benefits of relational databases, such as robustness, scalability, and data integrity, while at the same time allowing for the complexity and flexibility offered by object-oriented models.

Glossary

In this module, you were introduced to the following glossary terms:
  1. Aggregation: Aggregation occurs where one object is composed, at least in part, of other objects; you may call it a part-of relationship. A tail is a part-of a dog or a piston is a part-of an engine. This concept is implemented within collections.
  2. Application Programming Interface: An API is designed to allow quick and easy integration of different programming languages like C, Java, and so on, with the Oracle 8i database and its development environment.
  3. Composition: A composition embodies the concept of a column within a table is a combination of several composite columns.
    This concept cannot be handled within a relational database. In Oracle8i, it is possible with object types and collections such as varrays and nested table.
  4. Dot notation: To reference individual fields within the record, use the dot notation. A dot (.) serves as the selector for the individual field name.
  5. Encapsulation: Encapsulation is the concept of information hiding. Encapsulation asserts that you can only "get at" the contents of the object using predefined functions. This allows the programmer to retain control of the data and helps reduce the impact on changes to the schema.
  6. Enumeration: An enumeration is a data type which can be given a finite (usually small) set of named values. Therefore, enumerations are useful for representing real world values that naturally have a finite set of values, each of which has a meaningful name.
  7. Homogenous: Homogenous means elements of the same data type.
  8. Inheritance: Inheritance is a technique used within object-oriented development to create objects that contain generalized attributes and behavior for groups of related objects. The more general objects created using inheritance are referred to as super-types. The objects that inherit from the super-types (that is, they are more specific cases of the super-type) are called subtypes.
  9. Object-relational: The object-relational model allows users to define object types, specifying both the structure of the data and the methods of operating on the data, and to use these datatypes within the relational model.
  10. Persistent object: An object that is stored or saved. Within Oracle, an object is stored within the database.
  11. REPLACE: CREATE OR REPLACE is the syntax for creating procedures, functions, or object types. It means that if the object type / procedure already exists within the database, the DDL statement should replace the existing object type / procedure.
  12. Sparse: Sparse means lesser number of elements or records.
  13. Transient object: A transient object is an instance of an object type. It may have an object identifier, and it has a lifetime which is determined by the application when the instance is created. The application can also delete a transient object at any time. Transient objects are often created by the application to store temporary values for computation. Transient objects cannot be converted to persistent objects. Their role is fixed at the time they are instantiated.

Querying Object Tables - Quiz

Click the Quiz link below to take a multiple-choice quiz about the material we have covered in this module.
Querying Object Tables - Quiz
In the next module, we will go into more detail on querying related object tables.

Object Oriented Databases