Normalization Practice for the NSCT: Keys, Closures and Normal Forms

By the NSCT Exam Editorial Team · Updated 2026-11-24 · Facts checked against official sources on 2026-11-24

Normalisation practice questions give you a relation such as R(A, B, C, D, E) and a set of functional dependencies (FDs), then ask for a closure, the candidate keys, the highest normal form or whether a decomposition is lossless. Each one is a short, mechanical procedure, and it pays to learn it: Databases carries 10% of the NSCT according to HEC's Areas of Competencies, and candidates averaged only 42.3% accuracy there in 2026, per the HEC NSCT report.

The official Database Design & Normalization topic defines 1NF to BCNF. This page drills the calculations. Every closure, key and normal form below was computed by a Python script, not by hand. Keys and superkeys are covered in Relational Database Concepts.

The method, step by step

  1. Classify the attributes. Mark each one as left-only (appears only on FD left sides, or in no FD at all), right-only, or both.
  2. Start the key with every left-only attribute. They are in every candidate key. Right-only attributes are in none.
  3. Compute the closure of that starting set. If it is the whole of R, it is the only candidate key.
  4. Otherwise add "both" attributes one at a time, then two at a time, and keep every minimal set whose closure is R.
  5. List the prime attributes, meaning those in any candidate key.
  6. Test each FD X → A, from the highest normal form down: - BCNF: X is a superkey. - 3NF: X is a superkey, or A is prime. - 2NF: no non-prime A depends on a proper subset of a candidate key.

Attribute closure

The closure X⁺ is every attribute X determines. Start with X and keep firing any FD whose left side is already inside the set.

Given: R(A, B, C, D, E, F), F = {A → B, C → D, BD → E, E → F}. Find (AC)⁺.

Step FD fired Set
Start none {A, C}
1 A → B {A, B, C}
2 C → D {A, B, C, D}
3 BD → E {A, B, C, D, E}
4 E → F {A, B, C, D, E, F}

Answer: (AC)⁺ is all of R, so AC is a superkey. Neither half works alone, because A⁺ = {A, B} and C⁺ = {C, D}. So AC is also a candidate key.

Finding candidate keys

Given: R(A, B, C, D, E), F = {A → B, BC → E, DE → A}.

Attribute Left side Right side Class
A yes yes both
B yes yes both
C yes no left-only
D yes no left-only
E yes yes both

C and D must be in every key. (CD)⁺ = {C, D}, which is not enough, so try adding one "both" attribute:

Candidate Closure Key?
ACD A → B, BC → E gives yes
BCD BC → E, DE → A gives yes
CDE DE → A, A → B gives yes

Answer: three candidate keys, ACD, BCD and CDE. Every attribute is prime, so this relation is automatically in 3NF. It is not in BCNF, because A → B has a non-superkey left side.

Deciding the highest normal form

Find the keys first, then test every FD. The script's verdicts:

Relation and FDs Keys Violation found Highest NF
R(A, B, C, D, E): AB → C, B → D, D → E AB B → D: non-prime D depends on part of key AB 1NF
R(A, B, C, D, E): AB → C, C → D, D → E AB C → D: non-key to non-prime (transitive) 2NF
R(A, B, C, D, E): AB → CDE, C → A AB, BC C → A: C not a superkey, but A is prime 3NF
R(A, B, C, D): A → BCD, BC → A A, BC none; both left sides are keys BCNF

Notice in the first row that the transitive chain B → D → E does not matter once B → D has already failed 2NF. Always report the highest form that every FD satisfies.

Ladder of normal forms: 1NF needs atomic values; 2NF removes partial dependencies on part of a key; 3NF removes transitive dependencies unless the right side is prime; BCNF requires every determinant to be a superkey.
What each normal form adds, with the violating dependency from each example on this page.

Lossless join and dependency preservation

A split of R into R1 and R2 is lossless when the common attributes determine all of R1 or all of R2. Otherwise joining the parts back creates spurious tuples, which are rows that were never in R.

Lossy example: R(A, B, C) with only A → B, holding the rows (1, x, p) and (2, x, q). Split it into (A, B) and (B, C). The common attribute B determines neither side. Joining the parts on B gives four rows: (1, x, p), (1, x, q), (2, x, p) and (2, x, q). Two of these are spurious.

Lossless but not preserving: R(A, B, C, D, E) with AB → CDE and C → A, keys AB and BC. To reach BCNF, split on C → A:

Part Key Normal form
R1(C, A) C BCNF
R2(B, C, D, E) BC BCNF

The common attribute C determines A, so the split is lossless. But AB → CDE now spans both tables and cannot be checked inside either one, so a dependency is lost. That is the classic BCNF trade-off. 3NF synthesis would keep R whole, because R is already in 3NF.

Minimal cover

A minimal (canonical) cover has single attributes on the right, no extraneous left-side attributes and no redundant FDs.

Given: F = {AB → C, A → C, C → D, AD → B}.

  1. Split the right sides. They are already single attributes.
  2. In AB → C, B is extraneous because A⁺ already contains C. It becomes A → C, a duplicate.
  3. In AD → B, D is extraneous because A → C → D, so A alone already reaches D. It becomes A → B.
  4. Check redundancy. None of A → C, C → D and A → B can be derived from the other two.

Answer: {A → B, A → C, C → D}.

Speed tricks

Common mistakes

Practice set

  1. R(P, Q, R, S, T), F = {P → Q, QR → S, S → T}. What is (QR)⁺?
  2. For the same relation, what is the candidate key?
  3. What is its highest normal form?
  4. R(A, B, C), F = {A → B, B → C}. What is the highest normal form?
  5. R(A, B, C) has the single candidate key A. How many superkeys does it have?
  6. R(A, B, C, D, E, F), F = {A → C, B → D, CD → E, E → F}. Find the key and the highest normal form.
  7. R(A, B, C), F = {B → C}. Is the split into (A, B) and (B, C) lossless?
  8. R(A, B, C), F = {A → B, B → C}, split into (B, C) and (A, B). Is it lossless, and are the dependencies preserved?
Show answers
  1. {Q, R, S, T}. QR → S, then S → T. P is never produced.
  2. PR. P and R are left-only, and (PR)⁺ = {P, Q, R, S, T}.
  3. 1NF. P → Q makes the non-prime Q depend on part of the key PR.
  4. 2NF. The key is A (a single attribute), but B → C is transitive.
  5. 4. 2^(3 − 1): A, AB, AC and ABC.
  6. Key AB, 1NF. A → C is a partial dependency.
  7. Lossless. The common attribute B determines C, which covers (B, C).
  8. Lossless and preserving. B → C covers (B, C), and A → B and B → C each sit inside one part.

Practise: 20 questions

Interactive quiz loading. The first 10 questions are shown below.

  1. In R with functional dependency set F, attribute E appears on the right-hand side of some FDs but never on any left-hand side. What can you say about E?

    1. E is not part of any candidate key
    2. E is part of every candidate key
    3. E must be a candidate key by itself
    4. E is a prime attribute
    Show answer

    Answer: A. E is not part of any candidate key

    A candidate key is minimal. If E appears only on right-hand sides, it can always be derived from other attributes, so any set containing E stays a superkey after removing E. Such a set is never minimal, so E belongs to no candidate key.

  2. For relation R, the closure X⁺ of an attribute set X contains every attribute of R. What is X?

    1. Always a candidate key of R
    2. A prime attribute set that must be minimal
    3. A superkey of R, though not necessarily a candidate key
    4. A trivial functional dependency
    Show answer

    Answer: C. A superkey of R, though not necessarily a candidate key

    If X⁺ = R, X functionally determines every attribute, which is the definition of a superkey. It is a candidate key only if no proper subset of X also has a closure equal to R.

  3. In 3NF, a non-trivial FD X → A is still allowed when X is not a superkey, provided which condition holds?

    1. A is a prime attribute (part of some candidate key)
    2. X is a single attribute
    3. A is a non-prime attribute
    4. X is part of the primary key
    Show answer

    Answer: A. A is a prime attribute (part of some candidate key)

    3NF requires, for every non-trivial X → A, that X is a superkey or A is prime. The prime-attribute escape clause is exactly what BCNF removes, which is why a relation can be in 3NF but not in BCNF.

  4. Which statement about the standard decomposition algorithms is correct?

    1. Both BCNF decomposition and 3NF synthesis always preserve every dependency
    2. BCNF decomposition is always lossless but may lose dependencies; 3NF synthesis is lossless and dependency-preserving
    3. 3NF synthesis may be lossy, but BCNF decomposition never is
    4. BCNF decomposition always preserves dependencies but may be lossy
    Show answer

    Answer: B. BCNF decomposition is always lossless but may lose dependencies; 3NF synthesis is lossless and dependency-preserving

    Splitting on a violating FD X → Y into (X ∪ Y) and (R − Y) is always lossless, because the common part X determines X ∪ Y. It can split a dependency across tables, though. The 3NF synthesis algorithm (Elmasri-Navathe, Silberschatz) guarantees both properties.

  5. What is a partial dependency, the thing 2NF removes?

    1. A non-prime attribute that depends on another non-prime attribute
    2. A prime attribute that depends on a non-key attribute
    3. A dependency whose right-hand side is a subset of its left-hand side
    4. A non-prime attribute that depends on a proper subset of a candidate key
    Show answer

    Answer: D. A non-prime attribute that depends on a proper subset of a candidate key

    2NF forbids a non-prime attribute depending on only part of a candidate key, for example CourseTitle depending on CourseID alone when the key is (StudentID, CourseID). A dependency between non-prime attributes is transitive, which is 3NF's concern.

  6. Attribute A appears on the left-hand side of some FDs but never on any right-hand side. What follows?

    1. A is in no candidate key
    2. A is a non-prime attribute
    3. A can be dropped from R without losing information
    4. A is in every candidate key
    Show answer

    Answer: D. A is in every candidate key

    Nothing determines A, so the only way a set's closure can contain A is if A is in the set already. Every superkey, and so every candidate key, must include A. This is the first shortcut in key-finding.

  7. R(A, B, C, D, E, F) has F = {A → C, B → D, CD → E, E → F}. What is A⁺?

    1. {A, C, E, F}
    2. {A, C}
    3. {A, B, C, D, E, F}
    4. {A}
    Show answer

    Answer: B. {A, C}

    Start with {A}. A → C adds C. CD → E needs D as well, which A cannot reach, so nothing more fires. A⁺ = {A, C}.

  8. R(A, B, C, D, E, F) has F = {A → B, C → D, BD → E, E → F}. What is (BC)⁺, and is BC a superkey?

    1. {A, B, C, D, E, F}; a superkey
    2. {B, C, D, E, F}; not a superkey
    3. {B, C, D}; not a superkey
    4. {B, C, D, E}; not a superkey
    Show answer

    Answer: B. {B, C, D, E, F}; not a superkey

    Start with {B, C}. C → D adds D. BD → E adds E. E → F adds F. Nothing produces A, so (BC)⁺ = {B, C, D, E, F} and BC is not a superkey. (AC)⁺ is the whole relation.

  9. R(A, B, C, D, E) has F = {AB → C, C → D, D → B, D → E}. What are all the candidate keys?

    1. AB only
    2. A only
    3. AB and AD
    4. AB, AC and AD
    Show answer

    Answer: D. AB, AC and AD

    A is never on a right-hand side, so it is in every key, and E is never on a left-hand side, so it is in none. A⁺ = {A}. Try A plus one attribute: (AB)⁺, (AC)⁺ and (AD)⁺ each reach all five attributes. So AB, AC and AD are all candidate keys.

  10. R(A, B, C, D) has F = {A → B, B → C, C → D, D → A}. How many candidate keys does R have?

    1. 1
    2. 2
    3. 4
    4. 0
    Show answer

    Answer: C. 4

    The FDs form a cycle, so each single attribute reaches all the others: A⁺ = B⁺ = C⁺ = D⁺ = {A, B, C, D}. Each of A, B, C and D is a candidate key, giving 4. Every left-hand side is a key, so R is also in BCNF.

FAQs

Can a relation have more than one candidate key?

Yes. R(A, B, C, D, E) with A → B, BC → E and DE → A has three: ACD, BCD and CDE. Any minimal set whose closure equals R is a candidate key. The designer then picks one as the primary key; the others become alternate keys.

Is every relation in BCNF also in 3NF?

Yes. BCNF demands a superkey on the left of every non-trivial FD, which automatically satisfies the 3NF rule "superkey or prime right side". The reverse fails: a relation can be in 3NF but not BCNF when a non-superkey determines a prime attribute.

Why not always decompose to BCNF?

Because BCNF decomposition can lose dependencies. The constraint then has to be checked with a join or a trigger on every update. Elmasri-Navathe and Silberschatz both suggest settling for 3NF when reaching BCNF would lose an important dependency, because 3NF synthesis is always lossless and dependency-preserving.

How do I check an FD against sample data?

Look for two rows that agree on the left side but differ on the right. One such pair disproves the FD. No amount of sample data can prove an FD holds, because FDs are rules about every valid state of the relation, not just the rows you can see.

Next step

Go back to the official Database Design & Normalization topic, then try ACID properties practice. See every Databases topic on the Databases MCQs hub, or put it all together in an NSCT mock test.