Introduction to Object Relational Data Model

Object-relational model tries to bring the main concepts from the OO domain to the relational model. The heart is the relational model with some extensions. Extensions through user-defined types. As the name suggests it is a combination of both the relational model and the object-oriented model. This model was built to fill the gap between object-oriented model and the relational model. We can have many advanced features like we can make complex data types according to our requirements using the existing data types. The problem with this model is that this can get complex and difficult to handle. So, proper understanding of this model is required. 

Object-relational database systems (ORDBSs) are generated from a combination of relational models and OO thinking. This object-relational approach both inherits existing RDBS technologies and provides support for object data management. Overall, most ORDBSs are mainly implemented within relational models but merely add partial support for simple object types.

The basic goal for the Object-relational database is to bridge the gap between relational databases and the object-oriented modeling techniques used in programming languages such as Java, C++, Visual Basic .NET or C#. However, a more popular alternative for achieving such a bridge is to use a standard relational database systems with some form of object-relational mapping (ORM) software. Whereas traditional RDBMS or SQL-DBMS products focused on the efficient management of data drawn from a limited set of datatypes (defined by the relevant language standards), an objectrelational DBMS allows software developers to integrate their own types and the methods that apply to them into the DBMS.

Perhaps the best hope for the immediate future of database objects is the Object-Relational model. A recent development, stimulated by the advent of the Object-oriented model, the Object-Relational model aims to address some of the problems of pure OO technology such as the poor support for ad hoc query languages and open database technology, and provide better support for existing relational products, by extending the Relational model to incorporate the key features of Object-orientation. The Object-Relational model also provides scope for those using existing Relational databases to migrate towards the incorporation of objects, and this perhaps is its key strength, in that it provides a path for the vast number of existing Relational database users gradually to migrate to an Object database platform, while maintaining the support of their Relational vendor.

The basic need of Object-relational database arises from the fact that both Relational and Object database have their individual advantages and drawbacks. The isomorphism of the relational database system with a mathematical relation allows it to exploit many useful techniques and theorems from set theory. But these types of databases are not useful when the matter comes to data complexity and mismatch between application and the DBMS. An object oriented database model allows containers like sets and lists, arbitrary user-defined datatypes as well as nested objects. This brings commonality between the application type systems and database type systems which removes any issue of impedance mismatch. But Object databases, unlike relational does not provide any mathematical base for their deep analysis.

Several major software companies including IBM, Informix, Microsoft, Oracle, and Sybase have all released object-relational versions of their products. These companies are promoting a new, extended version of relational database technology called object relational database management systems also known as ORDBMSs.

Several major software companies including IBM, Informix, Microsoft, Oracle, and Sybase have all released object-relational versions of their products. These companies are promoting a new, extended version of relational database technology called object relational database management systems also known as ORDBMSs.

Characteristics of an ORDBMSs

  • Base datatype extension,
  • Support complex objects,
  • Inheritance, and
  • Rule Systems.

Features of the OR Data Model

There is no accepted standard for the object-relational data model. However, a commonly used model is based on the elements supported by recent SQL standards. As you will see, these features violate many of the rules applied to relational databases: 

  • A relational database should have no data structures other than tables. An OR database, however, allows an attribute to support a reference to a row in another table. These references are the internal object identifiers used by OO databases described earlier in this chapter. An OR database can use the relational concept of a primary key-foreign key relationship to indicate entity relationships. However, it is not required; references to rows can be used instead. The advantage to using row references rather than the relational method is improved performance because the joins needed to follow data relationships are unnecessary. The major drawback to using row references is that the integrity of the relationships can't be verified by the DBMS; referential integrity requires both primary and foreign key values. 
  • A relational database is limited to one value at the intersection of a single column and row. An OR database, however, can store more than one value in the same location. The values can be an array of the same type of data, a row of data (much like a table within a table), an unordered collection of data of different data types, or an entire object. 
  • Classes are implemented as user-defined data types (UDTs). A new UDT may inherit from an existing UDT, although multiple inheritance is not allowed. A UDT will have default accessor and mutator methods as well as a default constructor, each of which can be overridden by a database programmer. There is nothing in the relational data model that prohibits UDTs. However, to be used in a relational database, a custom data type must hold only a single value. 
  • UDTs may have methods defined with them. Methods may be overloaded. Polymorphism is supported. Relational databases have no concept of storing procedures with data.

 Advantages of ORDBMSs

  • The main advantages of extending the relational data model come from reuse and sharing.
  • Reuse comes from the ability to extend the DBMS server to perform standard functionality centrally, rather than have it coded in each application.
  • If we can embed the functionality in the server, it saves having to define it in each application that needs it, and consequently allows the functionality to be shared by all applications. 
  • The Object Relational data model allows its users to inherit objects, tables etc. so that they can extend their functionality. Inherited objects contains new attributes as well as the attributes that were inherited.
  • Complex data types can be formed using existing data types. This is useful in Object relational data model as complex data types allow better manipulation of the data.
  • The functionality of the system can be extended in Object relational data model. This can be achieved using complex data types as well as advanced concepts of object oriented model such as inheritance.
     

Disadvantages of ORDBMSs

  • The ORDBMSs approach has the obvious disadvantage of complexity and associated increased costs.
  • There are proponents of the relational approach that believe the essential simplicity and purity of the relational model are lost with these types of extension.
  • There are also those that believe that the RDMSs is being extended for what will be a minority of applications that do not achieve optimal performance with current relational technology.
  • Instead of discussing object models, terms like ‘userdefined data types’ are used. The terminology of object-orientation abounds with terms like ‘abstract types’. ‘class hierarchies’, and ‘object models’. However, ORDBMSs vendors are attempting to portray object models as extensions to the relational model with some additional complexities.
  • This potentially misses the point of object-orientation, highlighting the large semantic gap between these two technologies. 

Key Points

An ORDBMS supports an extended form of SQL called SQL3 that is still in the development stages. The extensions are needed because ORDBMSs have to support ADT's.

The ORDBMS has the relational model in it because the data is stored in the form of tables having rows and columns and SQL is used as the query language and the result of a query is also table or tuples (rows).

Tags