# Database Models

Topics

:

Overview
Object-Oriented Database Model
Relational Database Model

Overview

Brief description of various database models.

Object-Oriented Database Model

The object-oriented database model is based on persistent objects and extends the object-oriented programming principles of abstraction, encapsulation, inheritance, and polymorphism into the database. A persistent object is an object that saves its state between program invocations. Normally an object's data, stored in memory, is lost when the program terminates. Persistent objects store their data both in memory and in a disk file. When the program is terminated and restarted again, the persistent object can restore its last state by loading its data from the disk file. This is the basis of an objected-oriented database. A persistent object is able to represent any kind of data because there is no restrictions on its format and content. This allows an object-oriented database to define complex data items, arrays, variable lists, and user-defined data types within its records definition.

Relational Database Model

The relational database model consists of fixed-length, fixed-format records, which form tables of rows and columns. Each record has a primary key data element to uniquely identify the record in the database. In a relational database the relationship between the rows and columns is represented by data values rather than record addresses. Both the relational and object-oriented database models have their advantages. An object-oriented database is not bound by rows and columns and can be made to represent any type of data. A relational database can easily provide a general-purpose query and report writer languages to find, sort, view, and print the records in the database.

End Of Document