Object–relational database

Source: Wikipedia, the free encyclopedia.

An object–relational database (ORD), or object–relational database management system (ORDBMS), is a

methods
.

Example of an object-oriented database model[1]

An object–relational database can be said to provide a middle ground between relational databases and

object-oriented programming language, with a programming API
for storing and retrieving objects, and little or no specific support for querying.

Overview

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 optimal for certain kinds of applications. 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 do not provide any mathematical base for their deep analysis.[2][3]

The basic goal for the object–relational database is to bridge the gap between relational databases and the

RDBMS
or SQL-DBMS products focused on the efficient management of data drawn from a limited set of data-types (defined by the relevant language standards), an object–relational DBMS allows software developers to integrate their own types and the methods that apply to them into the DBMS.

The ORDBMS (like

user-defined type (UDT). Hierarchy within structured complex data offers an additional property, type inheritance. That is, a structured type can have subtypes that reuse all of its attributes and contain additional attributes specific to the subtype. Another advantage, the object behavior, is related with access to the program objects. Such program objects must be storable and transportable for database processing, therefore they usually are named as persistent objects. Inside a database, all the relations with a persistent program object are relations with its object identifier (OID). All of these points can be addressed in a proper relational system, although the SQL standard and its implementations impose arbitrary restrictions and additional complexity[4][page needed
]

In

encapsulation, are related both to methods and attributes. Method inheritance is included in type inheritance. Encapsulation in OOP is a visibility degree declared, for example, through the public, private and protected access modifiers
.

History

Object–relational database management systems grew out of research that occurred in the early 1990s. That research extended existing relational database concepts by adding

predicate calculus as a central component of the architecture. Probably the most notable research project, Postgres (UC Berkeley), spawned two products tracing their lineage to that research: Illustra and PostgreSQL
.

In the mid-1990s, early commercial products appeared. These included Illustra

IBM), Omniscience (Omniscience Corporation, acquired by Oracle Corporation and became the original Oracle Lite), and UniSQL (UniSQL, Inc., acquired by KCOMS). Ukrainian developer Ruslan Zasukhin, founder of Paradigma Software, Inc., developed and shipped the first version of Valentina database in the mid-1990s as a C++ SDK
. By the next decade, PostgreSQL had become a commercially viable database, and is the basis for several current products that maintain its ORDBMS features.

Computer scientists came to refer to these products as "object–relational database management systems" or ORDBMSs.[6]

Many of the ideas of early object–relational database efforts have largely become incorporated into

Oracle database, and Microsoft SQL Server
, make claims to support this technology and do so with varying degrees of success.

Comparison to RDBMS

An RDBMS might commonly involve SQL statements such as these:

   CREATE TABLE Customers  (
       Id          CHAR(12)    NOT NULL PRIMARY KEY,
       Surname     VARCHAR(32) NOT NULL,
       FirstName   VARCHAR(32) NOT NULL,
       DOB         DATE        NOT NULL   # DOB: Date of Birth
    );
    SELECT InitCap(C.Surname) || ', ' || InitCap(C.FirstName)
      FROM Customers C
     WHERE Month(C.DOB) = Month(getdate())
       AND Day(C.DOB) = Day(getdate())

Most current SQL databases allow the crafting of custom

functions
, which would allow the query to appear as:

    SELECT Formal(C.Id)
      FROM Customers C
     WHERE Birthday(C.DOB) = Today()

In an object–relational database, one might see something like this, with user-defined data-types and expressions such as BirthDay():

    CREATE TABLE Customers (
      Id           Cust_Id     NOT NULL  PRIMARY KEY,
      Name         PersonName  NOT NULL,
      DOB          DATE        NOT NULL
    );
    SELECT Formal( C.Id )
      FROM Customers C
     WHERE BirthDay ( C.DOB ) = TODAY;

The object–relational model can offer another advantage in that the database can make use of the relationships between data to easily collect related records. In an address book application, an additional table would be added to the ones above to hold zero or more addresses for each customer. Using a traditional RDBMS, collecting information for both the user and their address requires a "join":

     SELECT InitCap(C.Surname) || ', ' || InitCap(C.FirstName), A.city
       FROM Customers C JOIN Addresses A ON A.Cust_Id=C.Id -- the join
      WHERE A.city="New York"

The same query in an object–relational database appears more simply:

    SELECT Formal( C.Name )
      FROM Customers C
     WHERE C.address.city="New York" -- the linkage is 'understood' by the ORDB

See also

References

  1. ^ Data Integration Glossary (PDF), US: Department of Transportation, August 2001, archived from the original (PDF) on 2016-09-24, retrieved 2014-03-08
  2. ^ Frank Stajano (1995), A Gentle Introduction to Relational and Object Oriented Databases (PDF)
  3. ^ Naman Sogani (2015), Technical Paper Review (PDF), archived from the original (PDF) on 2016-03-04, retrieved 2015-10-05
  4. ^ Date, Christopher ‘Chris’ J; Darwen, Hugh, The Third Manifesto
  5. .
  6. ^ There was, at the time, a dispute whether the term was coined by Michael Stonebraker of Illustra or Won Kim of UniSQL.

External links