
represent each tire as a separate object, but grouped all four
doors together as a single object. Objects have attributes,
which are shown only for the engine object in the figure.
There are several notions central to most object-
oriented systems. N
ote that there is no single agreed upon
hard definition of an object-oriented system or database;
rather, there is a list of properties, most of which one
would expect an object-oriented system to have. We briefly
describe some central notions below.
Classes and Instances
Many objects are similar. Similar objects are grouped
together into a class. Individual objects in the class are
called instances of the class. From a programming perspec-
tive, data structures and methods are associated with the
class, and are part of the class definition. From a database
perspective, one can think of each relation as a class, and
each tuple (or record) in the relation as an instance of
the relation class.
Inheritance
Often, there are related classes that share some properties
but not all. For example, a vehicle may be a car, truck, or
motorcycle, each of which has some unique properties (for
example, the number of axles is a variable that matters for
trucks, is unnecessary for cars (which always have two),
and is meaningless for motorcycles). Yet, all vehicles share
many common properties, such as owner, model year, brand
name, registration number, etc. In such situations, inheri-
tance is useful, as we have already seen with the generali-
zation hierarchy in the context of entity-relationship (ER)
design in Chapter 2. Inheritance is a central concept in
object-oriented systems.
Identity
A crucial property of object-oriented systems is the
notion of object identity. Over time, attributes of an object
may change value; however, its identity remains the same.
Think of a person—over their lifetime there are likely to be
several changes of address, phone number, and so on;
there may even be changes in name; however, we know
Chapter 8 OBJECT-RELATIONAL DESIGN 141