Movatterモバイル変換


[0]ホーム

URL:


Jump to content
WikipediaThe Free Encyclopedia
Search

Object–relational database

From Wikipedia, the free encyclopedia
Database management system
icon
This articleneeds additional citations forverification. Please helpimprove this article byadding citations to reliable sources. Unsourced material may be challenged and removed.
Find sources: "Object–relational database" – news ·newspapers ·books ·scholar ·JSTOR
(October 2008) (Learn how and when to remove this message)

Anobject–relational database (ORD), orobject–relational database management system (ORDBMS), is adatabase management system (DBMS) similar to arelational database, but with anobject-oriented database model:objects,classes andinheritance are directly supported indatabase schemas and in thequery language. Also, as with pure relational systems, it supports extension of thedata model with customdata types andmethods.

Example of an object-oriented database model[1]

An object–relational database can be said to provide a middle ground between relational databases andobject-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 anobject-oriented programming language, with an application programming interfaceAPI for storing and retrieving objects, and little or no specific support for querying.

Overview

[edit]

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 theobject-oriented modeling techniques used in programming languages such asJava,C++,Visual Basic (.NET) orC#. However, a more popular alternative for achieving such a bridge is to use a standard relational database systems with some form ofobject–relational mapping (ORM) software. Whereas traditionalRDBMS 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 (likeODBMS orOODBMS) is integrated with anobject-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 theuser-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, theobject 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 aspersistent objects. Inside a database, all the relations with a persistent program object are relations with itsobject 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[4][page needed]

Inobject-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 thepolymorphism principle, which briefly is defined as "one interface, many implementations". Other OOP principles,inheritance andencapsulation, 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 thepublic,private andprotectedaccess modifiers.

History

[edit]

Object–relational database management systems grew out of research that occurred in the early 1990s. That research extended existing relational database concepts by addingobject concepts. The researchers aimed to retain a declarative query-language based onpredicate 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 andPostgreSQL.

In the mid-1990s, early commercial products appeared. These included Illustra[5] (Illustra Information Systems, acquired byInformix Software, which was in turn acquired by International Business Machines (IBM), Omniscience (Omniscience Corporation, acquired byOracle Corporation and became the original Oracle Lite), and UniSQL (UniSQL, Inc., acquired byKCOM Group). Ukrainian developer Ruslan Zasukhin, founder of Paradigma Software, Inc., developed and shipped the first version of Valentina database in the mid-1990s as aC++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.[6]

Many of the ideas of early object–relational database efforts have largely become incorporated intoSQL:1999 viastructured 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, andMicrosoft SQL Server, make claims to support this technology and do so with varying degrees of success.

Comparison to RDBMS

[edit]

An RDBMS might commonly involveSQL statements such as these:

CREATETABLECustomers(IdCHAR(12)NOTNULLPRIMARYKEY,SurnameVARCHAR(32)NOTNULL,FirstNameVARCHAR(32)NOTNULL,DOBDATENOTNULL# DOB: Date of Birth);SELECTInitCap(C.Surname)||', '||InitCap(C.FirstName)FROMCustomersCWHEREMonth(C.DOB)=Month(getdate())ANDDay(C.DOB)=Day(getdate())

Most current[update] SQL databases allow the crafting of customfunctions, which would allow the query to appear as:

SELECTFormal(C.Id)FROMCustomersCWHEREBirthday(C.DOB)=Today()

In an object–relational database, one might see something like this, with user-defined data-types and expressions such asBirthDay():

CREATETABLECustomers(IdCust_IdNOTNULLPRIMARYKEY,NamePersonNameNOTNULL,DOBDATENOTNULL);SELECTFormal(C.Id)FROMCustomersCWHEREBirthDay(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 anaddress 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":

SELECTInitCap(C.Surname)||', '||InitCap(C.FirstName),A.cityFROMCustomersCJOINAddressesAONA.Cust_Id=C.Id-- the joinWHEREA.city="New York"

The same query in an object–relational database appears more simply:

SELECTFormal(C.Name)FROMCustomersCWHEREC.address.city="New York"-- the linkage is 'understood' by the ORDB

See also

[edit]

References

[edit]
  1. ^Data Integration Glossary(PDF), US: Department of Transportation, August 2001, archived fromthe original(PDF) on 2016-09-24, retrieved2014-03-08
  2. ^Frank Stajano (1995),A Gentle Introduction to Relational and Object Oriented Databases(PDF)
  3. ^Naman Sogani (2015),Technical Paper Review(PDF), archived fromthe original(PDF) on 2016-03-04, retrieved2015-10-05
  4. ^Date, Christopher ‘Chris’ J.;Darwen, Hugh,The Third Manifesto
  5. ^Stonebraker,. Michael with Moore, Dorothy.Object–Relational DBMSs: The Next Great Wave. Morgan Kaufmann Publishers, 1996.ISBN 1-55860-397-2.
  6. ^There was, at the time, a dispute whether the term was coined byMichael Stonebraker of Illustra or Won Kim of UniSQL.

External links

[edit]
Wikimedia Commons has media related toObject-Oriented models.
Common models
Other models
Implementations
Types
Concepts
Objects
Components
Functions
Related topics
Authority control databases: NationalEdit this at Wikidata
Retrieved from "https://en.wikipedia.org/w/index.php?title=Object–relational_database&oldid=1317276523"
Category:
Hidden categories:

[8]ページ先頭

©2009-2026 Movatter.jp