ITPEC FE Morning October 2020 Question 25

Source exam: ITPEC FE Morning October 2020Topic: Databases

ITPEC FE Morning October 2020 — Question 25 of 80

Candidate Key from Functional Dependencies — find the minimal set of attributes that determines all others.

Given R(A, B, C, P, Q, T) with FDs:
- A → B

- A → C

- CP → Q

- CP → T

Step 1: Find attributes that never appear on the right side of any FD.
- Right-side attributes: B, C, Q, T

- Never on right: A, P → these must be in every candidate key

Step 2: Compute closure of {A, P}.
- A → B → add B

- A → C → add C

- CP → Q → add Q

- CP → T → add T

- Closure: {A, P, B, C, Q, T} = all attributes ✓

Answer: `(c) A, P`

Why not others:
- (a) A — closure is {A, B, C}, missing P, Q, T

- (b) A, B — closure is {A, B, C}, still no P to trigger CP → Q/T

- (d) C, P — closure is {C, P, Q, T}, missing A, B

Key rule: Attributes that never appear on the right side of any FD must be part of every candidate key.

AI-generated — may contain errors

The original exam layout is preserved in the image so diagrams, formulas, tables, and code remain accurate.

This question comes from an official ITPEC past paper. ITPEC Practice is an independent study tool and is not affiliated with ITPEC. See the official FE past-paper collection or Report an issue.