Skip to content

1. Introduction to OO Databases

1. Introduction

The Relational Databases arise from the relational model as a system that faithfully represents reality, with great solidity due to the underlying relational logic. Said model represents the static perspective of the modeling of the application, and in it all the data is broken down to atomic levels, since as we remember, neither multivalued nor composite values are allowed.

This model has suffered from the object-relational gap, in which programming languages evolved structures by adopting the object-oriented methodology. This causes us to design the database on the one hand, following the relational model, and we also need to design the application classes on the other hand. Said designs, which do not usually coincide, can be fitted with the ORM tools studied in the previous unit to mitigate the object-relational mismatch.

From this gap arises the need to add a more object-oriented design within the database itself. If we analyze an object-oriented scheme and try to apply normalization theory, we will find that the objects are decomposed into several entities, which causes many tables to appear.

This high number of tables causes, as a consequence, an increase in the references between them, considerably increasing the relationships between them and, therefore, a greater number of restrictions that you control (FOREIGN KEY), which means an increase in the number of checks to be carried out by the DBMS.

Thus, in the OO BD (Object-Oriented Database) it allows a definition of complex data types compared to the simple ones that the RDBMS incorporates, allowing the definition of structured and even multivalued types. With all this, the OO BD should simply allow design through objects (similar to the UML) indicating the objects that participate, indicating their attributes and methods, and the relationships that affect them, and obviously, inheritances.

These OO DB's have not yet taken off, and some solutions that commercial solutions implement is to provide the relational database system with the semantic capabilities of object orientation, thus appearing the BDOR (Object-Relational Databases).

2. Object Relational DB's

The ANSI SQL1999 standard (SQL99 and later SQL2003), as a continuation of SQL92 in which the characteristics of the relational model are adapted, allows adding object-oriented characteristics to the Relational Databases. This allows robust DBMS to have adopted and implemented those features required. Among these features are:

  • Definition of new types of data by the user.
  • Adaptation to accommodate large binary data types such as images and documents.
  • Ability to store compound elements as arrays.
  • Directly store references to other tables.
  • Defining objects and inheritance.
  • Definition of functions that handle the previously defined structures