Week 3 Flashcards
What does a weak entity set reduce to in the relational schema?
A schema that incldues the foreign key column for the primary key of the identifying entity set
How is a many to many relationship set represented in a schema?
With a schema with attributes for the primary keys of the two participating entity sets
How are many-to-one and one-to-many relationship sets represented in the schema?
By adding a foreign key attribute to the side whose entities can only participate once in the relationship set
What kind of relationship set doesn’t require a schema?
An identifying relationship set
How are multivalued attributes represented in a schema?
By creating a separate relation with each value of the multivalued attribute mapping to a separate tuple in this new schema
What are the two approaches for how to deal with generalisation in relational schema?
<ul>
<li>Form a schema for the superclass with a foreign key to the superclass in each of the subclass schemas</li>
<li>Form a schema for each lower level set with all inherited attributes</li>
</ul>
What are the drawbacks of forming a schema for the superclass and having all the subclasses have a foreign key to that?
Getting information is harder, requires accessing information about two relations
What are the drawbacks of having the information stored at each level of the inheritance in the super and sub classes?
Data can be stored redundantly if inheritance is not total
What are some problems that can occur if data redundancy is present in the database?
<ul> <li>Insert anamolies</li> <li>Update anamolies</li> <li>Delete anamolies</li> </ul>
Describe what it means for B to be functionally dependent on A (A->B)
If each possible value of A is associated with exactly one value of B
If A->B then what are A and B?
A - determinant
B - dependent set
What are functional dependencies the property of instead of instances?
Schemas
Define a trivial functional dependency
If the dependent set is a subset of the determinant
Define a partial functional dependency
If the dependent set is functionally dependent on a strict subset of the determinant
(you can remove an attribute from the determinant and the dependency still exists)
Define a full functional dependency
If the dependent set is functionally dependent on the determiner but not on any strict subset of determiner
(you can’t remove an attribute from the determinant and the depedenceny will still exist)
What do we need to say that C is transivitely dependent on A via B?
A->B and B->C (because we have A->C)
Define a transitive functional dependency
If there is a set of attributes B that is the dependent set in one functional dependency and the determinant in another
What is the main purpose of identifying a set of functional dependencies?
To specify the set of constraints that hold on a relation, so we can identify candidate keys
Define a superkey in terms of functional dependencies
K is a superkey for a relational schema R if and only K->R
Define a candidate key in terms of functional dependencies
K is a candidate key for R if and only if K -> R is a FULL functional dependency (no subset)
What is the closure of F?
The set of all functional dependecies logically implied by F
What is the closure of F denoted by?
F+
What are the three of Armstrong’s axioms?
Reflexivity
Augmentation
Transitivity
What is the reflexivity Armstrong axiom?
If B is a subset of A, then A -> B