ADB Chapter 1
ADB Chapter 1
Concepts for
Object Oriented Databases
1
Chapter Outline
2
Introduction
• Traditional Data Models:
– Hierarchical (1960)
– Entity-relationship Model
• Unique Identity:
• the object identifier, which does not change and is not reused when the
object is deleted.
• an object may also be given one or more names that are meaningful to the
user, provided each name identifies a single object within a database.
• Object names are intended to act as ‘root’ objects that provide entry points
into the database.
13
Object Identity, Object Structure, and Type Constructors (3)
• Type Constructors:
– In OO databases, the state (current value) of a complex object may be
constructed from other objects (or other values) by using certain type
constructors.
• The three most basic constructors are atom, tuple, and set (The minimal set of
constructors that the system should have ).
• Other commonly used constructors include list, bag, and array.
• The atom constructor is used to represent all basic atomic values, such as integers,
real numbers, character strings, Booleans, and any other basic data types that the
system supports directly.
Object Identity, Object Structure, and Type Constructors (4)
• The atom constructor is used to represent all basic atomic values, such as
integers
• Sets are critical because they are a natural way of representing collections
from the real world.
• Tuples are critical because they are a natural way of representing properties
of an entity.
15
Object Identity, Object Structure, and Type Constructors (5)
1.3 Encapsulation of Operations, Methods, and Persistence (1)
• Encapsulation
– One of the main characteristics of OO languages and systems
18
Encapsulation of Operations, Methods, and Persistence (3)
• Specifying Object Behavior via Class Operations (methods):
– The main idea is to define the behavior of a type of object based on the
operations that can be externally applied to objects of that type.
– Naming Mechanism:
– Reachability Mechanism:
– A type in its simplest form can be defined by giving it a type name and then
listing the names of its visible (public) functions
– When specifying a type in this section, we use the following format, which
does not specify arguments of functions, to simplify the discussion:
– Example:
• Subtype:
– When the designer or user must create a new type that is similar but not
identical to an already defined type
• Supertype:
Example (1):
OR:
• Consider a type that describes objects in plane geometry, which may be defined as
follows:
– GEOMETRY_OBJECT: Shape, Area, ReferencePoint
• Now suppose that we want to define a number of subtypes for the GEOMETRY_OBJECT
type, as follows:
– RECTANGLE subtype-of GEOMETRY_OBJECT: Width, Height