1/5
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced | Call with Kai | Chat |
|---|
No analytics yet
Send a link to your students to track their progress
how do we handle weak entities?
put them into a relation with one of its primary keys being the primary key of its owner, and another primary key being any partial key
how do we handle 1:1 binary relationships?
choose the entity between the two which has total participation on its side. on that entity’s table, add in a foreign key to the other relation, and any attributes that might’ve belonged to the relationship itself.
how do we handle 1:N binary relationships?
on the entity on the “N” side, add in a foreign key to the other entity.
how do we handle M:N relationships?
create a new relation for that relationship. its primary key is the primary keys of both entities. other attributes on it are any attributes held by the relationship.
how do we handle multivalued attributes?
we create a new relation. it includes one instance of the attribute value (so for “Locations” multivalued attribute, it would be “Location”), along with the primary key of the entity its in as a foreign key.
both together make up the primary key of the multivalued attribute.
how do we handle n-ary relationships? what is the exception?
we make a new relation, and add to it the primary keys of every participating entity along with any attribute of the relation itself. the combination of all foreign keys make up the primary key of this relation.
however, if one entity’s side has a max cardinality of 1, then we do NOT include its foreign key as part of our new relation’s primary key.