| You
are here: Freetutes.com
> Systems
Analysis and Design
Comparison Between Relational Database Model and Object Oriented Model
Now we know about both relational and object oriented approach, we can now compare
these two models. In this session, we compare the relational model and object
oriented model. We compare model representation capabilities, languages, system
storage structures, and integrity constraints.
Data Model Representation
Different database models differ in their representation of relationships.
In relational model, connections between two relations are represented by foreign
key attribute in one relation that reference the primary key of another relation.
Individual tuples having same values in foreign and primary key attribute are
logically related. They are physically not connected. Relational model uses logical
references.
In object oriented model, relationships are represented by references via the
object identifier (OID). This is in a way similar to foreign keys but internal
system identifiers are used rather than user-defined attributes. The Object Oriented
model supports complex object structures by using tuple, set, list, and other
constructors. It supports the specification of methods and the inheritance mechanism
that permits creation of new class definitions from existing ones.
Storage Structures
In relational model, each base relation is implemented as a separate file.
If the does not specify any storage structure, most RDBMS will store the tuples
as unordered records in the file. It allows the user to specify dynamically on
each file a single primary or clustering index and any number of secondary indexes.
It is the responsibility of user to chObject Orientedse the attributes on which
the indexes are set up. Some RDBMSs give the user the option of mixing records
from several base relations together. It is useful when related records from more
than one relation are often accessed together. This clustering of records physically
places a record from one relation followed by the related records from another
relation. In this way the related records may be retrieved in most efficient way
possible.
Object Oriented systems provide persistent storage for complex-structured objects.
They employ indexing techniques to locate disk pages that store the object. The
objects are often stored as byte strings, and the object structure is reconstructed
after copying the disk pages that contain the object into system buffers.
Integrity Constraints
Relational model has keys, entity integrity, and referential integrity. The
constraints supported by Object Oriented systems vary from system to system. The
inverse relationship mechanism supported by some Object Oriented systems provides
some declarative constraints.
Data manipulation Languages
There are languages such as SQL, QUEL, and QBE are available for relational
systems. These are based on the relational calculus.
In Object Oriented systems, the DML is typically incorporated into some programming
language, such as C++. Hence, the structures of both stored persistent objects
and programminglanguage transient objects are often compatible. Query languages
have been developed for Object Oriented databases. Work on a standard Object Oriented
model and language is progressing, but no complete detailed standard has emerged
as yet.
See Also
<<
Previous Page | Contents
| Next Page (Chapter
9 - Testing and Quality Assurance)>>
|