Object Orented Best
Object Orented Best
DBMSs
Object_Oriented Databases, by Dr 2
. Khalil
Object-Oriented Data Models
Object-Orientation Data Model (OODM) – A (logical) data
model that captures the semantics of objects supported in object-
oriented programming.
Object_Oriented Databases, by Dr 3
. Khalil
OODBMS - Definitions
Koshafian and Abnous (1990)
Zdnick and Maier (1990) (1) object-orientation = abstract data
It must provide database types + inheritance + object identity;
(2) OODBMS = object-orientation +
functionality; database capabilities.
It must support object identity;
Parsaye et al (1989)
It must provide encapsulation; (1) high-level query language with query
It must support objects with optimization capabilities in the
underlying system;
complex with complex state. (2) support for persistency, atomic
transactions, and concurrency and
recovery control;
(3) support for complex object storage,
indexes, and access methods for fast and
efficient retrieval;
(4) OODBMS = object-oriented system
+ (1) + (2) + (3).
Object_Oriented Databases, by Dr 4
. Khalil
Current Commercial OODBMSs
GemStone from GemStone Systems Inc.
Itsaca from IBEX Knowledge Systems SA.
Objectivity/DB from Objectivity Inc.
ObjectStore from eXcelon Corporation.
Jasmine from Computer Associate/Fujitsu.
Versant from Versant Corporation.
Object_Oriented Databases, by Dr 5
. Khalil
Alternatives Strategies for Developing an OODBMS
Extend an existing object-oriented programming language with database
capabilities – This is the approach taken by GemStone which extends Smalltalk,
C++, and Java with database capabilities.
Provide extensible object-oriented DBMS libraries – rather than extending the
language, class libraries are provided that support persistence, aggregation, data
types, transactions, concurrency, security, and so on. (Ontos, Versant, and
ObjectStore).
Embed object-oriented database language constructs in a conventional
host language – this is the approach taken by the product O2, which provides
embedded extensions for the programming language ‘C’.
Extend an existing database language with object-oriented capabilities –
SQL vendors are extending it to provide object-oriented constructs. SQL 3 supports
object-oriented. Also, ODMG specifies a standard for Object SQL (SQL 3).
Object_Oriented Databases, by Dr 7
. Khalil
OODBMS Perspectives
the disk.
Physical OIDs that encode the location.
Object_Oriented Databases, by Dr 8
. Khalil
Accessing an Object
In conventional DBMS:
The DBMS determines the page on secondary storage
that contains the required record using indexes or table
scans. The DBMS then reads that page from disk and
copies it into its cache.
The DBMS subsequently transfers the required parts of
the record from the cache into the application’s memory
space.
The application can then update the record’s fields in its
own memory space.
The application transfers the modified fields back to the
DBMS cache using SQL.
Finally, at an appropriate point the DBMS writes the
updated page of the cache back to disk.
In OODBMS:
The OODBMS determines the page on disk that
contains the required object using its OID or an index,
then reads that page from disk and copies it into the
application’s page cache within its memory space.
The OODBMS may then carry out a number of
conversions, such as swizzling references (pointers)
between objects.
The application can then update the object, as required.
The OODBMS may need to carry out similar
conversions, before copying the page back to disk.
Object_Oriented Databases, by Dr 9
. Khalil
Issues in OODBMSs
Long-duration transactions
Versions
Schema evolution
Object_Oriented Databases, by Dr 10
. Khalil
Transactions
Transactions involving complex objects can continue for several
hours, or even several days.
To support long-duration transactions we need to use different
protocols from those used for traditional database applications in
which transactions are typically of a very short duration.
In an OODBMS, the unit of concurrency control and recovery is
logically an object.
Locking-based protocols are the most common type of concurrency
control mechanism used by OODBMSs.
It would be totally unacceptable for a user who initiated a long-
duration transaction to find that the transaction has been aborted
owing to lock conflict. Solutions:
Multiversion concurrency control protocols
Object_Oriented Databases, by Dr 11
. Khalil
Versions
There are many applications that need access to the previous
state of an object.
version management is the process of maintaining the
evolution of objects.
An object version represents an identifiable state of an object.
A version history represents the evolution of an object.
Object_Oriented Databases, by Dr 12
. Khalil
Schema Evolution
Design is an incremental
process and evolves with
time. To support this
process, applications
require considerable
flexibility in dynamically
defining and modifying
the database schema.
For example, it should be
possible to modify class
definitions, the inheritance
structure, and the
specifications of attributes
and methods without
requiring system
shutdown.
Object_Oriented Databases, by Dr 13
. Khalil
Architecture
Many commercial OODBMSs are based on the client-server
architecture to provide data to users, applications, and tools in a
distributed environment.
We can distinguish three basic structures: Object server, Page
server, and Database server.
Object_Oriented Databases, by Dr 14
. Khalil
Object server
This approach attempts to distribute the processing between the two
components.
Typically, the server process is responsible for managing storage, locks,
commits to disk, logging and recovery, enforcing security and integrity,
query optimization, and executing stored procedure.
The client is responsible for transaction management and interfacing to the
programming language.
This is the best architecture for cooperative, object-to-object processing in an
open, distributed environment.
Object_Oriented Databases, by Dr 15
. Khalil
Page server
Object_Oriented Databases, by Dr 16
. Khalil
Database server
Object_Oriented Databases, by Dr 17
. Khalil
Storing and Executing Methods
There are two approaches to handling methods:
Store the method in external files. This approach is similar to function
application at runtime.
Object_Oriented Databases, by Dr 18
. Khalil
The Object-Oriented Database System Manifesto
Object_Oriented Databases, by Dr 19
. Khalil
Advantages and Disadvantages of OODBMSs
Advantages Disadvantages
Lack of universal data model
Enriched modeling capabilities
Lack of experience
Extensibility
Removal of impedance Lack of standards
mismatch Competition
More expressive query language Query optimization comprises
Support for schema evolution encapsulation
Support for long-duration Locking at object level may
transactions impact performance
Applicability to advanced Complexity
database applications Lack of support for views
Improved performance Lack of support for security
Object_Oriented Databases, by Dr 20
. Khalil
Object Data Standard ODMG 3.0, 1999
Several important vendors have formed the Object Data Management Group
(ODMG) to define standards for OODBMSs.
The ODMG has produced an Object Model that specifies a standard model for
the semantics of database objects.
The model is important because it determines the built-in semantics that the
OODBMS understands and can enforce.
The design of class libraries and applications that use these semantics should
be portable across various OODBMSs that support the object model
The major components of the ODMG architecture for an OODBMS are:
An Object Model;
Object_Oriented Databases, by Dr 21
. Khalil
Object Structure (ODMG MODEL)
In OO database systems, the values (or states)
of complex objects may be constructed from
other objects by using certain type constructors.
One way of representing an objects is to view
each object as a triple (i, c, v), where:
i : is a unique object identifier (OID).
c : is a constructor (that is, an indication of how
the object value is constructed).
v : is the object value (or state).
Object_Oriented Databases, by Dr 22
. Khalil
Object Structure (Cont’d)
There are the following types of constructors:
Basic constructors: atom, tuple, set.
Other constructors: list, array, bag.
Object_Oriented Databases, by Dr 24
. Khalil
Object Structure – An Example
We assume, for the following examples, that
everything is an object, including basic values.
We assume that we have the constructors atom, set, and
tuple.
We use i1, i2, i3, ... to stand for unique system-generated
object identifiers.
An object is defined by a triple:
Object_Oriented Databases, by Dr 25
. Khalil
Object Structure – An Example
Object_Oriented Databases, by Dr 26
. Khalil
Object Structure – An Example
Consider the following objects:
O1 = (i1, atom, Houston)
O2 = (i2, atom, Bellaire)
O3 = (i3, atom, Sugarland)
O4 = (i4, atom, 5)
O5 = (i5, atom, Research)
O6 = (i6, atom, 22-MAY-78)
O7 = (i7, set, {i1, i2, i3})
Object_Oriented Databases, by Dr 27
. Khalil
Graphical Representation
Object_Oriented Databases, by Dr 28
. Khalil
Object Management Group (OMG)
Distributed transactions
Versioning
Event notification
internationalization
Object_Oriented Databases, by Dr 29
. Khalil
Object Management Architecture (OMA)
In 1990, the OMG first published its
Object Management Architecture
(OMA) Guide which specifies a
single terminology for object-
oriented languages, systems,
databases, and application
frameworks; an abstract framework
for object-oriented systems; a set of
technical and architectural goals; and
a reference model for distributed
applications using object-oriented
techniques.
Four areas of standardization were
identified for the reference model:
The object model (OM);
(ORB);
The Object Services;
Object_Oriented Databases, by Dr 30
. Khalil
The Object Model (OM)
Object_Oriented Databases, by Dr 31
. Khalil
The Object Request Broker (ORB)
Object_Oriented Databases, by Dr 32
. Khalil
The Object Services & The Common Facilities
Object_Oriented Databases, by Dr 33
. Khalil
The Common Object Request Broker Architecture
(CORBA)
The Common Object Request Broker Architecture (CORBA) defines the
architecture of ORB-based environment.
This architecture is the basis of any OMG component, defining the parts that
form the ORB and its associated structures
Using the communication protocol GIOP (General Inter-Object Protocol) or
IIOP (Internet Inter-Object Protocol), CORBA-based program can interoperate
with another CORBA-based program across a variety of vendors, platforms,
operating systems, programming languages, and networks.
Object_Oriented Databases, by Dr 34
. Khalil
Object Data Standard ODMG 3.0, 1999
Several important vendors have formed the Object Data Management Group
(ODMG) to define standards for OODBMSs.
The ODMG has produced an Object Model that specifies a standard model for
the semantics of database objects.
The model is important because it determines the built-in semantics that the
OODBMS understands and can enforce.
The design of class libraries and applications that use these semantics should
be portable across various OODBMSs that support the object model
The major components of the ODMG architecture for an OODBMS are:
An Object Model;
Object_Oriented Databases, by Dr 35
. Khalil
Thank you