1. Home
  2. Explore
  3. Computer Science
  4. Functional Dependencies

Study methods

Flashcards
Quiz
Fill in the blanks
Written test
Lesson
Notes
Podcast
Content

Functional Dependencies

  • 61Unfamiliar
  • 0Learning
  • 0Familiar
  • 0Mastered
Topic: FD Theory

What does a functional dependency α→βα → βα→β require in every instance of a relation?

61 questions

  1. 1

    What does a functional dependency α→βα → βα→β require in every instance of a relation?

    1. A

      Every value of ααα must occur exactly once in the relation

    2. B

      Every attribute in βββ must also be an attribute in ααα

    3. C

      Any two tuples that agree on βββ must also agree on ααα

    4. D

      Any two tuples that agree on ααα must also agree on βββ

    Correct answer
    D

    Any two tuples that agree on ααα must also agree on βββ

    Explanation

    A functional dependency states that agreement on the left-hand attributes ααα forces agreement on the right-hand attributes βββ in every instance of the schema.

  2. 2

    What is the closure F+F^+F+ of a set of functional dependencies FFF?

    1. A

      The set of all attributes appearing on the right-hand sides in FFF

    2. B

      The set of dependencies in FFF that have a key on the left-hand side

    3. C

      The set of all candidate keys of the relation

    4. D

      The set of all functional dependencies implied by FFF

    Correct answer
    D

    The set of all functional dependencies implied by FFF

    Explanation

    The closure F+F^+F+ contains the dependencies that can be derived from FFF using the functional-dependency rules.

  3. 3

    Which statement best describes the reflexivity rule for functional dependencies?

    1. A

      If βββ is a subset of ααα, then α→βα → βα→β

    2. B

      If α→βα → βα→β and β→γβ → γβ→γ, then α→γα → γα→γ

    3. C

      If α→βα → βα→β, then α→αβα → αβα→αβ

    4. D

      If α→βα → βα→β and α→γα → γα→γ, then α→βγα → βγα→βγ

    Correct answer
    A

    If βββ is a subset of ααα, then α→βα → βα→β

    Explanation

    Reflexivity says that a set of attributes functionally determines any subset of itself.

  4. 4

    Which statement illustrates the augmentation rule?

    1. A

      From α→βα → βα→β, infer αγ→βγαγ → βγαγ→βγ

    2. B

      From α→βγα → βγα→βγ, infer α→βα → βα→β

    3. C

      From α→βα → βα→β and β→γβ → γβ→γ, infer α→γα → γα→γ

    4. D

      From α→βα → βα→β and α→γα → γα→γ, infer α→βγα → βγα→βγ

    Correct answer
    A

    From α→βα → βα→β, infer αγ→βγαγ → βγαγ→βγ

    Explanation

    Augmentation adds the same set of attributes to both sides of a valid dependency: from α→βα → βα→β, infer αγ→βγαγ → βγαγ→βγ.

  5. 5

    Which statement illustrates the transitivity rule?

    1. A

      From α→βα → βα→β, infer αγ→βγαγ → βγαγ→βγ

    2. B

      From α→βγα → βγα→βγ, infer α→γα → γα→γ

    3. C

      From α→βα → βα→β and β→γβ → γβ→γ, infer α→γα → γα→γ

    4. D

      From α→βα → βα→β and α→γα → γα→γ, infer α→βγα → βγα→βγ

    Correct answer
    C

    From α→βα → βα→β and β→γβ → γβ→γ, infer α→γα → γα→γ

    Explanation

    Transitivity combines dependencies in which the right-hand side of one is the left-hand side of another.

  6. 6

    What does it mean that Armstrong's three basic rules are sound and complete?

    1. A

      They apply only to dependencies whose left-hand sides are candidate keys

    2. B

      They find all candidate keys without computing attribute closures

    3. C

      They derive every dependency in a fixed order, and they always produce a minimal set

    4. D

      They derive only dependencies that are valid, and they can derive every dependency implied by the given set

    Correct answer
    D

    They derive only dependencies that are valid, and they can derive every dependency implied by the given set

    Explanation

    Soundness means the rules do not derive invalid dependencies; completeness means every dependency implied by the given dependencies can be derived using the rules.

  7. 7

    Given A→BA → BA→B and B→CB → CB→C, which additional dependency must be in the closure?

    1. A

      B→ACB → ACB→AC

    2. B

      A→CA → CA→C

    3. C

      AB→CAB → CAB→C only

    4. D

      C→AC → AC→A

    Correct answer
    B

    A→CA → CA→C

    Explanation

    By transitivity, A→BA → BA→B and B→CB → CB→C imply A→CA → CA→C.

  8. 8

    In a direct procedure for computing F+F^+F+, what should happen after applying reflexivity or augmentation to a dependency?

    1. A

      Discard the original dependencies and retain only the new ones

    2. B

      Stop as soon as one new dependency has been found

    3. C

      Add any newly derived dependencies to the working set and continue

    4. D

      Use the result only if its left-hand side is a candidate key

    Correct answer
    C

    Add any newly derived dependencies to the working set and continue

    Explanation

    The procedure starts with the given dependencies and adds newly derived dependencies, allowing later steps to use them.

  9. 9

    When can two dependencies be combined directly using transitivity in the iterative computation of F+F^+F+?

    1. A

      When the left-hand side of the first equals the right-hand side of the second

    2. B

      When the right-hand side of the first equals the left-hand side of the second

    3. C

      When the left-hand sides of both dependencies are equal

    4. D

      When the right-hand sides of both dependencies are equal

    Correct answer
    B

    When the right-hand side of the first equals the left-hand side of the second

    Explanation

    For dependencies X→YX → YX→Y and Y→ZY → ZY→Z, the matching set YYY allows transitivity to derive X→ZX → ZX→Z.

  10. 10

    Why does the iterative procedure for computing F+F^+F+ eventually terminate?

    1. A

      Every application of transitivity reduces the number of attributes in a dependency

    2. B

      Augmentation can be applied only to dependencies with single attributes

    3. C

      The procedure stops after each original dependency has been used once

    4. D

      There are only finitely many possible functional dependencies over a finite attribute set

    Correct answer
    D

    There are only finitely many possible functional dependencies over a finite attribute set

    Explanation

    With a finite set of attributes, only finitely many distinct functional dependencies are possible. The procedure stops when no new ones are added.

  11. 11

    Which conclusion follows from the union rule?

    1. A

      If α→βα → βα→β, then αγ→βγαγ → βγαγ→βγ

    2. B

      If α→βα → βα→β and α→γα → γα→γ, then α→βγα → βγα→βγ

    3. C

      If α→βα → βα→β and γβ→δγβ → δγβ→δ, then γα→δγα → δγα→δ

    4. D

      If α→βγα → βγα→βγ, then α→βα → βα→β and α→γα → γα→γ

    Correct answer
    B

    If α→βα → βα→β and α→γα → γα→γ, then α→βγα → βγα→βγ

    Explanation

    The union rule combines dependencies with the same left-hand side by joining their right-hand sides.

  12. 12

    Which conclusion follows from the decomposition rule?

    1. A

      If α→βγα → βγα→βγ, then α→βα → βα→β and α→γα → γα→γ

    2. B

      If α→βα → βα→β and α→γα → γα→γ, then α→βγα → βγα→βγ

    3. C

      If α→βα → βα→β, then αγ→βγαγ → βγαγ→βγ

    4. D

      If α→βα → βα→β and β→γβ → γβ→γ, then α→γα → γα→γ

    Correct answer
    A

    If α→βγα → βγα→βγ, then α→βα → βα→β and α→γα → γα→γ

    Explanation

    Decomposition splits a dependency with a combined right-hand side into separate dependencies for each part.

  13. 13

    Which conclusion follows from pseudo-transitivity?

    1. A

      If α→βα → βα→β and α→γα → γα→γ, then α→βγα → βγα→βγ

    2. B

      If α→βα → βα→β and γβ→δγβ → δγβ→δ, then γα→δγα → δγα→δ

    3. C

      If α→βγα → βγα→βγ, then α→βα → βα→β

    4. D

      If α→βα → βα→β and β→γβ → γβ→γ, then α→γα → γα→γ

    Correct answer
    B

    If α→βα → βα→β and γβ→δγβ → δγβ→δ, then γα→δγα → δγα→δ

    Explanation

    Pseudo-transitivity combines α→βα → βα→β with γβ→δγβ → δγβ→δ to derive γα→δγα → δγα→δ.

  14. 14

    Why are union, decomposition, and pseudo-transitivity called derived rules rather than basic Armstrong axioms?

    1. A

      They are useful only when all dependencies have a single attribute on the right

    2. B

      They apply only to decomposed schemas and not to the original schema

    3. C

      They are unsound shortcuts that require verification against every relation instance

    4. D

      They follow from the three basic axioms and are not needed to establish completeness

    Correct answer
    D

    They follow from the three basic axioms and are not needed to establish completeness

    Explanation

    The derived rules are sound because they follow from reflexivity, augmentation, and transitivity, but the three basic axioms suffice for completeness.

  15. 15

    What does the attribute closure α+α^+α+ represent with respect to FFF?

    1. A

      All functional dependencies that can be derived from ααα without using FFF

    2. B

      All attributes that can be functionally determined by ααα using dependencies in FFF

    3. C

      All attributes that functionally determine ααα under FFF

    4. D

      All candidate keys that contain ααα

    Correct answer
    B

    All attributes that can be functionally determined by ααα using dependencies in FFF

    Explanation

    The closure α+α^+α+ is the set of attributes functionally determined by ααα under the given set of dependencies FFF.

  16. 16

    Why is the initial result in an algorithm for computing α+α^+α+ set to ααα?

    1. A

      The initial set must contain every right-hand side in FFF

    2. B

      Every attribute set functionally determines its own attributes

    3. C

      A closure can include only attributes that occur in the starting set

    4. D

      The algorithm assumes that every attribute determines the entire schema

    Correct answer
    B

    Every attribute set functionally determines its own attributes

    Explanation

    By reflexivity, the attributes in ααα are functionally determined by ααα, so they belong in its closure from the start.

  17. 17

    During the computation of α+α^+α+, how should a dependency β→γβ → γβ→γ be used?

    1. A

      Add γγγ only when βββ equals the original starting set ααα

    2. B

      Add both sides only when βββ and γγγ are candidate keys

    3. C

      If βββ is already contained in the current result, add γγγ to the result

    4. D

      If γγγ is already contained in the result, add βββ to the result

    Correct answer
    C

    If βββ is already contained in the current result, add γγγ to the result

    Explanation

    If the current result contains all of βββ, then the starting set determines βββ and, by β→γβ → γβ→γ, also determines γγγ.

  18. 18

    When should an algorithm for computing α+α^+α+ stop?

    1. A

      When a full pass through the dependencies adds no new attributes

    2. B

      When every dependency in FFF has been used exactly once

    3. C

      When the result contains fewer attributes than the schema

    4. D

      When the result first contains a right-hand side from FFF

    Correct answer
    A

    When a full pass through the dependencies adds no new attributes

    Explanation

    The closure is complete when applying the dependencies no longer changes the result.

  19. 19

    Suppose FFF includes A→BA → BA→B, A→CA → CA→C, CG→HCG → HCG→H, and CG→ICG → ICG→I. What is (AG)+(AG)^+(AG)+?

    1. A

      AGBCAGBCAGBC

    2. B

      ABCHABCHABCH

    3. C

      AGBCHI

    4. D

      AGHIAGHIAGHI

    Correct answer
    C

    AGBCHI

    Explanation

    Starting with AGAGAG, the dependencies add BBB and CCC. Since CCC and GGG are then present, they add HHH and III. Thus (AG)^+ = AGBCHI.

  20. 20

    What condition makes an attribute set KKK a superkey for relation schema RRR?

    1. A

      K+K^+K+ contains only attributes that also occur in KKK

    2. B

      K+K^+K+ contains every attribute of RRR

    3. C

      KKK contains exactly one attribute from every candidate key

    4. D

      KKK is contained in the right-hand side of every dependency

    Correct answer
    B

    K+K^+K+ contains every attribute of RRR

    Explanation

    A set is a superkey if it functionally determines all attributes of the relation, which is tested by checking whether its closure covers RRR.

  21. 21

    What additional property distinguishes a candidate key from a superkey?

    1. A

      Its closure must exclude all attributes outside the key

    2. B

      It must contain every attribute that appears on a right-hand side

    3. C

      No proper subset of it is a superkey

    4. D

      It must have exactly one attribute

    Correct answer
    C

    No proper subset of it is a superkey

    Explanation

    A candidate key is a minimal superkey: it determines the whole relation, but none of its proper subsets does.

  22. 22

    Suppose (AG)+(AG)^+(AG)+ contains every attribute of RRR, but neither A+A^+A+ nor G+G^+G+ contains every attribute of RRR. What follows?

    1. A

      AGAGAG is a candidate key

    2. B

      AAA and GGG are each candidate keys

    3. C

      AGAGAG is a superkey but cannot be minimal

    4. D

      AGAGAG is not a superkey

    Correct answer
    A

    AGAGAG is a candidate key

    Explanation

    AGAGAG is a superkey because its closure covers RRR. Since neither single-attribute subset is a superkey, AGAGAG is minimal and therefore a candidate key.

  23. 23

    In the example where A+=ABCHA^+ = ABCHA+=ABCH and GGG appears on no right-hand side, why is AGAGAG minimal?

    1. A

      The relation has no functional dependencies involving either attribute

    2. B

      Neither AAA nor GGG alone determines all attributes, and GGG cannot be derived from other attributes

    3. C

      Both AAA and GGG independently determine every attribute

    4. D

      AAA does not appear on any left-hand side, while GGG determines AAA

    Correct answer
    B

    Neither AAA nor GGG alone determines all attributes, and GGG cannot be derived from other attributes

    Explanation

    A+A^+A+ does not cover the relation, and G+=GG^+ = GG+=G in the example. Also, since GGG is never on a right-hand side, a key cannot obtain GGG without including it.

  24. 24

    How can the closure of attributes be used to test whether a proposed dependency α→βα → βα→β follows from FFF?

    1. A

      Compute β+β^+β+ and check whether it contains all attributes in ααα

    2. B

      Compute α+α^+α+ and check whether it contains all attributes in βββ

    3. C

      Check whether ααα and βββ occur together in any one dependency in FFF

    4. D

      Check whether ααα is a candidate key, regardless of βββ

    Correct answer
    B

    Compute α+α^+α+ and check whether it contains all attributes in βββ

    Explanation

    α→βα → βα→β follows from FFF exactly when every attribute in βββ belongs to α+α^+α+.

  25. 25

    How can attribute closures be used to obtain F+F^+F+ over a schema with attribute set RRR?

    1. A

      Compute only the closure of each candidate key and use it as the entire F+F^+F+

    2. B

      For each attribute set γγγ, compute γ+γ^+γ+ and include dependencies γ→Sγ → Sγ→S for sets SSS contained in that closure

    3. C

      Compute the closure of the full attribute set and include only dependencies with empty right-hand sides

    4. D

      For each dependency, compute the closure of its right-hand side and reverse the dependency

    Correct answer
    B

    For each attribute set γγγ, compute γ+γ^+γ+ and include dependencies γ→Sγ → Sγ→S for sets SSS contained in that closure

    Explanation

    Computing closures for attribute sets and recording the dependencies from each set to its subsets in its closure provides a way to construct the dependencies in F+F^+F+.

  26. 26

    Which condition characterizes BCNF for a relation that is already in first normal form?

    1. A

      Every attribute belongs to exactly one candidate key

    2. B

      Every dependency in FFF has a candidate key on its right-hand side

    3. C

      Every dependency has a single attribute on each side

    4. D

      Every dependency in F+F^+F+ is trivial or has a superkey on its left-hand side

    Correct answer
    D

    Every dependency in F+F^+F+ is trivial or has a superkey on its left-hand side

    Explanation

    A relation is in BCNF when every functional dependency in its closure is trivial or its left-hand side is a superkey.

  27. 27

    When is a dependency α→βα → βα→β trivial?

    1. A

      When ααα and βββ have no attributes in common

    2. B

      When ααα is a candidate key

    3. C

      When βββ is a candidate key

    4. D

      When every attribute in βββ is also in ααα

    Correct answer
    D

    When every attribute in βββ is also in ααα

    Explanation

    A dependency is trivial when its right-hand side is a subset of its left-hand side.

  28. 28

    A relation contains the dependency department-name →→→ building, budget, but department-name is not a superkey. What does this imply?

    1. A

      The relation satisfies BCNF because the right side has more than one attribute

    2. B

      The relation violates BCNF only if building and budget are candidate keys

    3. C

      The relation satisfies BCNF because every department has a building and a budget

    4. D

      The relation violates BCNF because the dependency is nontrivial and its left side is not a superkey

    Correct answer
    D

    The relation violates BCNF because the dependency is nontrivial and its left side is not a superkey

    Explanation

    The dependency is nontrivial, and its left-hand side is not a superkey, so it violates the BCNF condition.

  29. 29

    For a BCNF-violating dependency α→βα → βα→β, which decomposition is described by the standard construction in the content?

    1. A

      R1=β−αR_1 = β − αR1​=β−α and R2=R−αR_2 = R − αR2​=R−α

    2. B

      R1=α∩βR_1 = α ∩ βR1​=α∩β and R2=R−(α∪β)R_2 = R − (α ∪ β)R2​=R−(α∪β)

    3. C

      R1=RR_1 = RR1​=R and R2=α∪βR_2 = α ∪ βR2​=α∪β

    4. D

      R1=α∪βR_1 = α ∪ βR1​=α∪β and R2=R−(β−α)R_2 = R − (β − α)R2​=R−(β−α)

    Correct answer
    D

    R1=α∪βR_1 = α ∪ βR1​=α∪β and R2=R−(β−α)R_2 = R − (β − α)R2​=R−(β−α)

    Explanation

    The first relation contains the attributes in ααα and βββ. The second retains the attributes of RRR except for the right-hand-side attributes not already in ααα.

  30. 30

    Why does the decomposition construction use β−αβ − αβ−α rather than removing all of βββ from the second relation?

    1. A

      Removing all of βββ would make the first relation trivial

    2. B

      Attributes in α∩βα ∩ βα∩β are always candidate keys and cannot be removed

    3. C

      Attributes shared by ααα and βββ are already part of the left-hand side and must remain in the second schema

    4. D

      The right-hand side must be excluded from both resulting schemas

    Correct answer
    C

    Attributes shared by ααα and βββ are already part of the left-hand side and must remain in the second schema

    Explanation

    Only the right-hand-side attributes not already in ααα are removed from the second schema; shared attributes remain because they are part of the left-hand side.

  31. 31

    If an instructor-department relation has department-name →→→ building, budget, what is the relation formed from α∪βα ∪ βα∪β in the BCNF decomposition?

    1. A

      A relation containing only building and budget

    2. B

      A relation containing instructor ID and department-name only

    3. C

      An instructor relation containing instructor ID, name, and salary

    4. D

      A department relation containing department-name, building, and budget

    Correct answer
    D

    A department relation containing department-name, building, and budget

    Explanation

    For this violating dependency, ααα is department-name and βββ is building and budget, so α∪βα ∪ βα∪β forms the department relation with those three attributes.

  32. 32

    Why can the instructor relation and department relation in the example each satisfy BCNF?

    1. A

      The decomposition removes every attribute that occurs in a dependency

    2. B

      Neither relation contains any functional dependencies

    3. C

      Their nontrivial dependencies have superkeys on their left-hand sides

    4. D

      Every right-hand-side attribute is also a candidate key

    Correct answer
    C

    Their nontrivial dependencies have superkeys on their left-hand sides

    Explanation

    The instructor relation has instructor ID determining its other attributes, and the department relation has department-name determining building and budget. Each left-hand side is a key of its relation.

  33. 33

    What does it mean for a decomposition of RRR into R1R_1R1​ and R2R_2R2​ to be lossless?

    1. A

      Joining the projections of every instance of RRR reconstructs exactly that instance

    2. B

      Every dependency of RRR can be checked in one decomposed relation

    3. C

      The two relations contain no common attributes

    4. D

      The decomposition produces fewer tuples than the original relation

    Correct answer
    A

    Joining the projections of every instance of RRR reconstructs exactly that instance

    Explanation

    A lossless decomposition allows the original relation to be recovered exactly by joining the decomposed relations, without losing or adding tuples.

  34. 34

    Which attribute coverage condition is required for a decomposition of RRR into R1R_1R1​ and R2R_2R2​ to be lossless?

    1. A

      R1⊆R2R_1 ⊆ R_2R1​⊆R2​

    2. B

      R1∪R2R_1 ∪ R_2R1​∪R2​ must contain attributes not in RRR

    3. C

      R1∩R2=∅R_1 ∩ R_2 = ∅R1​∩R2​=∅

    4. D

      R1∪R2=RR_1 ∪ R_2 = RR1​∪R2​=R

    Correct answer
    D

    R1∪R2=RR_1 ∪ R_2 = RR1​∪R2​=R

    Explanation

    The union of the decomposed schemas must cover every attribute of the original schema.

  35. 35

    Which additional condition is part of the lossless-decomposition test described in the content?

    1. A

      The common attributes must be absent from both decomposed relations

    2. B

      The common attributes must determine only attributes outside both relations

    3. C

      The common attributes must be a candidate key of the original relation

    4. D

      The common attributes R1∩R2R_1 ∩ R_2R1​∩R2​ must be a key in at least one of the two relations

    Correct answer
    D

    The common attributes R1∩R2R_1 ∩ R_2R1​∩R2​ must be a key in at least one of the two relations

    Explanation

    The intersection of the two schemas must be a key for at least one of them. Together with attribute coverage and a nonempty intersection, this ensures a lossless join under the stated test.

  36. 36

    Why does having a key in the intersection help prevent spurious tuples after a natural join?

    1. A

      A key in the intersection ensures that the two relations have no matching tuples

    2. B

      Each matching value on the intersection identifies at most one corresponding tuple in the relation where it is a key

    3. C

      It makes natural join equivalent to taking the Cartesian product

    4. D

      It forces all attributes in the original relation to be identical

    Correct answer
    B

    Each matching value on the intersection identifies at most one corresponding tuple in the relation where it is a key

    Explanation

    If the common attributes are a key in one relation, a tuple from the other relation can match at most one tuple there, preventing extra combinations from being introduced by the join.

  37. 37

    In the instructor-department decomposition, why is the join lossless when department-name is the common attribute and a key of the department relation?

    1. A

      Department-name is absent from the instructor relation

    2. B

      The instructor relation contains every department attribute

    3. C

      The natural join removes all tuples with repeated department names

    4. D

      Each instructor's department-name matches a unique department tuple

    Correct answer
    D

    Each instructor's department-name matches a unique department tuple

    Explanation

    Because department-name uniquely identifies a department tuple, each instructor tuple can be joined to at most one department tuple.

  38. 38

    Why can lossless joining work in either direction when either relation's intersection is a key?

    1. A

      Symmetry means both relations must have identical schemas

    2. B

      A key makes the natural join ignore the common attributes

    3. C

      Natural join is symmetric, so either relation can supply the unique match

    4. D

      The relation with fewer attributes always determines the other relation

    Correct answer
    C

    Natural join is symmetric, so either relation can supply the unique match

    Explanation

    Natural join is symmetric. If the common attributes form a key in either relation, that side supplies unique matches when the relations are joined.

  39. 39

    What does it mean for a decomposition to preserve functional dependencies?

    1. A

      Every dependency becomes trivial in at least one decomposed relation

    2. B

      The decomposition preserves only dependencies whose left-hand sides are candidate keys

    3. C

      The original relation can be reconstructed without a join

    4. D

      The dependencies can be checked on the individual decomposed relations without joining them

    Correct answer
    D

    The dependencies can be checked on the individual decomposed relations without joining them

    Explanation

    Dependency preservation means dependencies can be enforced by checking the decomposed relations individually, rather than first joining them.

  40. 40

    Why is dependency preservation desirable in database design?

    1. A

      It guarantees that no relation contains redundant data

    2. B

      It eliminates the need for a lossless join

    3. C

      Checking dependencies may otherwise require an expensive join

    4. D

      It makes every decomposed relation a candidate key

    Correct answer
    C

    Checking dependencies may otherwise require an expensive join

    Explanation

    If a dependency can be checked only after joining relations, enforcement may require an expensive operation, so checking dependencies locally is preferable.

  41. 41

    For a schema with attributes city, street, and ZIP code, suppose CS→ZCS → ZCS→Z and Z→CZ → CZ→C. Why does Z→CZ → CZ→C violate BCNF?

    1. A

      Z→CZ → CZ→C is trivial because city is part of the ZIP code

    2. B

      ZZZ is a superkey because CSCSCS is a key

    3. C

      Z→CZ → CZ→C is nontrivial, and ZZZ is not a superkey

    4. D

      CS→ZCS → ZCS→Z is not a functional dependency

    Correct answer
    C

    Z→CZ → CZ→C is nontrivial, and ZZZ is not a superkey

    Explanation

    The dependency Z→CZ → CZ→C is nontrivial, and the content identifies CSCSCS, not ZZZ, as the key. Therefore, its left-hand side is not a superkey.

  42. 42

    What decomposition results from applying the BCNF construction to Z→CZ → CZ→C in the schema CSZCSZCSZ?

    1. A

      ZCZCZC and SZSZSZ

    2. B

      CSZCSZCSZ and CCC

    3. C

      CSCSCS and CZCZCZ

    4. D

      ZZZ and CSCSCS

    Correct answer
    A

    ZCZCZC and SZSZSZ

    Explanation

    The first schema is ZCZCZC, formed from the determinant and dependent attributes. Removing CCC from CSZCSZCSZ leaves SZSZSZ as the second schema.

  43. 43

    Why is the decomposition into ZCZCZC and SZSZSZ lossless under the stated test?

    1. A

      Their intersection is empty, so no tuples can be combined incorrectly

    2. B

      CSCSCS is a key of both decomposed relations

    3. C

      Their intersection is ZZZ, and ZZZ determines the entire ZCZCZC relation

    4. D

      The dependency CS→ZCS → ZCS→Z is preserved in ZCZCZC

    Correct answer
    C

    Their intersection is ZZZ, and ZZZ determines the entire ZCZCZC relation

    Explanation

    The relations share ZZZ. Since Z→CZ → CZ→C, it determines ZCZCZC, making the intersection a key of that relation and satisfying the lossless-join condition.

  44. 44

    Why is the dependency CS→ZCS → ZCS→Z not preserved by the decomposition into ZCZCZC and SZSZSZ?

    1. A

      Its left-hand side is not a key of the original schema

    2. B

      It is contradicted by the dependency Z→CZ → CZ→C

    3. C

      It is trivial in ZCZCZC but not in SZSZSZ

    4. D

      It involves attributes from both relations and cannot be checked in either one alone

    Correct answer
    D

    It involves attributes from both relations and cannot be checked in either one alone

    Explanation

    Neither decomposed relation contains all three attributes CCC, SSS, and ZZZ, so checking CS→ZCS → ZCS→Z requires reconstructing the larger relation by joining.

  45. 45

    Which condition defines third normal form in the content?

    1. A

      For each nontrivial dependency α→βα → βα→β, every attribute in β−αβ − αβ−α belongs to some candidate key

    2. B

      For every dependency α→βα → βα→β, ααα must be a candidate key

    3. C

      Every dependency must be trivial or have a superkey on its right-hand side

    4. D

      Every attribute on a right-hand side must be outside every candidate key

    Correct answer
    A

    For each nontrivial dependency α→βα → βα→β, every attribute in β−αβ − αβ−α belongs to some candidate key

    Explanation

    Third normal form retains the trivial-dependency and superkey conditions, while also allowing each attribute in the nontrivial right-hand side to be part of a candidate key.

  46. 46

    In the additional third-normal-form condition, must all attributes in β−αβ − αβ−α belong to the same candidate key?

    1. A

      Yes; all must belong to one particular candidate key

    2. B

      No; none of them may belong to a candidate key

    3. C

      No; each attribute may belong to a different candidate key

    4. D

      Yes; but only when the left-hand side is a superkey

    Correct answer
    C

    No; each attribute may belong to a different candidate key

    Explanation

    The condition is satisfied if each attribute in β−αβ − αβ−α belongs to some candidate key; those attributes need not belong to the same key.

  47. 47

    What is the relationship between BCNF and third normal form?

    1. A

      Every BCNF relation is in third normal form, but a third-normal-form relation need not be in BCNF

    2. B

      BCNF and third normal form are equivalent

    3. C

      Every third-normal-form relation is in BCNF, but a BCNF relation need not be in third normal form

    4. D

      Neither normal form implies the other

    Correct answer
    A

    Every BCNF relation is in third normal form, but a third-normal-form relation need not be in BCNF

    Explanation

    BCNF satisfies the first two third-normal-form conditions, so BCNF implies third normal form. The additional third-normal-form relaxation means the converse does not always hold.

  48. 48

    Why is third normal form described as a relaxation of BCNF?

    1. A

      It permits dependencies that are not functionally valid

    2. B

      It requires fewer attributes to be covered by a decomposition

    3. C

      It permits certain dependencies whose left-hand sides are not superkeys when the right-side attributes belong to candidate keys

    4. D

      It does not require relations to be in first normal form

    Correct answer
    C

    It permits certain dependencies whose left-hand sides are not superkeys when the right-side attributes belong to candidate keys

    Explanation

    Third normal form adds an alternative condition for attributes in the nontrivial right-hand side, allowing some dependencies that BCNF would reject.

  49. 49

    Which set of goals best describes normalization and decomposition?

    1. A

      Maximize the number of candidate keys while retaining redundancy

    2. B

      Eliminate every functional dependency and avoid all joins

    3. C

      Minimize the number of relations, regardless of information loss

    4. D

      Make schemas well-structured, ensure lossless reconstruction, and preferably preserve dependencies

    Correct answer
    D

    Make schemas well-structured, ensure lossless reconstruction, and preferably preserve dependencies

    Explanation

    Normalization aims for good schema design, lossless decomposition, and preferably dependency preservation.

  50. 50

    Which problem is specifically addressed by requiring a decomposition to be lossless?

    1. A

      The possibility that some queries become slower

    2. B

      The possibility that the original relation cannot be reconstructed exactly

    3. C

      The possibility that attributes belong to multiple candidate keys

    4. D

      The possibility that dependency checks require a join

    Correct answer
    B

    The possibility that the original relation cannot be reconstructed exactly

    Explanation

    Lossless decomposition ensures the original information can be recovered by joining the decomposed relations.

  51. 51

    Which problem is specifically addressed by dependency preservation?

    1. A

      The need to join decomposed relations merely to check a dependency

    2. B

      The inability to recover the original tuples after decomposition

    3. C

      The fact that a relation must satisfy first normal form

    4. D

      The presence of attributes in more than one candidate key

    Correct answer
    A

    The need to join decomposed relations merely to check a dependency

    Explanation

    Dependency preservation allows constraints to be checked on the individual relations rather than requiring a potentially expensive join.

  52. 52

    How can decomposition affect query performance even when it improves normalization?

    1. A

      Some queries may need joins that were not required when the data was stored together

    2. B

      A lossless decomposition prevents queries from reading the decomposed relations

    3. C

      Every query becomes faster because each relation has fewer attributes

    4. D

      Queries can no longer use functional dependencies

    Correct answer
    A

    Some queries may need joins that were not required when the data was stored together

    Explanation

    A query that previously read one relation may need to join multiple decomposed relations, increasing its cost.

  53. 53

    After separating instructor and department information, how would a query for an instructor's department building typically retrieve the building?

    1. A

      Read the building directly from the instructor relation without a join

    2. B

      Compute the instructor's attribute closure at query time

    3. C

      Join the instructor relation with the department relation using department-name

    4. D

      Join the instructor relation with itself using instructor ID

    Correct answer
    C

    Join the instructor relation with the department relation using department-name

    Explanation

    The building is stored in the department relation, while the instructor's department-name is in the instructor relation, so retrieving the building requires a join.

  54. 54

    What tradeoff may arise when choosing among possible decompositions?

    1. A

      Lossless decomposition necessarily increases insertion anomalies

    2. B

      Preserving dependencies always makes every query cheaper

    3. C

      A schema in BCNF cannot preserve any information

    4. D

      Reducing redundancy may require more joins and can make some queries more expensive

    Correct answer
    D

    Reducing redundancy may require more joins and can make some queries more expensive

    Explanation

    Design choices balance concerns such as redundancy and anomalies against the cost of joins and queries after decomposition.

  55. 55

    Why can a relation with no nontrivial functional dependencies still have serious redundancy?

    1. A

      The absence of dependencies forces every attribute to have the same value

    2. B

      Every relation with no dependencies must contain a candidate key for each tuple

    3. C

      Functional dependencies measure query cost rather than data redundancy

    4. D

      Independent multivalued facts can be repeated in combinations even when no functional dependency holds

    Correct answer
    D

    Independent multivalued facts can be repeated in combinations even when no functional dependency holds

    Explanation

    Independent facts, such as an instructor's children and phone numbers, can generate repeated combinations without any nontrivial functional dependency.

  56. 56

    An instructor has multiple children and multiple phone numbers, and the relation stores instructor ID, child name, and phone. Why can adding one phone number require multiple tuple insertions?

    1. A

      The relation's BCNF status forbids storing a new phone by itself

    2. B

      Each phone number must be stored once for every instructor in the database

    3. C

      The phone number may need to be paired with each of the instructor's child values

    4. D

      A phone number must functionally determine every child's name

    Correct answer
    C

    The phone number may need to be paired with each of the instructor's child values

    Explanation

    When child and phone facts are combined in tuples, a new phone may need to be repeated across tuples for the instructor's multiple children.

  57. 57

    Why can updating a phone number in the instructor-child-phone relation require repeated updates?

    1. A

      A phone number is necessarily a candidate key for the whole relation

    2. B

      BCNF requires every phone number to appear exactly twice

    3. C

      The relation has no attributes that can identify an instructor

    4. D

      The same phone value may occur in multiple tuples paired with different children

    Correct answer
    D

    The same phone value may occur in multiple tuples paired with different children

    Explanation

    Because the same instructor phone can be repeated in several child-phone combinations, an update may have to change multiple tuples.

  58. 58

    Why does the instructor-child-phone example show that BCNF alone may not eliminate all undesirable redundancy?

    1. A

      The relation can have no nontrivial functional dependencies and still repeat combinations of independent multivalued facts

    2. B

      BCNF permits every nontrivial dependency whose left-hand side is a candidate key

    3. C

      BCNF applies only to relations with a single-valued phone attribute

    4. D

      The relation violates BCNF because instructor ID determines the phone number

    Correct answer
    A

    The relation can have no nontrivial functional dependencies and still repeat combinations of independent multivalued facts

    Explanation

    The example can satisfy BCNF because it has no nontrivial functional dependencies, yet the independent child and phone facts still create redundancy and anomalies.

  59. 59

    How does separating child information from phone information help in the instructor example?

    1. A

      It combines all children and phones into a single tuple per instructor

    2. B

      It stores the instructor's children and phones in separate relations, avoiding repeated child-phone combinations

    3. C

      It removes the need to represent multiple children or multiple phones

    4. D

      It makes each child determine every phone number

    Correct answer
    B

    It stores the instructor's children and phones in separate relations, avoiding repeated child-phone combinations

    Explanation

    Separate relations represent the instructor's child values and phone values independently, preventing unnecessary repetitions of their combinations.

  60. 60

    Why would moving from BCNF to third normal form not solve the instructor-child-phone redundancy problem?

    1. A

      Third normal form requires all children to share one phone number

    2. B

      The relation cannot be in third normal form if it is in BCNF

    3. C

      Third normal form forbids decomposing relations with multivalued facts

    4. D

      The relation already has no nontrivial functional dependencies, so the problem is not addressed by those dependency conditions

    Correct answer
    D

    The relation already has no nontrivial functional dependencies, so the problem is not addressed by those dependency conditions

    Explanation

    The relation is already in BCNF and therefore in third normal form. Its redundancy comes from independent multivalued facts, not from a violating functional dependency.

  61. 61

    Which higher normal form is identified as relevant to the independent multiple-children and multiple-phones problem?

    1. A

      Second normal form

    2. B

      First normal form

    3. C

      Third normal form

    4. D

      Fourth normal form

    Correct answer
    D

    Fourth normal form

    Explanation

    The content points to fourth normal form as a higher normal form relevant to redundancy caused by independent multivalued facts.

Question 1 of 61
Question 1 of 61

Ask anything

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

FlashcardsQuizFill in the blanksWritten testLessonNotesPodcastContent