Databases Reference
In-Depth Information
Intermediate Mapping Rules
Intermediate mappings constitute a set of rules that transform any E/R
schema into a canonical form in which any entity or relationship is in 1NF,
that is, any of their attributes is monovalued for each entity instance or rela-
tionship instance.
For example, an entity type having multivalued attributes should be
transformed using one of the two following rules:
R1: If an attribute may take only a very few values, say, two or three,
the attribute is duplicated as many times as it has possible values.
·
R2: If an attribute may take several values, it is represented as
an independent entity, related to the mother-entity by a binary rela-
tionship, generically named has-a. The cardinalities of this rela-
tionship are 1-N, where N is the maximum number of values that
the attribute may take in the mother-entity.
·
Figure 13.15 illustrates an application of these two rules. In the Book entity,
the attribute Author is multivalued but has a maximum of four authors,
while the attribute Chapter may have more than 10 values. Author attribute
is transformed using R1, while Chapter attribute is transformed using R2.
Other rules concern structured attributes. If the original E/R model
allows specification of structured attributes, the attributes have to be trans-
formed using one of the following two rules:
Book
Title
Author1
Author2
Author3
Author4
Rule R1
Book
Title
Authors:set of name
Chapters:set of string
1-N
Rule R2
Has-a
1-1
Book-chapters
Chapter-title
Figure 13.15
Eliminating multivalued attributes.
 
Search WWH ::




Custom Search