Relational Model Flashcards
What is a relation schema?
Named relation followed by set of attributes e.g. Branch(branchNo, street, city, postcode)
Can a single attribute have multiple values in a relational schema?
No
How do you identify a primary key in a relational schema?
Listed first, underlined and declared explicitly
What is the degree of a relational model?
Number of attribute columns
What is the cardinality of a relational model?
Number of rows
What is a domain in relational schema?
Set of allowed values for attributes
What is null?
An uknown or not applicable value in a row
How do you identify a foreign key in a relational schema?
Declared explicitly
How is an entity type translated?
Each type becomes its own relational schema with certain special attributes being translated differently
How are composite attributes translated?
Broken down into separate attributes in its entities schema
How are multi-valued attributes translated?
Becomes its own relational schema with its attribute, foreign key of entity, and composite primary key of them both
How are derived attributes translated?
Not necessary to store, and are not included
How are weak entity types translated?
Becomes a relational schema with its attributes and a composite key of its dependant relationship’s primary key and its own partial key
How are 1:M relationships translated?
Add to attribute list of the child entity (M side) a foreign key of the parent’s (1 side) primary key e.g. Staff(staffNo, lname, branchNo)
How are 1:1 relationships translated?
treated as 1:M where the child is chosen as the one with total participation (if possible) e.g. Staff(staffNo, lname, branchNo)