Database Reference
In-Depth Information
The Object-Relationship Model
As you are aware, or will soon learn (from your software engineering course), there are,
broadly speaking, two alternate paradigms for software construction: the functional
approach (which is the traditional approach) and the object-oriented (OO) approach. In
an object-oriented environment, the comparative methodology for the E-R diagram is the
object-relationship diagram
(ORD or O-R diagram). The concept of an ORD is similar to
that of an ERD, and the diagrams are also similar, but there are a few exceptions:
•
In the OO paradigm, the
object type
replaces the entity (type) of
the relational model. Like the entity, an object type is a concept
or thing about which data is stored. Additionally, the object type
defines a set of operations, which will be applicable to all objects
(instances) of that type.
•
The symbol used to denote an object type is similar to an
entity symbol, except that it has two extended areas — one for
the attributes of the object type, and the other for its defined
operations.
•
The preferred diagramming convention is the UML
(Unified Modeling Language) notation.
•
Depending on the OO development tool, there might be
additional notations regarding the cardinality (more precisely,
multiplicity) of the relationships represented.
A full treatment of the OO approach is beyond the scope of this course. You are
no doubt familiar with using UML diagrams in your OO programming courses. For a
quick review of the fundamentals, please see references [Lee, 2002] and [Martin, 1993].
However, in the interest of comprehensive coverage, an overview of the approach is
provided in chapters 5 and 23.
Database Tree
A
database tree
(hierarchy) is a traditional alternative, which used to be employed prior to
the introduction or the E-R model; it was successfully employed in a system called RAMIS
(the original acronym stands for “Random Access Management Information System”).
A database tree (hierarchy) is a collection of entities and 1:M relationships arranged such
that the following conditions hold:
•
The root has no parent
•
Each subsequent node has a single parent
Figure
3-6
illustrates a database hierarchy. Observe that it looks like a general tree
(review your data structures). Except for the root (node A), each node has a parent node
that it references. Note also that all the relationships are 1:M relationships (traditionally
referred to as
parent-child relationships
).