Module 4 Flashcards
What is a functional dependency (FD)?
A constraint that states if two tuples have the same values for a set of attributes X, they must also have the same values for another set of attributes Y.
How is a functional dependency written?
X → Y (X functionally determines Y).
What is a trivial functional dependency?
An FD where Y is a subset of X (e.g., {A, B} → A).
What is a non-trivial functional dependency?
An FD where Y is not a subset of X (e.g., A → B).
What is the purpose of functional dependencies in database design?
To identify redundancy and enforce integrity constraints.
What is the relationship between functional dependencies and keys?
A key is a minimal set of attributes that functionally determines all attributes in a relation.
What is a superkey?
A set of attributes that uniquely identifies each tuple in a relation.
What is a candidate key?
A minimal superkey that uniquely identifies all attributes of a relation.
What is a primary key?
A chosen candidate key that uniquely identifies each tuple in a relation.
What is redundancy in a database?
When the same information is stored multiple times in different places.
What are the problems caused by redundancy?
Wasted storage, update anomalies, insertion anomalies, and deletion anomalies.
What is an update anomaly?
When a change in one record requires multiple updates elsewhere to maintain consistency.
What is an insertion anomaly?
When certain information cannot be added without the presence of related data.
What is a deletion anomaly?
When deleting one piece of data unintentionally removes necessary related data.
What is an Armstrong’s Axiom?
A set of rules used to derive all functional dependencies in a relation.
What are the three main Armstrong’s Axioms?
Reflexivity, augmentation, and transitivity.
What is reflexivity in functional dependencies?
If Y is a subset of X, then X → Y.
What is augmentation in functional dependencies?
If X → Y, then XZ → YZ for any attribute Z.
What is transitivity in functional dependencies?
If X → Y and Y → Z, then X → Z.
What is the closure of a set of functional dependencies?
The set of all functional dependencies that can be inferred from a given set of FDs.
How do you compute the closure of an attribute set?
Start with the attributes, apply given FDs iteratively, and include any new attributes inferred.
Why is computing closure important?
To determine if an attribute set is a key and to verify functional dependencies.
What is the minimal cover of a set of functional dependencies?
A simplified but equivalent set of FDs with no redundant attributes or dependencies.
What is an equivalence of functional dependencies?
Two sets of FDs are equivalent if they imply the same set of dependencies.