Database Reference
In-Depth Information
For a subtype relationship, the test is a bit more detailed; for relations R1 and R2, ask
and determine the answer to the following questions:
Is (a record of ) R1 also a (a record of ) R2?
Is (a record of ) R2 also a (a record of ) R1?
Possible answers to these questions are always, sometimes, or never. The
possibilities are shown below:
3.5.2 Representing Relationships
Having identified the entities and relationships, the next logical question is, how do
we represent them? Four approaches have been used: database hierarchies, simple
networks, complex networks, the entity-relationship model and the object-relationship
model . The first three approaches are traditional approaches that have made way for the
more reputed latter two approaches. We will therefore start by discussing the latter two
approaches.
The Entity-Relationship Model
The popular answer to this challenge of database representation is the entity-relationship
diagram (ERD or E-R diagram). Figure 3-4a shows the symbols used in an ERD, while
Figure 3-4b provides an illustration based on the Crows-Foot notation. In the diagram,
the convention to show attributes of each entity has been relaxed, thus avoiding clutter.
Note also that relationships are labeled as verbs so that in linking one entity to another,
one can read an entity-verb-entity formulation. If the verb is on the right or above the
relationship line, the convention is to read from top-to-bottom or left-to-right. If the verb
is on the left or below the relationship line, the convention is to read from bottom-to-top
or right-to-left.
 
Search WWH ::




Custom Search