1NF to BCNF
Normal forms as conditions on functional dependencies: first normal form (atomic values), second normal form (no partial dependency of a non-prime attribute on a key), third normal form (every dependency has a superkey on the left or a prime attribute on the right), Boyce-Codd normal form (every determinant is a superkey); the redundancy and update, insertion and deletion anomalies they prevent; testing a schema (checking only the given dependencies is enough), the strict hierarchy BCNF, 3NF, 2NF, 1NF, and examples of schemas at each level.
Why it exists
A badly designed relation repeats facts, so changing one fact needs many updates, a new fact cannot be stored without an unrelated one, and deleting one fact can destroy another. Normal forms are conditions on the functional dependencies of a schema that rule such problems out step by step. GATE asks for the highest normal form of a schema, which dependency violates a given form, and how forms relate.
Prerequisites
You need functional dependencies, candidate keys and prime attributes (finding candidate keys).
Precise definitions
For a schema with a set of functional dependencies, with candidate keys and prime attributes found as on the previous page:
- 1NF: every attribute value is atomic (no repeating groups, no sets or lists as values). A relation in the relational model is in 1NF by definition; the condition separates it from nested tables.
- 2NF: 1NF and no partial dependency: no non-prime attribute depends on a proper subset of a candidate key. (Only schemas with a composite key can violate 2NF.)
- 3NF: for every non-trivial dependency (single attribute ) that holds, at least one of: (a) is a superkey, or (b) is a prime attribute.
- BCNF (Boyce–Codd): for every non-trivial dependency , is a superkey.
The hierarchy is strict: . BCNF removes the escape clause "or is prime" of 3NF; 3NF allows exactly the dependencies of the form with not a key.
Anomalies (the problems the forms prevent): redundancy (a fact stored many times), update anomaly (changing one fact in some copies only), insertion anomaly (a fact cannot be recorded without another unrelated fact), deletion anomaly (deleting one fact removes another).
How it works
Anomalies in a badly designed relation
A single relation that mixes students and courses, with the dependencies and and the key :
Redundancy and anomalies, and the decomposition that removes them: start
Computed, not typed| sid | sname | cid | title |
|---|---|---|---|
| 1 | Asha | C1 | DB |
| 1 | Asha | C2 | OS |
| 2 | Bilal | C1 | DB |
| 3 | Chen | C1 | DB |
| 3 | Chen | C3 | CN |
| 4 | Dara | C2 | OS |
Step 0
One relation holds both student data and course data. Two dependencies hold: a student id determines the name and a course id determines the title. The key is (sid, cid), and both dependencies start from only PART of the key.
Each dependency starts from only part of the key, so the relation violates 2NF. Splitting along the dependencies stores every fact once.
Testing a schema
Work with the candidate keys and the dependencies in (it is enough to test the given dependencies, with their right sides split into single attributes: the level computed this way equals the level computed from all of , checked on 600 random schemas):
- Find the candidate keys and the prime attributes.
- BCNF test: is every non-trivial of such that is a superkey ()? If yes: BCNF.
- Else 3NF test: is every violating such that is prime? If yes: 3NF (not BCNF).
- Else 2NF test: is there a partial dependency, a non-prime with some key and in ? If none: 2NF (not 3NF). The violation is then a transitive dependency: a non-key determines a non-prime attribute.
- Else the schema is only in 1NF.
Normal form of some schemas: start
Computed by a script, not typed| schema | candidate keys | highest normal form | reason |
|---|---|---|---|
| R(A, B, C), F = { A → B } | |||
| R(A, B, C, D), F = { AB → C, A → D } | |||
| R(A, B, C), F = { A → B, B → C } | |||
| R(A, B, C), F = { AB → C, C → B } | |||
| R(A, B, C), F = { A → B, A → C } | |||
| R(A, B, C, D), F = { A → B, B → C, C → D, D → A } | |||
| R(A, B, C, D), F = { AB → C, B → D } |
Step 0
1NF: values are atomic. 2NF: no non-prime attribute depends on part of a key. 3NF: for every X → A, X is a superkey or A is prime. BCNF: for every X → A, X is a superkey. Each level implies the ones before it. The level is found by testing the given dependencies and confirmed by testing every dependency of F+.
Reading some rows: with has the key ; depends on , a proper subset of the key: partial dependency, so only 1NF. with , has the key , no partial dependency (the key is a single attribute); makes the non-prime depend on the non-key : transitive, so 2NF but not 3NF. with , has keys and : has a non-key left side but is prime, so 3NF but not BCNF. with , has the key : BCNF.
Why 3NF allows the prime exception
The classic example with and is in 3NF but not BCNF. It stores the fact " determines " redundantly in every tuple that repeats a value with different values. Eliminating that redundancy by BCNF decomposition costs the dependency , which can no longer be checked inside one table (see the next page). 3NF is the compromise: there is always a lossless, dependency-preserving decomposition into 3NF, but not always into BCNF.
Quick checks
- A schema whose every candidate key is a single attribute cannot violate 2NF.
- A schema with only two attributes is always in BCNF (the only possible non-trivial dependencies have a single attribute on the left that is either a key or determines nothing useful).
- If all attributes are prime the schema is at least in 3NF (the right side of every dependency is prime).
- BCNF means: the left side of every non-trivial dependency is a superkey.
Worked examples
EX 1Partial dependency
Easywith and . The key is . depends on alone: a partial dependency. The schema is in 1NF, not in 2NF. Decompose into and .
EX 2Transitive dependency
Easywith , . Key: . The manager depends on the department, a non-key: a transitive dependency. In 2NF, not in 3NF. Decompose into and .
EX 33NF but not BCNF
Mediumwith and (each teacher teaches one course). Keys: and . has a non-superkey left side, but is prime: 3NF, not BCNF.
EX 4Highest normal form
Mediumwith , : the key is ; is a partial dependency ( non-prime, a proper subset of the key): only 1NF. with , , , : every attribute is a key, all determinants are superkeys: BCNF.
EX 5Typical questions
GATE level(a) "A relation with a single-attribute key and no other dependencies is in:" BCNF. (b) "Every relation with two attributes is in:" BCNF. (c) "A relation is in 3NF but not BCNF only if:" it has overlapping candidate keys (a dependency whose right side is prime and whose left side is not a superkey). (d) "Which anomaly occurs when deleting a tuple loses unrelated information?" deletion anomaly. (e) "A relation in BCNF may still have redundancy due to:" multivalued dependencies (4NF deals with them). (f) "Is every 3NF relation in 2NF?" Yes.
Cheat box
Cheat box
- 1NF atomic values. 2NF: no non-prime attribute depends on part of a key. 3NF: for : superkey or prime. BCNF: superkey.
- BCNF 3NF 2NF 1NF.
- Partial dependency violates 2NF; transitive dependency (non-key non-prime) violates 3NF; key-less determinant with prime right side violates BCNF only.
- Single-attribute keys: automatically 2NF. Two attributes: BCNF. All attributes prime: at least 3NF.
- Test the given dependencies after finding all candidate keys.
Traps and GATE patterns
Connections
Builds on
Unlocks
Across subjects
No cross-subject links yet.
Within this subject
The repair for a violated form is a decomposition that must be lossless and, if possible, dependency preserving (lossless join and dependency preservation); redundancy that survives BCNF comes from multivalued dependencies (4NF); a good ER-to-relational mapping already avoids most of these problems (ER to relational mapping).
PYQs
18 previous year questions from your book. I re-solved each one myself (11 by running or simulating, 7 by reasoning only); the book's key is shown next to my answer. All PYQs
In the context of relational database normalization, which of the following statements is/are true?
- (a)It is always possible to obtain a dependency- preserving 3NF decomposition of a relation
- (b)It is always possible to obtain a dependency- preserving 1NF decomposition of a relation
- (c)It is not always possible to obtain a dependency- preserving BCNF decomposition of a relation
- (d)It is not always possible to obtain a dependency- preserving 2NF decomposition of a relation
Consider the following relational schema along with all
the functional dependencies that hold on them.
R1(A,B,C,D,E):{D→E,EA→B,EB→C}
R2(A,B,C,D):{A→D,A→B,C→A}- (a)R1 is in 3NF
- (b)R2 is in 3NF
- (c)R1 is NOT in 3NF
- (d)R2 is NOT in 3NF
Consider a relational schema team(name , city , owner)
with functional dependencies {name → city , name →
owner}
.
The relation team is decomposed into two relations,
DATABASE MANAGEMENT SYSTEM
t1(name , city) and t2(name , owner). Which of the
following statement(s) is/are TRUE?- (a)The relation team is NOT in BCNF.
- (b)The relations t1 and t2 are in BCNF.
- (c)The decomposition constitutes a lossless join.
- (d)The relation team is NOT in 3NF.
Which of the following statements about a relation R in first normal form (1NF) is/are TRUE ?
- (a)R can have a multi-attribute key
- (b)R cannot have a foreign key
- (c)R cannot have a composite attribute
- (d)R cannot have more than one candidate key
In a relational data model, which one of the following statements is TRUE?
- (a)A relation with only two attributes is always in BCNF.
- (b)If all attributes of a relation are prime attributes, then the relation is in BCNF.
- (c)Every relation has at least one non-prime attribute.
- (d)BCNF decompositions preserve functional dependencies.
Consider a relational table R that is in 3NF, but not in BCNF. Which one of the following statements is TRUE?
- (a)A cell in R holds a set instead of an atomic value.
- (b)R has a nontrivial functional dependency X → A, where x is not a super key and A is a non-prime attribute and X is not a proper subset of any key.
- (c)R has a nontrivial functional dependency X → A, where x is not a super key and A is a non-prime attribute and X is a proper subset of some key.
- (d)R has a nontrivial functional dependency X → A, where X is not a super key and A is a prime attribute.
Let the set of functional dependencies F = {QR → S, R
→ P, S → Q} hold on a relation schema X = (PQRS).
X is not in BCNF. Suppose X is decomposed into two
schemas Y and Z, where Y = (PR) and Z = (QRS).
Consider the two statements given below.
I.
Both Y and Z are in BCNF
II.
Decomposition of X into Y and Z is dependency
preserving and lossless.
Which of the statements is/are correct ?- (a)I only
- (b)II only
- (c)Neither I nor II
- (d)Both I and II
Consider the following four relational schema. For each schema, all non-trivial functional dependencies are listed. The underlined attributes are the respective primary keys. Schema I: Registration (roll no, courses) Field 'course' is a set-valued attribute containing the set of courses a student has registered for. Non-trivial functional dependency roll no→ courses Schema II: Registration(roll no, courseid, email) Non-trivial functional dependencies: roll no, course id→ email Email →roll no Schema III: Registration (roll no, course id, marks, grade) Non-trivial functional dependencies: roll no, course id→ marks ,grade marks→ grade Schema IV: Registration (roll no, course id, credit) Non-trivial functional dependencies: roll no, courseid→ credit courseid→ credit Which one of the relational schemas above is in 3NF but not in BCNF?
- (a)Schema I
- (b)Schema II
- (c)Schema III
- (d)Schema IV
A database of research articles in a journal uses the following schema. (VOLUME, NUMBER, STARTPAGE, ENDPAGE, TITLE, YEAR, PRICE) The primary key is (VOLUME, NUMBER, STARTPAGE, ENDPAGE) and the following functional dependencies exist in the schema. (VOLUME, NUMBER, STARTPAGE, ENDPAGE) → TITLE (VOLUME, NUMBER) → YEAR (VOLUME, NUMBER, STARTPAGE, ENDPAGE) → PRICE The database is redesigned to use the following schema. (VOLUME, NUMBER, STARTPAGE, ENDPAGE, TITLE, PRICE) (VOLUME, NUMBER, YEAR) Which is the weakest normal form that the new database satisfies, but the old one does not?
- (a)1NF
- (b)2NF
- (c)3NF
- (d)BCNF
Given the following two statements: S1: Every table with two single-valued attributes is in 1NF, 2NF, 3NF and BCNF. S2: AB → C, D → E, E → C is a minimal cover for the set of functional dependencies AB → C, D → E, AB → E, E → C. Which one of the following is CORRECT?
- (a)S1 is TRUE and S2 is FALSE.
- (b)Both S1 and S2 are TRUE.
- (c)S1 is FALSE and S2 is TRUE.
- (d)Both S1 and S2 are FALSE.
Relation R has eight attributes ABCDEFGH. Fields of R
contain only atomic values.
F = {CH → G, A → BC, B → CFH, E → A, F → EG} is
a set of functional dependencies (FDs) so that F+ is
exactly the set of FDs that hold for R.
The relation R is ?- (a)In 1NF, but not in 2NF.
- (b)In 2NF, but not in 3NF.
- (c)In 3NF, but not in BCNF.
- (d)In BCNF
Which of the following is TRUE?
- (a)Every relation in 3NF is also in BCNF
- (b)A relation R is in 3NF if every non- prime attribute of R is fully functionally dependent on every key of R
- (c)Every relation in BCNF is also in 3NF
- (d)No relation can be in both BCNF and 3NF
Consider the following relational schema:
•
Suppliers(sid:integer, sname:string,city:string
,street:string )
•
Parts(pid:integer, pname:string,
color:string)
•
Catalog(sid:integer, pid:integer, cost:real)
Assume that, in the suppliers relation above, each
supplier and each street within a city has unique name,
and (sname, city) forms a candidate key. No other
functional dependencies are implied other than those
implied by primary and candidate keys. Which one of
the following is TRUE about the above schema?- (a)The schema is in BCNF
- (b)The schema is in 3NF but not in BCNF
- (c)The schema is in 2NF but not in 3NF
- (d)The schema is not in 2NF
Consider the following relational schemes for a library
database:
Book (Title, Author, Catalog_no, Publisher, Year, Price)
Collection (Title, Author, Catalog_no)
with the following functional dependencies:
I.
Title
Author
→
Catalog_no
II.
Catalog_no → Title Author Publisher Year
III.
Publisher Title Year → Price
Assume {Author, Title} is the key for both schemes.
Which of the following statements is true?- (a)Both Book and Collection are in BCNF
- (b)Both Book and Collection are in 3NF only
- (c)Book is in 2NF and Collection in 3NF
- (d)Both Book and Collection are in 2NF only
Let R(A, B, C, D, E, P, G) be a relational schema in which the following functional dependencies are known to hold: AB → CD , DE → P, C → E , P → C , B → G The relational schema R is
- (a)in BCNF
- (b)in 3NF, but not in BCNF
- (c)in 2NF, but not in 3NF
- (d)not in 2NF
Which one of the following statements is FALSE?
- (a)Any relation with two attributes is in BCNF
- (b)A relation in which every key has only one attribute is in 2NF
- (c)A prime attribute can be transitively dependent on a key in a 3NF relation
- (d)A prime attribute can be transitively dependent on a key in a BCNF relation
Which one of the following statements about normal forms is FALSE?
- (a)BCNF is stricter than 3NF
- (b)Lossless, dependency-preserving decomposition into 3NF is always possible
- (c)Lossless, dependency-preserving decomposition into BCNF is always possible
- (d)Any relation with two attributes is in BCNF
A table has fields Fl, F2, F3, F4, F5 with the following functional dependencies F1 → F3 F2→ F4 (F1 . F2) → F5 In terms of Normalization, this table is in
- (a)1 NF
- (b)2 NF
- (c)3 NF
- (d)none
Self-check
Question 1
with and . Highest normal form?
Show answerHide
is in every key. and (because ), so the keys are and . has a left side that is not a superkey, but is prime: 3NF, not BCNF.
Question 2
What kind of dependency violates 3NF but not 2NF?
Show answerHide
A transitive dependency: a non-key (not a part of a key) determines a non-prime attribute.
Question 3
Is a relation with all attributes prime always in 3NF?
Show answerHide
Yes: the right side of every dependency is prime, so the 3NF condition holds.
Question 4
Why is a two-attribute relation always in BCNF?
Show answerHide
A non-trivial dependency would have a single attribute on the left determining the other; then is a superkey (it determines both attributes), so every determinant is a superkey.
Revision card
One-screen revision
- 1NF atomic; 2NF no partial; 3NF superkey or prime; BCNF superkey.
- Hierarchy strict; test the given dependencies after finding all keys.
- Partial = proper subset of key non-prime; transitive = non-key non-prime.
- 3NF always achievable losslessly and with dependency preservation; BCNF not always.
References
- ·Silberschatz, Korth, Sudarshan, Database System Concepts (7th edition), Chapter 7, Sections 7.1 to 7.3 (features of good relational design, atomic domains and first normal form, decomposition using functional dependencies)
- ·Elmasri, Navathe, Fundamentals of Database Systems (7th edition), Chapter 14, Sections 14.1, 14.4 to 14.6 (informal design guidelines and normal forms)
Verification
scripts/enum-checks/db_fd_check.py: on 600 random schemas the normal-form level computed from the GIVEN dependencies (the textbook tests) equals the level computed from EVERY dependency of the closure F+ (the definitions), and BCNF implies 3NF implies 2NF; the table of schemas on this page was computed by the same functions and the reasons (which dependency violates which form) are those found by the program; the anomaly animation is a computed relation: the three-way decomposition joins back to exactly the original relation. The definitions follow the usual textbook statements (Silberschatz et al. state 3NF with 'a candidate key contains A'; Elmasri and Navathe define 2NF and 3NF in terms of prime attributes; both give the same classification, which was checked here by the definition via F+). Textbook chapter references are from memory. SECOND PASS (2026-11-02, done by the assistant, not a human check): every Self-check question was solved before the printed answer was read and all agreed; the definitions, worked examples, cheat box and traps were read claim by claim and re-derived against the textbook definitions and the sample database. No defect found. Status raised to self-checked; verified needs a textbook or human check.
last verified: never
My notes (saved in this browser)