Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Object–relational database
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
{{Short description|Database management system}} {{More citations needed|date=October 2008}} An '''object–relational database''' ('''ORD'''), or '''object–relational database management system''' ('''ORDBMS'''), is a [[database management system]] (DBMS) similar to a [[relational database]], but with an [[Object database|object-oriented database]] model: [[Object (computer science)|objects]], [[Class (computer programming)|classes]] and [[Inheritance (object-oriented programming)|inheritance]] are directly supported in [[database schema]]s and in the [[query language]]. Also, as with pure relational systems, it supports extension of the [[data model]] with custom [[data type]]s and [[Method (computer programming)|methods]]. [[File:Object-Oriented Model.svg|thumb|320px|Example of an object-oriented database model<ref name="USDT01">{{Citation |url=http://isddc.dot.gov/OLPFiles/FHWA/010394.pdf |title=Data Integration Glossary |place=US |publisher=Department of Transportation |date=August 2001 |access-date=2014-03-08 |archive-url=https://web.archive.org/web/20160924180745/http://isddc.dot.gov/OLPFiles/FHWA/010394.pdf |archive-date=2016-09-24 |url-status=dead}}</ref>]] An object–relational database can be said to provide a middle ground between relational databases and [[Object database|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]] language, with an application programming interface [[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.<ref name="fstajano">{{Citation |url=https://www.cl.cam.ac.uk/~fms27/db/tr-98-2.pdf |title=A Gentle Introduction to Relational and Object Oriented Databases |author=Frank Stajano |year=1995}}</ref><ref name="namansg">{{Citation |url=http://home.iitk.ac.in/~namansg/cs300/3C.pdf |title=Technical Paper Review |author=Naman Sogani |year=2015 |access-date=2015-10-05 |archive-url=https://web.archive.org/web/20160304190615/http://home.iitk.ac.in/~namansg/cs300/3C.pdf |archive-date=2016-03-04 |url-status=dead}}</ref> 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 (programming language)|Java]], [[C++]], [[Visual Basic (.NET)]] or [[C Sharp (programming language)|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]] 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 object]]s. 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<ref>{{Citation |last1=Date |first1=Christopher ‘Chris’ J. |last2=Darwen |first2=Hugh |author2-link=Hugh Darwen |title=The Third Manifesto}}</ref>{{Rp |needed=yes|date=March 2012}} In [[object-oriented programming]] (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 (computer science)|polymorphism]] principle, which briefly is defined as "one interface, many implementations". Other OOP principles, [[Inheritance (object-oriented programming)|inheritance]] and [[Encapsulation (object-oriented programming)|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 <code>public</code>, <code>private</code> and <code>protected</code> [[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 (computer science)|object]] concepts. The researchers aimed to retain a declarative query-language based on [[Predicate logic|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<ref name="stonebraker">Stonebraker,. Michael with Moore, Dorothy. ''Object–Relational DBMSs: The Next Great Wave''. Morgan Kaufmann Publishers, 1996. {{ISBN|1-55860-397-2}}.</ref> (Illustra Information Systems, acquired by [[IBM Informix#1980: Early history|Informix Software]], which was in turn acquired by International Business Machines ([[IBM]]), Omniscience (Omniscience Corporation, acquired by [[Oracle Corporation]] 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.<ref name="term">There was, at the time, a dispute whether the term was coined by [[Michael Stonebraker]] of Illustra or Won Kim of UniSQL.</ref> Many of the ideas of early object–relational database efforts have largely become incorporated into [[SQL|SQL:1999]] via [[structured type]]s. 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]], 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: <syntaxhighlight lang="mysql"> 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()) </syntaxhighlight> Most {{As of|2007|alt=current}} SQL databases allow the crafting of custom [[function (computer science)|function]]s, which would allow the query to appear as: <syntaxhighlight lang="mysql"> SELECT Formal(C.Id) FROM Customers C WHERE Birthday(C.DOB) = Today() </syntaxhighlight> <!-- NOTE: Rather than fix this, only to have it unfixed ''yet'' again, let it stand as an example. The first SQL SELECT statement quoted above is both non-standard, and wrong. InitCap() isn't SQL-92 (or SQL-3), and the query's logic misses Customers born on a leap-day (171,000 United States citizens) for three years out of four. --> In an object–relational database, one might see something like this, with user-defined data-types and expressions such as <code>BirthDay()</code>: <syntaxhighlight lang="postgres"> 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; </syntaxhighlight> 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": <syntaxhighlight lang="mysql"> 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" </syntaxhighlight> The same query in an object–relational database appears more simply: <syntaxhighlight lang="postgres"> SELECT Formal( C.Name ) FROM Customers C WHERE C.address.city="New York" -- the linkage is 'understood' by the ORDB </syntaxhighlight> == See also == * [[Document-oriented database]] * [[SQL]] * [[Comparison of object–relational database management systems]] * [[Structured type|Structured Type]] * [[Object database]] * [[Object–relational mapping]] * [[Relational model]] * [[Language Integrated Query]] * [[Entity Framework]] == References == {{Reflist}} == External links == {{Commons category|Object-Oriented models}} * {{Citation |url=http://savtechno.com/articles/ViewOfORDBMS.html |title=A Point of View on ORDBMS |first1=Sergey |last1=Savushkin |year=2003 |access-date=2012-07-21 |archive-url=https://web.archive.org/web/20120301020947/http://savtechno.com/articles/ViewOfORDBMS.html |archive-date=2012-03-01 |url-status=dead}}. * {{Citation |url=http://www.jpab.org/ |title=JPA Performance Benchmark}} – comparison of Java JPA ORM Products (Hibernate, EclipseLink, OpenJPA, DataNucleus). * {{Citation |url=http://www.polepos.org/ |title=PolePosition Benchmark}} – shows the performance trade-offs for solutions in the [[object–relational impedance mismatch]] context. {{Database models}} {{Databases}} {{Authority control}} {{DEFAULTSORT:Object-Relational Database}} [[Category:Database management systems]]
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)
Pages transcluded onto the current version of this page
(
help
)
:
Template:As of
(
edit
)
Template:Authority control
(
edit
)
Template:Citation
(
edit
)
Template:Commons category
(
edit
)
Template:Database models
(
edit
)
Template:Databases
(
edit
)
Template:ISBN
(
edit
)
Template:More citations needed
(
edit
)
Template:Reflist
(
edit
)
Template:Rp
(
edit
)
Template:Short description
(
edit
)