0% found this document useful (0 votes)
7 views36 pages

Object Orented Best

The document provides an overview of Object-Oriented Database Management Systems (OODBMS), detailing their definitions, data models, and various commercial implementations. It discusses the architecture of OODBMS, including object servers, page servers, and database servers, as well as key issues such as long-duration transactions, version management, and schema evolution. Additionally, it highlights the advantages and disadvantages of OODBMSs and introduces the Object Data Management Group (ODMG) standards for OODBMSs.

Uploaded by

davidbuumba5
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views36 pages

Object Orented Best

The document provides an overview of Object-Oriented Database Management Systems (OODBMS), detailing their definitions, data models, and various commercial implementations. It discusses the architecture of OODBMS, including object servers, page servers, and database servers, as well as key issues such as long-duration transactions, version management, and schema evolution. Additionally, it highlights the advantages and disadvantages of OODBMSs and introduces the Object Data Management Group (ODMG) standards for OODBMSs.

Uploaded by

davidbuumba5
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 36

Object-Oriented

DBMSs

Dr. Awad Khalil


Computer Science Department
AUC

Object_Oriented Databases, by Dr. K 1


halil
Content

 Object-Oriented Data Models


 OODBMS Definition
 Alternative Approaches for Developing an OODBMS
 OODBMS Perspectives

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 DataBase (OODB) – A persistent and


sharable collection of objects defined by an OODM.

 Object-Oriented DBMS (OODBMS) – The manager of an


OODB.

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).

 Develop a novel database data model/data language – This is the approach


taken by SIM (Semantic Information Manager), which is based on semantic data
model and has a novel DDL/DDL (Jagannathan et al., 1988).
Object_Oriented Databases, by Dr 6
. Khalil
OODBMS Perspectives
 Conventional DBMSs have a two-level storage model: the
application storage model in main memory, and the database
model on disk.
 An OODBMS tries to give the illusion of a single-level storage
model, with a similar representation in both memory and in the
database stored on the disk.

Object_Oriented Databases, by Dr 7
. Khalil
OODBMS Perspectives

 Objects, and relationships between objects, are identified by object identifiers


(OIDs). There are two types of OID:
 Logical OIDs that are independent of the physical location of the object on

the disk.
 Physical OIDs that encode the location.

 In the former case, a level of indirection is required to look up the physical


address of the object on disk.
 In both cases, an OID is different in size from a standard in-memory pointer,
which need only be large enough to address all virtual memory.
 To achieve the required performance, an OODBMS must be able to convert
OIDs to and from in-memory pointers. This conversion technique has become
known as pointer swizzling or object faulting and the approaches used to
implement it have become varied ranging from software-based residency
checks to page-faulting schemes used by the underlying hardware.
 Pointer Swizzling – the action of converting object identifiers to main
memory pointers, and back again.

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

 Advanced transaction models

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

 In this approach, most of the database processing is performed by


the client.
 The server is responsible for secondary storage and providing
pages at the client’s request.

Object_Oriented Databases, by Dr 16
. Khalil
Database server

 In this approach, most of the database processing is performed by


the server.
 The client simply passes requests to the server, receives results,
and passes them on to the application.
 This is the approach taken by many RDBMSs.

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

libraries or Application Programming Interfaces (APIs) found in traditional


DBMSs, in which an application program interacts with a DBMS by linking
in functions supplied by the DBMS vendor.
 Store the methods in the database and are dynamically bound to the

application at runtime.

Object_Oriented Databases, by Dr 18
. Khalil
The Object-Oriented Database System Manifesto

 Complex objects must be supported


 Object identity must be supported
 Encapsulation must be supported
 Types or classes must be supported
 Types or classes must be able to inherit from their ancestors
 Dynamic binding must be supported
 The DML must be computationally complete
 The set of data types must be extensible
 Data persistence must be provided
 The DBMS must be capable of managing very large databases
 The DBMS must support concurrent users
 The DBMS must be capable of recovery from hardware and software failures
 The DBMS must provide a simple way of querying data

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;

 An Object Definition Language (ODL);

 An Object Query Language (OQL);

 C++, Java, and Smalltalk language bindings.

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.

 The common constructor: domain D, that

contains all basic atomic values that are


directly available in the system. These
typically include integers, real numbers,
character strings, Booleans, dates, and any
other data types that the system supports
directly.
Object_Oriented Databases, by Dr 23
. Khalil
Object Structure (Cont’d)
 An object value v is interpreted on the basis of the value of the
constructor c in the triple (i, c, v):
 If c = atom, then the value v is an atomic value from the

domain D of basic values supported by the system.


 If c = set, the value v is a set of object identifiers {i , i , ...,
1 2
in}, which are the identifiers (OIDs) for a set of objects that
are typically of the same type.
 If c = tuple, the value v is a tuple of the form < a :i , a :i , ...,
1 1 2 2
an:in>, where each aj is an attribute name (sometimes called
an instance variable name) and each ij is an object identifier
(OID).
 If c = list, the value v is an ordered list of object identifiers

[i1, i2, ..., in] of the same type.


 If c = array, the value v is an array of object identifiers.

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:

(OID, type constructor, value).

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})

O8 = (i8, tuple, <DNAME:i5, DNUMBER:i4,


MGR:i9, LOCATIONS:i7,
EMPLOYEES:i10, PROJECTS:i11>)
O9 = (i9, tuple, <MANAGER:i12, MANAGERSTARTDATE:i6>)

O10 = (i10, set, {i12, i13, i14})


O11 = (i11, set, {i15, i16, i17})

Object_Oriented Databases, by Dr 27
. Khalil
Graphical Representation

Object_Oriented Databases, by Dr 28
. Khalil
Object Management Group (OMG)

 The OMG is an international non-profit-making industry


consortium founded in 1989 to address the issues of object
standards.
 The OMG seeks to define standard object-based facilities for
supporting a number of advanced features:
 Concurrent execution

 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);

 The Object Request Broker

(ORB);
 The Object Services;

 The common facilities.

Object_Oriented Databases, by Dr 30
. Khalil
The Object Model (OM)

 The OM is a design-portable abstract model for communicating


with OMG-compliant object-oriented systems.
 A requester sends a request for object services to the ORB, which
keeps track of all objects in the system and the types of service
they can provide.
 The ORB then forwards the message to a provider who acts on
the message and passes a response back to the requester via ORB.

Object_Oriented Databases, by Dr 31
. Khalil
The Object Request Broker (ORB)

 The ORB handles distribution of messages between application


objects in a highly interoperable manner.
 The ORB is a distributed ‘software bus’ that enables objects
(requesters) to make and receive requests and responses from a
provider.

Object_Oriented Databases, by Dr 32
. Khalil
The Object Services & The Common Facilities

 The Object Services


provide the main functions
for realizing basic object
functionality. Many of
these services are database-
oriented.
 The Common Facilities
comprise a set of tasks that
many applications must
perform but are
traditionally duplicated
within each one, such as
printing and electronic mail
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;

 An Object Definition Language (ODL);

 An Object Query Language (OQL);

 C++, Java, and Smalltalk language bindings.

Object_Oriented Databases, by Dr 35
. Khalil
Thank you

Object_Oriented Databases, by Dr. K 36


halil

You might also like