Information Technology Reference
In-Depth Information
&RXUVH
SUHFRXUVH
3UHUHTXLVLWH
&RXUVH
&RXUVHB/RFDWLRQ
3UHU
3UHUBWLWOH
Fig. 3.31 Map FKA into EER model
For each FDA type attribute of a primary relation, R 1 , define a relationship type
between the entity defined from R 1 and the entity that has the FKA as its primary
key.
The following entities and relationships can be derived from the classification
table in Fig. 3.31 .
Substep 7—Map each inclusion dependency into semantics (binary/n-ary rela-
tionship).
If IDs have been derived between two entities, entity A with a as entity key and
b' as foreign key, and entity B with b as entity key and a' as foreign key, then their
semantics can be derived as follows:
Case 1. If given IDs: a' ↆ a, then entity A is in a 1:n relationship with entity B.
Case 2. If given IDs: a' ↆ a, and b' ↆ b (optional), then entity A is in a 1:1 relation-
ship with entity B.
Case 3. If given IDs: a' ↆ a, and b' ↆ b, and a'b' is a composite key, then entity A
is in an m:n relationship with entity B.
For example, Table 3.1 shows the derived semantics from the IDs of the enroll-
ment system:
Substep 8—Draw EER model.
Put together an EER model as a result of the above steps as shown in Fig. 3.32 .
3.6
Translating an EER Model into a UML
The following procedure transforms an EER model to a UML model (Fong 1994 ):
Step 1—Map entity to class.
An EER model works with entity types and their corresponding attributes. At-
tributes of a particular entity may be considered as instance variables of the class
instance. For example, an entity type Student can be mapped into a class Student of
UML as shown in Fig. 3.33 .
Step 2—Map relationship to association.
In an EER model, relationships are represented as named associations among
entities. In an object-oriented schema, they are links and associations between
superclass(es) and subclass(es). A link is a physical conceptual connection between
object instances. Association describes a group of link with common structure and
semantics and can be represented as an attribute that explicitly references another
object. The relationship in the EER model can be mapped into an association in
Search WWH ::




Custom Search