An object–relational database (ORD), or object–relational database management system (ORDBMS), is a
database management system
In computing, a database is an organized collection of data or a type of data store based on the use of a database management system (DBMS), the software that interacts with end users, applications, and the database itself to capture and an ...
(DBMS) similar to a
relational database
A relational database (RDB) is a database based on the relational model of data, as proposed by E. F. Codd in 1970.
A Relational Database Management System (RDBMS) is a type of database management system that stores data in a structured for ...
, but with an
object-oriented database model:
objects,
classes and
inheritance
Inheritance is the practice of receiving private property, titles, debts, entitlements, privileges, rights, and obligations upon the death of an individual. The rules of inheritance differ among societies and have changed over time. Offi ...
are directly supported in
database schema
The database schema is the structure of a database described in a formal language supported typically by a relational database management system (RDBMS). The term "wikt:schema, schema" refers to the organization of data as a blueprint of how the ...
s and in the
query language. Also, as with pure relational systems, it supports extension of the
data model with custom
data type
In computer science and computer programming, a data type (or simply type) is a collection or grouping of data values, usually specified by a set of possible values, a set of allowed operations on these values, and/or a representation of these ...
s and
methods.

An object–relational database can be said to provide a middle ground between relational databases and
object-oriented databases. In object–relational databases, the approach is essentially that of relational databases: the data resides in the database and is manipulated collectively with queries in a query language; at the other extreme are OODBMSes in which the database is essentially a persistent object store for software written in an
object-oriented programming
Object-oriented programming (OOP) is a programming paradigm based on the concept of '' objects''. Objects can contain data (called fields, attributes or properties) and have actions they can perform (called procedures or methods and impl ...
language, with an application programming interface
API
An application programming interface (API) is a connection between computers or between computer programs. It is a type of software interface, offering a service to other pieces of software. A document or standard that describes how to build ...
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.
The basic goal for the object–relational database is to bridge the gap between relational databases and the
object-oriented modeling techniques used in programming languages such as
Java
Java is one of the Greater Sunda Islands in Indonesia. It is bordered by the Indian Ocean to the south and the Java Sea (a part of Pacific Ocean) to the north. With a population of 156.9 million people (including Madura) in mid 2024, proje ...
,
C++,
Visual Basic (.NET) or
C#. However, a more popular alternative for achieving such a bridge is to use a standard relational database systems with some form of
object–relational mapping (ORM) software. Whereas traditional
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
ODBMS or
OODBMS) is integrated with an
object-oriented programming
Object-oriented programming (OOP) is a programming paradigm based on the concept of '' objects''. Objects can contain data (called fields, attributes or properties) and have actions they can perform (called procedures or methods and impl ...
language. The characteristic properties of ORDBMS are 1) complex data, 2) type inheritance, and 3) object behavior. ''Complex data'' creation in most SQL ORDBMSs is based on preliminary schema definition via the
user-defined type (UDT). Hierarchy within structured complex data offers an added 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
In
object-oriented programming
Object-oriented programming (OOP) is a programming paradigm based on the concept of '' objects''. Objects can contain data (called fields, attributes or properties) and have actions they can perform (called procedures or methods and impl ...
(OOP), object behavior is described through the methods (object functions). The methods denoted by one name are distinguished by the type of their parameters and type of objects for which they attached (
method signature). The OOP languages call this the
polymorphism principle, which briefly is defined as "one interface, many implementations". Other OOP principles,
inheritance
Inheritance is the practice of receiving private property, titles, debts, entitlements, privileges, rights, and obligations upon the death of an individual. The rules of inheritance differ among societies and have changed over time. Offi ...
and
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
object concepts. The researchers aimed to retain a declarative query-language based on
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
[Stonebraker,. Michael with Moore, Dorothy. ''Object–Relational DBMSs: The Next Great Wave''. Morgan Kaufmann Publishers, 1996. .] (Illustra Information Systems, acquired by
Informix Software, which was in turn acquired by International Business Machines (
IBM
International Business Machines Corporation (using the trademark IBM), nicknamed Big Blue, is an American Multinational corporation, multinational technology company headquartered in Armonk, New York, and present in over 175 countries. It is ...
), Omniscience (Omniscience Corporation, acquired by
Oracle Corporation
Oracle Corporation is an American Multinational corporation, multinational computer technology company headquartered in Austin, Texas. Co-founded in 1977 in Santa Clara, California, by Larry Ellison, who remains executive chairman, Oracle was ...
and became the original Oracle Lite), and UniSQL (UniSQL, Inc., acquired by
KCOM Group). 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++ software development kit (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.
[There was, at the time, a dispute whether the term was coined by Michael Stonebraker of Illustra or Won Kim of UniSQL.]
Many of the ideas of early object–relational database efforts have largely become incorporated into
SQL:1999 via
structured types. 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 Db2,
Oracle Database
Oracle Database (commonly referred to as Oracle DBMS, Oracle Autonomous Database, or simply as Oracle) is a proprietary multi-model database management system produced and marketed by Oracle Corporation.
It is a database commonly used for ru ...
, and
Microsoft SQL Server
Microsoft SQL Server is a proprietary relational database management system developed by Microsoft using Structured Query Language (SQL, often pronounced "sequel"). As a database server, it is a software product with the primary function of ...
, 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 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
*
Document-oriented database
A document-oriented database, or document store, is a computer program and data storage system designed for storing, retrieving and managing document-oriented information, also known as semi-structured data.
Document-oriented databases are one ...
*
SQL
*
Comparison of object–relational database management systems
*
Structured Type
*
Object database
*
Object–relational mapping
*
Relational model
The relational model (RM) is an approach to managing data using a structure and language consistent with first-order predicate logic, first described in 1969 by English computer scientist Edgar F. Codd, where all data are represented in terms of t ...
*
Language Integrated Query
*
Entity Framework
References
External links
* .
* – comparison of Java JPA ORM Products (Hibernate, EclipseLink, OpenJPA, DataNucleus).
* – shows the performance trade-offs for solutions in the
object–relational impedance mismatch context.
{{DEFAULTSORT:Object-Relational Database
Database management systems