1/4
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced |
|---|
No study sessions yet.
How do you map a strong entity?
1 option: for each strong entity E creation a relation R and include as attributes of R all of the simple attributes of E. If E has composite attributes, include only its simple components. Designate one key attribute as the primary key of R. If R has multi-valued attributes, do not include them in this relation R.
How do you map weak entities?
1 option: For each weak entity E, create a relation R. Include simple attributes of E as attributes of R. The primary key of R will be the combination of the partial key of E and a foreign key to the strong attribute E is related to.
How do you map multi-valued attributes?
For each multi-valued attribute A of an entity E, create a relation R. Include as an attribute of R an attribute that describes A. If A is composite, all of its simple components will be attributes in R that describe A. The primary key of R will be the combination of this attribute (corresponding to A, several if A composite) and a foreign key to the primary key of table for E.
How do you map m:n binary relationships?
For each M:N relationship between entities S and T, create a table R. Include as attributes of R any simple attributes corresponding to the M:N relationship. The primary key of R will be the combination of foreign keys to the primary keys of S and T. Simple attributes of the relationship are not included in the primary key.
How do you map unions?
Surrogate key approach. For an entity E which is the child of many superclasses, we create a surrogate key if all superclasses do not already share the same primary key. The surrogate key will be the key attribute in the table R corresponding to E. In the relation for every superclass of E, include a foreign key to the primary key of R.