Object-relational database
From Wikipedia, the free encyclopedia
Database models |
---|
Common models |
Other models |
Associative |
An object-relational database (ORD) or object-relational database management system (ORDBMS) is a relational database management system that allows developers to integrate the database with their own custom data types and methods. The term object-relational database is 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 systems.
Whereas 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 goal of ORDBMS technology is to allow developers to raise the level of abstraction at which they view the problem domain.
Contents |
[edit] Comparison to RDBMS
In an RDBMS, it would be fairly common to see SQL statements like this:
CREATE TABLE Customers ( Id CHAR(12) NOT NULL PRIMARY KEY, Surname VARCHAR(32) NOT NULL, FirstName VARCHAR(32) NOT NULL, DOB DATE NOT NULL );
SELECT InitCap(Surname) || ', ' || InitCap(FirstName) FROM Customers WHERE Month(DOB) = Month(getdate()) AND Day(DOB) = Day(getdate())
Most current SQL databases allow the creation of custom functions, which would allow the query to be expressed as:
SELECT Formal(Id) FROM Customers WHERE Birthday(Id) = Today()
In an object-relational database, one might see something like this, where the data types and expressions such as BirthDay() are user-defined.
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 object-relational model is 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 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 A.city="New York"
The same query in an object-relational database is much simpler:
SELECT Formal( C.Name ) FROM Customers C WHERE C.address.city="New York" -- the linkage is 'understood' by the ORDB
[edit] 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 object concepts. The idea was to retain a declarative query language based on predicate calculus as a central component of the architecture. Probably the most notable research project was Postgres (UC Berkeley). Two products trace their lineage to that research: Illustra and PostgreSQL.
In the mid-1990s, early commercial products appeared. These included Illustra[1] (Illustra Information Systems, acquired by Informix which was in turn acquired by IBM), Omniscience (Omniscience Corporation, acquired by Oracle Corporation and became the original Oracle Lite), and UniSQL (UniSQL, Inc., acquired by KCOMS). These products came to be referred to as "object-relational database management systems" or ORDBMSs.[2] Ukranian developer Ruslan Zasukhin developed and shipped the first version of Valentina in the mid-1990s as a C++ database SDK.
Many of the ideas of early object-relational database efforts have largely been added to SQL:1999. In fact, any product that adheres to the object-oriented aspects of SQL:1999 could be described as an object-relational database management product. For example, IBM's DB2, Oracle database, and Microsoft SQL Server, make claims to support this technology and do so with varying degrees of success.
[edit] References and notes
- ^ Stonebraker, Michael with Moore, Dorothy. Object-Relational DBMSs: The Next Great Wave. Morgan Kaufmann Publishers, 1996. ISBN 1-55860-397-2.
- ^ There was, at the time, some dispute whether the term was coined by Michael Stonebraker of Illustra or Won Kim of UniSQL.
[edit] See also
- Database
- List of object-relational database management systems
- Object database
- Object-relational mapping
- Relational model
- SQL
[edit] External links
- An interesting discussion about object-oriented vs. relational databases
- PolePosition Benchmark -- shows the performance trade-offs for solutions in the object-relational impedance mismatch context.
- RDBMS != Object Store -- explanation about differences of relational databases and object stores.