DatabasesLesson 2 of 2 in the course Database design and normalization

Functional Dependencies: Inference, Keys, and Schema Design

5 flashcards · 5 quiz questions · 5 match pairs · 5 fill-in sentences · English

Lesson progress
0 / 5

Your progress is kept in this browser only.Sign up to save it

Summary

Functional dependencies describe how values in one or more attributes determine values in other attributes. They are essential for identifying keys, representing real-world rules, and designing reliable relational tables.

A functional dependency (FD) is a constraint between attribute sets in a relation. For a relation RR and attribute sets XX and YY, the notation X→YX \to Y means that each value of XX is associated with exactly one value of YY.

All flashcards

What is a functional dependency?
It is a constraint stating that values of one attribute set determine values of another. If two tuples agree on the determinant, they must agree on the dependent attributes.
What are the determinant and dependent?
The determinant is the attribute set on the left of an FD; the dependent is the attribute set on the right. In X→YX \to Y, X determines Y.
What makes an FD trivial?
An FD X→YX \to Y is trivial when YY is a subset of XX, such as {A,B}→A\{A,B\} \to A.
What is the difference between a candidate key and a superkey?
Both determine every attribute in the relation. A candidate key is minimal, while a superkey may include unnecessary attributes.
Why does VIN→EngineCapacityVIN \to EngineCapacity not imply the reverse?
A VIN identifies one vehicle and therefore its capacity, but several vehicles may have the same capacity. Thus capacity need not identify a unique VIN.

Quiz questions

  1. What does it mean that Armstrong’s axioms are sound and complete for functional-dependency inference?Answer: They derive only valid consequences and can derive every logically implied dependency.
  2. For a relation with attribute set U and functional dependencies F, what does X+=UX^+ = U establish?Answer: X is a superkey for the relation.
  3. When do two functional-dependency sets F and G have equivalent meaning?Answer: When they imply exactly the same dependencies, so F+=G+F^+ = G^+.
  4. If a relation R satisfies X→YX \to Y and ZZ contains its remaining attributes, which decomposition is lossless by Heath’s theorem?Answer: The projections on XYXY and XZXZ, joined on their shared attributes.
  5. What is a main purpose of normalization in relational database design?Answer: To reduce redundancy and undesirable update, insertion, and deletion anomalies.

Based on the Wikipedia article Functional dependency, licensed CC BY-SA 4.0. Adapted into a summary, flashcards and quizzes.

All Databases lessons