
- DBMS Tutorial
- DBMS - Home
- DBMS - Overview
- DBMS - Architecture
- DBMS - Data Models
- DBMS - Data Schemas
- DBMS - Data Independence
- Entity Relationship Model
- DBMS - ER Model Basic Concepts
- DBMS - ER Diagram Representation
- DBMS - Generalization, Aggregation
- Relational Model
- DBMS - Codd's Rules
- DBMS - Relational Data Model
- DBMS - Relational Algebra
- DBMS - ER to Relational Model
- DBMS- SQL Overview
- Relational Database Design
- DBMS - Database Normalization
- DBMS - Database Joins
- Storage and File Structure
- DBMS - Storage System
- DBMS - File Structure
- Indexing and Hashing
- DBMS - Indexing
- DBMS - Hashing
- Transaction And Concurrency
- DBMS - Transaction
- DBMS - Concurrency Control
- DBMS - Deadlock
- Backup and Recovery
- DBMS - Data Backup
- DBMS - Data Recovery
- DBMS Useful Resources
- DBMS - Quick Guide
- DBMS - Useful Resources
- DBMS - Discussion
What is 4NF in DBMS?
A relation R is in 4NF if it is in BCNF and there is no non-trivial multivalued dependency.
For a dependency A->B, if for a single value of A, multiple values of B exist, then the relation will be a multi-valued dependency.
Example
Consider the following table
Regno | Phoneno | Qualification |
---|---|---|
1 | P1 | Diploma |
1 | P1 | B.Tech |
1 | P1 | M.Tech |
1 | P2 | Diploma |
1 | P2 | B.Tech |
1 | P2 | M.Tech |
Here,
regno->-> phoneno
regno->-> qualification.
Both are non trivial MVD
The given relation is in BCNF [since no functional dependency exists]. But the above table is not in 4NF [since there is a non trivial MVD].
Anomalies
It also suffers with anomalies which are as follows −
Insertion anomaly: If we want to insert a new phoneno for regno3 then we have to insert 3 rows, because for each phoneno we have stored all three combinations of qualification.
Deletion anomaly: If we want to delete the qualification diploma, then we have to delete it in more than one place.
Updation anomaly: If we want to update the qualification diploma to IT, then we have to update in more than one place.
4NF decomposition
If R(XYZP) has X->->Y and X->->Z then, R is decomposed to R1(XY) and R2(XZP).
=> R(regno, phoneno, qualification) is decomposed to R1(regno, phoneno) and R2(regno, qualification).
R1
Regno | Phoneno |
---|---|
1 | P1 |
1 | P2 |
R2
Regno | Qualification |
---|---|
1 | Diploma |
1 | B.Tech |
1 | M.Tech |
All the anomalies discussed above are removed. The above two relations are in 4NF.
Now, regno->->phoneno is trivial MVD (since {regno} U {phoneno}=R1)
=>R1 is in 4NF.
Regno->-> qualification is trivial MVD (since {regno} U {qualification} =R2)
=> R2 is in 4NF.
- Related Articles
- Fourth Normal Form (4NF)
- What is Decomposition in DBMS?
- What is RAID in DBMS?
- What is functional dependency in DBMS?
- What is Transitive dependency in DBMS?
- What is an instance in DBMS?
- What is Hierarchical model in DBMS?
- What is Data Independence in DBMS?
- What is multivalued dependency in DBMS?
- What is heuristic optimization in DBMS?
- What is concurrency control in DBMS?
- What is shadow paging in DBMS?
- What is clustering Index in DBMS?
- What is data Abstraction in DBMS?
- What is tier-1 architecture in DBMS?
