Functional Dependencies
- 57Unfamiliar
- 0Learning
- 0Familiar
- 0Mastered
What does a functional dependency, such as α→β, mean for tuples in a relation?
57 questions
- 1
What does a functional dependency, such as α→β, mean for tuples in a relation?
Model answer
Whenever two tuples agree on the attributes in α, they must also agree on the attributes in β.
Explanation
A functional dependency expresses a constraint that holds for every instance of the relational schema.
- 2
How can you determine whether a functional dependency holds in a relation instance?
Model answer
Check every pair of tuples: if they match on the left-hand-side attributes, they must match on the right-hand-side attributes.
Explanation
This pairwise condition is the defining rule for a functional dependency.
- 3
Which three Armstrong axioms can be used to infer functional dependencies?
Model answer
They are reflexivity, augmentation, and transitivity.
Explanation
These three basic rules form the foundation for deriving additional functional dependencies.
- 4
What does it mean that Armstrong's axioms are sound and complete?
Model answer
Soundness means the axioms derive only dependencies that follow from the given ones; completeness means they can derive every dependency that follows from them.
Explanation
Together, these properties establish that the axioms provide a correct and sufficient inference system for functional dependencies.
- 5
What is the closure set F+ of a set of functional dependencies F?
Model answer
F+ is the set of all functional dependencies that can be inferred from F using Armstrong's axioms.
Explanation
The closure includes the original dependencies and every additional dependency implied by them.
- 6
If A→B and B→C are given, what new dependency follows, and by which axiom?
Model answer
A→C follows by transitivity.
Explanation
Any agreement on A implies agreement on B, which in turn implies agreement on C.
- 7
If A→C, what dependency follows by augmenting both sides with G?
Model answer
AG→CG follows by augmentation.
Explanation
Augmentation adds the same attribute set to both sides of a functional dependency.
- 8
Given A→C, CG→I, and the augmentation rule, how can you derive AG→I?
Model answer
First derive AG→CG by augmentation, then combine it with CG→I by transitivity to obtain AG→I.
Explanation
The right-hand side of the first dependency matches the left-hand side of the second, so transitivity applies.
- 9
State the union rule for functional dependencies.
Model answer
If α→β and α→γ, then α→βγ.
Explanation
When the left-hand sides are identical, their right-hand sides can be combined into one dependency.
- 10
State the decomposition rule for functional dependencies.
Model answer
If α→βγ, then both α→β and α→γ follow.
Explanation
Decomposition splits a dependency with a combined right-hand side into separate dependencies.
- 11
State the pseudo-transitivity rule for functional dependencies.
Model answer
If α→β and γβ→δ, then γα→δ.
Explanation
The first dependency supplies β from α, allowing the second dependency to be applied when γ is also known.
- 12
Why are union, decomposition, and pseudo-transitivity called derived rules rather than basic Armstrong axioms?
Model answer
They can be proved from reflexivity, augmentation, and transitivity, so they are consequences of the three basic axioms.
Explanation
The derived rules are sound and useful, but they are not needed as additional axioms for completeness.
- 13
What is the attribute closure α+ of an attribute set α with respect to F?
Model answer
It is the set of all attributes that can be functionally determined by α using the dependencies in F.
Explanation
The closure describes the attributes reachable from α by repeatedly applying the given functional dependencies.
- 14
Why must an attribute closure be specified with respect to a set of functional dependencies?
Model answer
The attributes that can be inferred from a starting set depend on which functional dependencies are available.
Explanation
Thus, α+ is always computed relative to a particular dependency set such as F.
- 15
How is an attribute-closure computation initialized?
Model answer
Initialize the result to the starting attribute set α.
Explanation
Every attribute in α is trivially determined by α, so it belongs in the closure.
- 16
What update should be made during the computation of α+ when β→γ is in F and β is already in the result?
Model answer
Add the attributes in γ to the result.
Explanation
The current result already contains the attributes needed to determine β, and β determines γ.
- 17
Why can a closure algorithm add γ when the current result contains β and β→γ is given?
Model answer
The starting set determines the current result, so it determines β; since β determines γ, transitivity shows that the starting set determines γ.
Explanation
This is the reasoning that justifies adding newly implied attributes to the closure.
- 18
When does the iterative computation of an attribute closure stop?
Model answer
It stops when another pass through the dependencies adds no new attributes.
Explanation
At that point the result no longer changes, so the complete closure has been found.
- 19
Using the dependencies in the example, what attributes are added when computing (AG)+?
Model answer
Starting with AG, add B and C using dependencies from A, then add H and I using dependencies from CG; the closure is ABCGHI.
Explanation
Once C has been added, the current set contains CG, which determines both H and I.
- 20
How can attribute closure be used to determine whether a set of attributes is a superkey?
Model answer
A set is a superkey if its closure contains every attribute of the relation.
Explanation
Containing the whole relation in the closure means the set functionally determines every attribute.
- 21
What two properties must be checked to determine whether a superkey is a candidate key?
Model answer
It must be a superkey and it must be minimal, meaning none of its proper subsets is a superkey.
Explanation
A candidate key is a minimal superkey, not merely any set that determines the whole relation.
- 22
In the example where AG is a proposed key, what does computing A+ show?
Model answer
A+ contains A, B, C, and H, but not all attributes of the relation, so A alone is not a superkey.
Explanation
The dependencies from A yield B and C, and those allow H to be obtained, but the closure does not cover the whole relation.
- 23
Why must every key in the example include attribute G?
Model answer
Because G does not appear on the right-hand side of any given functional dependency, it cannot be derived from other attributes.
Explanation
An attribute that cannot be obtained from other attributes must be included in any set that determines the whole relation.
- 24
How can you test whether a proposed dependency α→β follows from F without computing all of F+?
Model answer
Compute α+ and check whether it contains every attribute in β.
Explanation
The dependency follows exactly when the closure of its left-hand side includes its right-hand side.
- 25
How can attribute closures be used to compute the functional-dependency closure F+?
Model answer
Compute the closure of each relevant attribute set, then include dependencies from each starting set to the attributes in its closure.
Explanation
Collecting the dependencies implied by these closures provides an alternative way to obtain F+.
- 26
What are the two requirements for a relation to be in BCNF with respect to a set of functional dependencies?
Model answer
The relation must be in first normal form, and every dependency in the closure must be trivial or have a superkey on its left-hand side.
Explanation
A dependency is trivial when its right-hand side is a subset of its left-hand side; otherwise, BCNF requires the determinant to be a superkey.
- 27
Why does the instructor-with-department relation violate BCNF when department name determines building and budget?
Model answer
The dependency is nontrivial, but department name is not a superkey of the combined relation.
Explanation
It therefore satisfies neither of the alternatives required by BCNF.
- 28
What general action is taken when a functional dependency violates BCNF?
Model answer
Decompose the relation using the violating dependency.
Explanation
The decomposition separates the attributes determined by the violating dependency into a smaller relation.
- 29
For a violating dependency α→β on schema R, how are the two schemas in the described BCNF decomposition formed?
Model answer
Form one schema as α∪β and the other as R−(β−α).
Explanation
The second schema removes only the attributes on the right-hand side that are not already in α.
- 30
How does the instructor-with-department relation decompose using department name determining building and budget?
Model answer
One relation contains department name, building, and budget; the other is the instructor relation containing ID, name, salary, and department name.
Explanation
The department attributes determined by department name form one schema, while building and budget are removed from the original combined schema.
- 31
Why are the resulting instructor and department relations in BCNF in the example?
Model answer
Their nontrivial dependencies have a key on the left-hand side: instructor ID determines the instructor attributes, and department name determines the department attributes.
Explanation
Each relation therefore satisfies the BCNF requirement for every nontrivial dependency described.
- 32
What does it mean for a decomposition of R into R1 and R2 to be lossless?
Model answer
For every possible instance, naturally joining the decomposed relations reconstructs exactly the original relation, without losing or adding tuples.
Explanation
A lossy decomposition can produce extra combinations when the decomposed relations are joined.
- 33
What schema-coverage and overlap conditions are part of the stated lossless-join test?
Model answer
The union of the decomposed schemas must cover all attributes of the original schema, and the schemas must share at least one attribute.
Explanation
The common attributes provide the basis for joining, while the union condition ensures the original attributes are represented.
- 34
What key condition on the common attributes guarantees lossless joining under the stated test?
Model answer
The intersection R1∩R2 must be a key of at least one of the two relations.
Explanation
A key on the intersection prevents the join from matching one tuple with multiple competing tuples on that side.
- 35
Why is the instructor-and-department decomposition lossless in the example?
Model answer
The relations share department name, which is a key in the department relation.
Explanation
The shared attribute identifies a unique department tuple to join with each matching instructor tuple.
- 36
What does it mean for a decomposition to preserve functional dependencies?
Model answer
Every dependency can be checked using the decomposed relations individually, without joining them back into a larger relation.
Explanation
Dependency preservation allows constraints to be verified within the smaller relations.
- 37
Why is dependency preservation desirable in a database design?
Model answer
If checking a dependency requires joining decomposed relations, constraint checking can be expensive.
Explanation
Natural joins can require substantial computation, so being able to check dependencies on individual relations is preferable.
- 38
In the example with city, street, and ZIP code, which dependencies are given, and which attribute set is a key?
Model answer
The dependencies are CS→Z and Z→C, and CS is a key.
Explanation
Here C, S, and Z denote city, street, and ZIP code; together, city and street determine all three attributes.
- 39
Why does the dependency Z→C violate BCNF in the city-street-ZIP relation?
Model answer
It is nontrivial, and Z is not a superkey of the relation.
Explanation
The dependency therefore fails both alternatives in the BCNF condition.
- 40
What two relations result from decomposing the city-street-ZIP schema using Z→C?
Model answer
The decomposition produces ZC and SZ.
Explanation
The first schema is the union of the determinant and dependent attributes; the second removes the dependent attribute not already in the determinant.
- 41
Why is the ZC, SZ decomposition lossless under the stated criterion?
Model answer
The relations intersect on Z, and Z determines ZC, making the intersection a key for the ZC relation.
Explanation
The schemas also cover the original attributes and have a nonempty intersection, so they meet the stated lossless-join conditions.
- 42
Why is the ZC, SZ decomposition not dependency-preserving?
Model answer
The dependency CS→Z cannot be checked in either relation alone because it involves attributes from both.
Explanation
Checking that dependency requires joining the decomposed relations to recover the original three-attribute schema.
- 43
What are the first two alternatives in the third normal form condition described in the content?
Model answer
For every dependency in the closure, it must be trivial or its left-hand side must be a superkey.
Explanation
These are the same two alternatives used in the stated BCNF condition.
- 44
What additional condition distinguishes the described third normal form rule from BCNF?
Model answer
Each attribute on the nontrivial part of the right-hand side must belong to some candidate key of the relation.
Explanation
This condition provides an alternative for dependencies whose left-hand side is not a superkey.
- 45
Must all the attributes on the nontrivial right-hand side of a dependency belong to the same candidate key for the stated 3NF condition?
Model answer
No. Each attribute may belong to a candidate key, and those candidate keys need not be the same.
Explanation
The condition is satisfied even if different right-hand-side attributes are contained in different candidate keys.
- 46
What is the relationship between BCNF and third normal form in the described conditions?
Model answer
Every BCNF relation is in third normal form, but a relation in third normal form need not be in BCNF.
Explanation
BCNF satisfies the first two 3NF alternatives, while 3NF also permits its candidate-key-based relaxation.
- 47
What design goals should a decomposition aim to achieve?
Model answer
Each resulting schema should be in a good normal form, the decomposition should be lossless, and it should preferably preserve dependencies.
Explanation
These goals seek to reduce design problems without losing the ability to reconstruct data or enforce constraints.
- 48
What problem can occur if a decomposition is lossy?
Model answer
It may be impossible to reconstruct the original relation correctly from the decomposed relations.
Explanation
A lossy join can fail to reproduce the original data exactly and may introduce extra combinations.
- 49
How can decomposition make dependency checking more expensive?
Model answer
A dependency may no longer be checkable in one decomposed relation, so the system may need to join relations before checking it.
Explanation
The need for joins to verify constraints is one reason dependency preservation matters.
- 50
Why can queries become more expensive after decomposition?
Model answer
A query that could use one original relation may need to retrieve data from multiple decomposed relations and join them.
Explanation
For example, finding an instructor's building after the instructor-department decomposition requires consulting the department relation as well.
- 51
Why may database design require trade-offs among normalization goals?
Model answer
Decomposition can reduce redundancy and anomalies but may increase query or constraint-checking costs; keeping relations less decomposed can retain those costs in the opposite direction.
Explanation
Designers must weigh the consequences of redundancy, reconstruction, dependency checking, and query performance.
- 52
How can a relation be in BCNF yet still contain substantial redundancy involving instructor children and phone numbers?
Model answer
If each instructor can have multiple children and multiple phones, combinations of those independent facts can be repeated even when there are no nontrivial functional dependencies.
Explanation
The example relation stores instructor ID, child name, and phone, and the repetition arises from the multiple values rather than from a functional dependency.
- 53
Why does the instructor-child-phone relation satisfy BCNF despite its redundancy?
Model answer
It has no nontrivial functional dependencies, so there is no nontrivial dependency that violates the BCNF condition.
Explanation
BCNF checks functional dependencies and therefore does not detect this source of redundancy.
- 54
What insertion and update anomalies can arise in the instructor-child-phone example?
Model answer
Adding a phone number may require multiple tuples when an instructor has multiple children, and updating repeated information may require changes in multiple tuples.
Explanation
The same instructor information is repeated across combinations of children and phone numbers.
- 55
How can decomposing the instructor-child-phone relation reduce the described anomalies?
Model answer
Store children in one relation and phone numbers in another, so each kind of multiple-valued information is represented separately.
Explanation
Separating the independent facts avoids repeating every child-phone combination in one table.
- 56
What does this example show about the limits of BCNF and third normal form?
Model answer
A relation can already be in BCNF, and therefore also in third normal form, while still having redundancy and anomalies that these forms do not remove.
Explanation
The example's redundancy is not captured by nontrivial functional dependencies.
- 57
Which higher normal form is identified as relevant to the instructor-child-phone problem?
Model answer
Fourth normal form is identified as a higher normal form that addresses this kind of problem.
Explanation
The example motivates considering normal forms beyond BCNF and third normal form.

Ask anything
We've read this whole study set, so questions about it get the best answers.