Encyclopedia > Object-relational database

  Article Content

Object-relational database

And Object-Relational database management systems (ORDBMS) are an evolutionary extension of relational DBMS products. The term is also sometimes used to describe external software products running over traditional DBMSs to provide similar features. These systems are more correctly referred to as object-relational mapping.

Whereas RDBMS -- or SQL-DBMS -- products focussed 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 goal of ORDBMS technology is to allow developers to raise the level of abstraction at which they view the problem domain.

In an RDBMS, it would be fairly common to see SQL like this:

   CREATE TABLE Customers  (
       Id          CHAR(12)    NOT NULL PRIMARY KEY,
       Surname     VARCHAR(32) NOT NULL,
       FirstName   VARCHAR(32) NOT NULL,
       DateofBirth DATE        NOT NULL
    );

     SELECT InitCap(C.Surname) || ', ' || InitCap(C.FirstName)
       FROM Customers C
      WHERE -- Some horribly complex logic

In an Object-Relational DBMS, you would see something like this:

    CREATE TABLE Customers (
      Id           Cust_Id     NOT NULL  PRIMARY KEY,
      Name         PersonName  NOT NULL,
      DOB          DATE        NOT NULL
    );

    SELECT Formal( C.Name )
      FROM Customers C
     WHERE BirthDay ( C.DOB ) = TODAY;

Another advantage to the O-R model is the ability of the database to understand relationships between data and make it easy to collect related records. In an address book type application an additional table would be added to the ones above to hold zero or more addresses for each user. 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, Addresses A
      WHERE A.Cust_Id=C.Id -- the join
        AND C.city="New York"

The same query in an O-R system is much simpler:

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

Many of the concepts in ORDBMS's were pioneered in the Postgres database, which eventually led to the open source PostgreSQL which is available today and gaining mind share. The first of the major database vendors to add O-R support to their products was Informix, which they did by purchasing the Illustra[?] O-R database written by a number of ex-Postgres team members.

Most modern DBMS products – IBM's DB2, Oracle, and Microsoft SQL Server – make claims to support this technology and do so with varying degrees of succcess.



All Wikipedia text is available under the terms of the GNU Free Documentation License

 
  Search Encyclopedia

Search over one million articles, find something about almost anything!
 
 
  
  Featured Article
Urethra

... penis and the scrotum. Infection of the urethra is urethritis, said to be more common in females than males. Urethritis is a common cause of dysuria[?] (pain whe ...

 
 
 
This page was created in 67.7 ms