Introduction > Traditional Database Modeling > Object-Oriented database model
The aspects associated with an object-oriented modeling are:
- Object Structure. Loosely speaking, an object corresponds to an entity instance in the
ER model. Objects both know things (they have attributes) and they do things (they have
methods). The object-oriented paradigm is based on encapsulating data and code related to
an object into a single unit. Conceptually, all interactions between an object and the rest
of the system are via messages. Thus, the interface between an object and the rest of the
system is defined by a set of allowed messages. In general, an object has associated with it:
- a set of variables that contain the data for the object; variables are attributes in ER;
- a set of messages to which the object responds; and
- a set of methods, each of which is a body of code to implement messages.
- Object Classes. A class groups objects in a database that share a
common definition. The notion of a class corresponds to the notion of
entity-class, or just entity, in the ER model. A class is a representation
of an object and, in many ways, it is simply a template from which objects
are created. Classes form the main building blocks of an object-oriented
application. A class object includes:
- a set-value variable whose value is the set of all objects that are instances of the class;
- implementation of a model for the message new, which creates a new instance of the
class;
- inheritance upon which variables and methods of a class are inherited from a superclass.
A super-class establishes a hierarchy similar to the concept of specialization (ISA,
relation). For example, an employee is a person such that employee inherits variables
and methods from person;
- multiple inheritance in which case a class inherits from multiples super-classes; and
- and object identity.