You are on page 1of 34

Object-Relational DBMS

s
By Yao-Wen Tu

CS157b
12/09/2003
Prof. Sin-Min Lee
Introduction to Object-Relational D
BMSs
 Several major software companies includin
g IBM, Informix, Microsoft, Oracle, and Sy
base have all released object-relational ver
sions of their products. These companies a
re promoting a new, extended version of r
elational database technology called obje
ct-relational database management s
ystems also known as ORDBMSs.
Introduction to Object-Relational D
BMSs (Cont)
 This article compares and contrasts this ne
w class of database with the relational dat
abases, RDBMS from which they are evolvi
ng and also with efficient object-oriented
databases, OODBMSs, also known as obje
ct databases, ODBMSs.
Does a database supporting complex applic
ations have to be object-oriented?

 A certain group thinks that future applications can only b


e implemented with pure object-oriented systems. Initiall
y these systems looked promising. However, they have b
een unable to live up to the expectations. A new technol
ogy has evolved in which relational and object-oriented c
oncepts have been combined or merged. These systems
are called object-relational database systems. The main
advantages of ORDBMSs are massive scalability and sup
port for object-oriented features.
Advantages of ORDBMSs
 The main advantages of extending the relational
data model come from reuse and sharing.
 Reuse comes from the ability to extend the
DBMS server to perform standard functionality
centrally, rather than have it coded in each
application.
 If we can embed the functionality in the server,
it saves having to define it in each application
that needs it, and consequently allows the
functionality to be shared by all applications.
Disadvantages of ORDBMSs
 The ORDBMSs approach has the obvious disadvantage o
f complexity and associated increased costs.

 There are proponents of the relational approach that beli


eve the essential simplicity and purity of the relational m
odel are lost with these types of extension.

 There are also those that believe that the RDMSs is bein
g extended for what will be a minority of applications tha
t do not achieve optimal performance with current relati
onal technology.
Disadvantages of ORDBMSs (Con
t.)
 Instead of discussing object models, terms like ‘user-defi
ned data types’ are used. The terminology of object-orie
ntation abounds with terms like ‘abstract types’. ‘class hi
erarchies’, and ‘object models’. However, ORDBMSs vend
ors are attempting to portray object models as extension
s to the relational model with some additional complexiti
es.

 This potentially misses the point of object-orientation, hi


ghlighting the large semantic gap between these two tec
hnologies.
Relational DBMS
 The relational model was formally introduced by
Dr. E. F. Codd in 1970 and has evolved since the
n, through a series of writings and later through
implementations by IBM and others. The definin
g standard for relational databases is published
by ANSI (the American National Standard Institu
te) as SQL (ANSI 1986) or SQL1, called SQL-86.
A revised standard is called SQL2, also referred t
o as SQL-92.
Relational DBMS
 A relational database is composed of many relati
ons in the form of two-dimensional tables of row
s and columns containing related tuples.

 Organizing data into tables, the form in which da


ta is presented to the user and the programmer,
is known as the logical view of the database. T
he stored data on a computer disk system is call
ed the internal view. The rows (tuples) are call
ed records and the columns (fields in the recor
d) are called attributes.
Relational DBMS
 Each column has a data type (i.e., int, floa
t, date). There are various restrictions on t
he data that can be stored in a relational d
atabase. These are called constraints. Th
e constraints are domain constraints, key c
onstraints, entity integrity constraints, and
referential integrity constraints. These con
straints ensure that there are no ambiguo
us tuples in the database.
RDBMSs
 RDBMSs use Structured Query Language (SQL, c
urrently SQL2) as the data definition language
(DDL) and the data manipulation language (DM
L).
 SQL includes statements for data definition, mod
ification, querying and constraint specification. T
he types of queries vary from simple single-table
queries to complicated multi-table queries involvi
ng joins, nesting, set union/differences, and oth
ers.
disadvantages of Relational Databa
ses
 All processing is based on values in fields of reco
rds. Examples of RDBMSs include Oracle, develo
ped by Oracle Corporation, and Microsoft Access
developed by Microsoft.

 The main disadvantages of Relational Databases


include their inability to handle application areas
like spatial databases (e.g. CAD), applications in
volving images, special types databases (e.g. co
mplex numbers, arrays, etc.) and other applicati
ons that involve complex interrelationships of da
ta.
SQL

 The SQL standard enables users to easily


migrate their database applications betwe
en database systems.

 In addition, users can access data stored i


n two or more RDBMSs without changing t
he database sub-language (SQL).
Object-Oriented DBMS (OODBM
S)
 The concept of abstract data types (ADTs) in
which the internal data structure is hidden and t
he external operations can be applied on the obj
ect that is specified led to the concept of encaps
ulation.

 The programming language SMALLTALK, develo


ped by Xerox, was designed to be object-oriente
d. Other object-oriented programming languages
include C++, Java, etc.
Object-Oriented DBMS (OODBM
S)
 The main features of OO programming lan
guages are encapsulation, inheritance and
polymorphism.

 Encapsulation can be thought as a prote


ctive layer that prevents the code and the
data from being accessed by other code d
efined outside the layer.
Object-Oriented DBMS (OODBM
S)

 The process in which one object inherits the pro


perties of a previously defined object is called in
heritance. Inheritance aids in the reuse of exist
ing definitions for creating new objects.

 Polymorphism allows the same operator or sy


mbol to have different implementations, dependi
ng on the type of objects to which the operator i
s applied.
object-oriented database managem
ent systems (OODBMSs)

 The data in object-oriented database man


agement systems (OODBMSs) is managed
through two sets of relations, one describi
ng the interrelations of data items and ano
ther describing the abstract relationships (i
nheritance).
object-oriented database managem
ent systems (OODBMSs)
 The strong connection between applicatio
n and database results in less code, more
natural data structures, and better maintai
nability and reusability of code. OO langua
ges, such as C++ or Java, are able to red
uce code size by not having to translate co
de into a database sublanguage such as S
QL and ODBC or JDBC.
Changing the lack of defining

 the lack of a defining standard was a draw


back for OODBMSs. The Object Data Mana
gement Group (ODMG) has proposed a sta
ndard known as ODMG-93 or ODMG 1.0 st
andard , now revised into ODMG 2.0.
Consists
 The standard consists of the object model,
the object defining language (ODL), the o
bject query language (OQL), and the bindi
ngs to OO programming languages.

 The ODL and OQL are based on the ODM


G data model.
Data Model
 The data model consists of data types, type cons
tructors, etc., and is similar to the SQL report th
at describes the standard model for relational da
tabases.

 The ODL is designed so as to support semantic


constructs of ODMG 2.0 object model. It is indep
endent of any programming language. The ODL
is used to create object specifications.
Data Model (cont.)
 The OQL is designed to work closely with the pr
ogramming languages for which an ODMG bindi
ng is defined such as C++, Java and SMALLTAL
K.

 The syntax of the OQL queries is similar to the s


yntax of SQL (a query language for relational dat
abases) with some additional features such as o
bject identity, complex objects, inheritance, poly
morphism and relationships.
OODBMSs
 An object-oriented language is the langua
ge for both the application and the databa
se. OODBMSs have been integrated with C
++, C, Java and LISP.

 The primary interface in an OODBMS for c


reating and modifying objects is directly vi
a the object language (C++, Java, etc.) us
ing the native language syntax.
Difference between relational datab
ases and OO databases
 The difference between relational databases and
OO databases is the way in which relationships a
re handled.

 In OO databases, the relationships are represent


ed with OIDs, which improves the data access p
erformance.

 In relational databases, relationships among tupl


es are specified by attributes having the same d
omain.
OODBMSs Problems
 The main drawback of OODBMSs has been poor
performance. Unlike RDBMSs, query optimization
for OODBMs is highly complex.

 OODBMSs also suffer from problems of scalabilit


y, and are unable to support large-scale systems
. Some examples of OODBMSs are O2 (now calle
d Ardent) developed by Ardent Software, and th
e ObjectStore system produced by Object Desig
n Inc.
Object-Relational DBMS (ORDBM
S)
 An ORDBMS supports an extended form of SQL c
alled SQL3 that is still in the development stages
. The extensions are needed because ORDBMSs
have to support ADT's.

 The ORDBMS has the relational model in it beca


use the data is stored in the form of tables havin
g rows and columns and SQL is used as the quer
y language and the result of a query is also table
or tuples (rows).
characteristics of an ORDBMSs

 Base datatype extension,


 Support complex objects,
 Inheritance, and
 Rule Systems.
Users define datatypes

 Object-Relational Database Managerment


Systems (ORDBMSs) allow users to define
datatypes, functions and operators. As a r
esult, the functionality of the ORDBMSs in
creases along with their performance.
An example schema of a student re
lation which ORDBMS supports

 STUDENT(fname,lname,ID,sex,major,address,dn
ame,location,picture)

 Notice : extra attributes "location" and "picture"


which are not present in the traditional EMPLOY
EE relation of RDBMS. The datatype of "location"
is "geographic point" and "picture" is "image".
The differences between the thre
e approaches
 Criteria RDBMS ODBMS ORDBMS
Defining standard SQL2 ODMG-2.0 SQL3 (in process)

Support for object-ori Does not support; Supports extensively Limited support; most
ented features It is difficult to map pr ly to new data type
ogram object to the da
tabase
Usage Easy to use OK for programmers; Easy to use except for
some SQL access for some extensions
end users
Support for complex r Does not support abstr Supports a wide variet Supports Abstract data
elationships act datatypes y of datatypes and dat types and complex rel
a with complex inter-r ationships
elationships
Performance Very good performanc Relatively less perfor Expected to perform v
e manc ery well
The differences between the thre
e approaches
Criteria RDBMS ODBMS ORDBMS

Product maturity Relatively old and so very This concept is few years ol Still in development stage s
mature d and so relatively matur fe o immature
ature
The use of SQL Extensive supports SQL OQL is similar to SQL, but SQL3 is being developed wi
with additional features like th OO features incorporate
Complex objects and objec d in it
t-oriented features
Advantages Its dependence on SQL, rel It can handle all types of co Ability to query complex ap
atively simple query optimiz mplex applications, reusabil plications and ability to han
ation hence good performa ity of code, less coding dle large and complex appli
nce cations
Disadvantage Inability to handle complex Low performance due to co Low performance in web ap
applications mplex query optimization, i plication
nability to support large-sca
le systems
Support from vendors It is considered to be highly Presently lacking vendor su All major RDBMS vendors a
successful so the market siz pport due to vast size of RD re after this so has very go
e is very large but many ve BMS market od future
ndors are moving towards
ORDBMS
Slowly move
 The other current ORDBMSs include Oracl
e8, from Oracle Corporation, and Universal
DB (UDB) from IBM. Also, Stonebraker poi
nt out that applications from Relational DB
MSs (simple data with query) will slowly m
ove towards the Object-Relational DBMSs
(complex data with query).
five architectural options given by D
r. Stonebraker
 Supply plug-in code to make function calls to oth
er applications.
 Add separate API's and server subsystems to su
pport object functionality.
 Simulate specialized object-relational functionalit
y in a middleware layer.
 Completely redesign the database engine.
 Add a new object-oriented layer to support rich
datatypes atop a proven relational database engi
ne.
Conclusion
 In spite of many advantages, ORDBMSs al
so have a drawback. The architecture of o
bject-relational model is not appropriate fo
r high-speed web applications. However,
with advantages like large storage capacit
y, access speed, and manipulation power
of object databases, ORDBMSs are set to c
onquer the database market.

You might also like