ABHYAS PREP: COMPUTER SCIENCE MCQS · DBMS: KEYS AND NORMALISATION

DBMS: Keys and Normalisation

Functional dependencies, keys, 1NF to BCNF, lossless decomposition.

Loading practice…

Worked examples

Example 1 · level 1

Consider relation R(A, B, C) with functional dependencies A → B and B → C. Which of the following functional dependencies is logically implied by the given set?

  1. A → C
  2. C → A
  3. B → A
  4. A → B
Show solution
  1. Compute the closure of A: A⁺ = {A, B, C} using A → B and B → C.
  2. Since C ∈ A⁺, the dependency A → C holds by definition of closure.
  3. No other attribute set yields the reverse dependencies.

Answer: A → C

Example 2 · level 2

Relation R(A, B, C, D) has functional dependencies A → B, C → D, and AC → B. Which of the following attribute sets is a super key but not a candidate key?

  1. AC
  2. ABC
  3. A
  4. B
Show solution
  1. Find candidate keys by computing closures: AC⁺ = {A, C, B, D} = all attributes, and no subset of AC is a key.
  2. A super key is any superset of a candidate key. ABC contains AC, so it is a super key.
  3. Since ABC has a proper subset (AC) that is a key, ABC is not minimal and therefore not a candidate key.

Answer: ABC

Example 3 · level 3

Relation R(A, B, C, D) has functional dependencies A → B, C → D. It is decomposed into R1(A, B) and R2(C, D). Which of the following statements is true about this decomposition?

  1. The decomposition is lossless‑join but does not preserve dependencies.
  2. The decomposition preserves dependencies but is not lossless‑join.
  3. The decomposition is both lossless‑join and dependency preserving.
  4. The decomposition is neither lossless‑join nor dependency preserving.
Show solution
  1. Compute intersection of R1 and R2 → empty set.
  2. Lossless join needs (R1 ∩ R2) → R1 or (R1 ∩ R2) → R2; empty set cannot determine anything → not lossless.
  3. Project FDs: R1 keeps A → B, R2 keeps C → D → all original FDs preserved.
  4. Hence dependency preserving but not lossless.

Answer: The decomposition preserves dependencies but is not lossless‑join.

Search by task, format or tool name.