Object–relational database
This article needs additional citations for verification. (October 2008) |
An object–relational database (ORD), or object–relational database management system (ORDBMS), is a
An object–relational database can be said to provide a middle ground between relational databases and
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
The ORDBMS (like
In
public
, private
and protected
access modifiersHistory
Object–relational database management systems grew out of research that occurred in the early 1990s. That research extended existing relational database concepts by adding
In the mid-1990s, early commercial products appeared. These included Illustra
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
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[update] SQL databases allow the crafting of custom
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
- Document-oriented database
- SQL
- Comparison of object–relational database management systems
- Structured Type
- Object database
- Object–relational mapping
- Relational model
- Language Integrated Query
- Entity Framework
References
- ^ Data Integration Glossary (PDF), US: Department of Transportation, August 2001, archived from the original (PDF) on 2016-09-24, retrieved 2014-03-08
- ^ Frank Stajano (1995), A Gentle Introduction to Relational and Object Oriented Databases (PDF)
- ^ Naman Sogani (2015), Technical Paper Review (PDF), archived from the original (PDF) on 2016-03-04, retrieved 2015-10-05
- ^ Date, Christopher ‘Chris’ J; Darwen, Hugh, The Third Manifesto
- ISBN 1-55860-397-2.
- ^ There was, at the time, a dispute whether the term was coined by Michael Stonebraker of Illustra or Won Kim of UniSQL.
External links
- Savushkin, Sergey (2003), A Point of View on ORDBMS, archived from the original on 2012-03-01, retrieved 2012-07-21.
- JPA Performance Benchmark – comparison of Java JPA ORM Products (Hibernate, EclipseLink, OpenJPA, DataNucleus).
- PolePosition Benchmark – shows the performance trade-offs for solutions in the object–relational impedance mismatch context.