UMBC CMSC 461 Spring '99 

CSEE | 461 | 461 S'99 | lectures | news | help 

Lecture 27
Object-Oriented Databases

Chapter 18, Database Systems Concepts, by Silberschatz, et al, 1997

Portions reproduced with permission

New Database Applications

The purpose of database systems is the management of large bodies of information. Common features of the "older" systems are:

New applications now require new data types:

The Object-Oriented Data Model

Object structure

An object roughly corresponds to an entity in the E-R model. An object encapsulates both the data and the code related to an object. All interactions between an object and the rest of the system are via messages. Objects have:

Derived attributes of an entity in the E-R model can be expressed in the O-O model as read-only messages.

Object Classes

Similar objects are grouped into a class (entity-set in the E-R model). An example:

class employee

/* Variables */

string name;

string address;

date start-date;

int salary;

/* Messages */

int annual-salary( );

string get-name( );

string get-address( );

int set-address( string new-address );

int employment-length( );



To allow the direct representation of similarities among classes, we need to place classes in a specialization hierarchy (the "ISA" relationship).

class person


string name;

string address;


class employee isa person


date start-date;

int salary;


Multiple Inheritance

We can use multiple inheritance to model roles.

Object-Oriented Languages

Until now we have covered the basic concepts of O-O at an abstract level. To be used in practice in a database system, the concepts have to be expressed in some language.

  1. The concepts of O-O can be used purely as a design tool, and are encoded into a relational database, same as converting an ERD into a set of relations.
  2. Concepts are incorporated into a language that is used to manipulate the database.

Persistent Programming Languages

Data is persistent when it exists after the program directly manipulating it ceases to exist. Persistent programming language is a language with constructs to handle persistent data. This is different from embedded SQL:

  1. With an embedded language, the type system of the host language usually differs from the type system of the DML.
  2. With an embedded language, the programmer is responsible for writing explicit code to fetch data from the database into memory.

Persistence of Objects

Storage and Access of Persistent Objects

Finding objects in the database can be by:

CSEE | 461 | 461 S'99 | lectures | news | help