Question :

What do you mean by 4NF in DBMS. Explain with example.

Subject

Database Management System

Standard

Computer Science Engineering

Views

513

Asked By

Vedhika

Deepak
Answer / Solution

Fourth Normal Form (4NF) is a database normalization technique used to further eliminate data redundancy and improve data integrity beyond 3NF.

In 4NF, a table is said to be in 4NF if it is already in 3NF and there are no non-trivial multivalued dependencies between any combination of the table's columns.

To explain 4NF with an example, consider a table called "Courses" table with the following columns:

  • Course ID (primary key)
  • Course Name
  • Course Description
  • Course Materials (multivalued attribute)

The "Course Materials" column contains a list of materials needed for each course, such as textbooks, workbooks, and lab equipment. However, some courses may require multiple copies of the same material, or some materials may be required for multiple courses.

This table is not in 4NF because there are non-trivial multivalued dependencies between the Course ID and the Course Materials column. The Course Materials column is not functionally dependent on the Course ID alone, as it can have multiple values for a single Course ID, and the same material can be used in multiple courses.

To normalize this table to 4NF, we need to split it into two tables: "Courses" and "Materials."

The "Courses" table will have the following columns:

  • Course ID (primary key)
  • Course Name
  • Course Description

The "Materials" table will have the following columns:

  • Material ID (primary key)
  • Material Name

We also need a third table called "Course_Materials" to represent the many-to-many relationship between the "Courses" and "Materials" tables. This table will have the following columns:

  • Course ID (primary key and foreign key)    
  • Material ID (primary key and foreign key)
  • Quantity

By doing this, we have eliminated the multivalued dependency between the Course ID and the Course Materials column, and we have ensured that each table contains data that is relevant and not redundant.

Thomas
Answer / Solution

Fourth Normal Form (4NF) is a database normalization technique used to further eliminate data redundancy and improve data integrity beyond 3NF. In 4NF, a table is said to be in 4NF if it is already in 3NF and has no multi-valued dependencies.

Lets discuss the example of Fourth Normal Form (4NF) in details.

STUDENT table 

STU_ID COURSE HOBBY
21 Computer Dancing
21 Math Singing
34 Chemistry Dancing
74 Biology Cricket
59 Physics Hockey

The given STUDENT table is in 3NF, but the COURSE and HOBBY are two independent entity. Hence, there is no relationship between COURSE and HOBBY.

In the STUDENT relation, a student with STU_ID, 21 contains two courses, Computer and Math and two hobbies, Dancing and Singing. So there is a Multi-valued dependency on STU_ID, which leads to unnecessary repetition of data.

So to make the above table into 4NF, we can decompose it into two tables:

STUDENT_COURSE

STU_ID COURSE
21 Computer
21 Math
34 Chemistry
74 Biology
59 Physics

STUDENT_HOBBY

STU_ID HOBBY
21 Dancing
21 Singing
34 Dancing
74 Cricket
59 Hocke

 


Top Trending Questions


Recent Question Update

Explain Domain Key Normal Form DKNF with example.
Explain Project Join Normal Form PJNF with example.
Explain 4nf and 5nf with example.
What is 5nf in DBMS.
What is BCNF Boyce Codd Normal Form. Explain it.
What is normalization? Explain 3NF with example.
What is 2NF? How is it achieved.
What is 1NF? How do we achieve it.
What are the different normal forms in DBMS?
Brief Introduction to the Normalization.
Explain multivalued dependencies
What do you mean by lossless join? How can we test it.
What is the meaning of decomposition in DBMS? List its properties.
Explain the closure of attribute sets.
What do you mean by closure of a set of functional dependencies.
Explain the inference rules for functional dependencies in DBMS
What is the Difference between BCNF and 4NF in DBMS.
SQL Full Outer Join Using Left and Right Outer Join and Union Clause
Difference between Natural join and Inner Join in SQL
Define aggregate function in database.
Write the operations which are responsible for database modification.
Explain natural join operation.
Differentiate union, intersection and set difference operations.
Explain fundamental operations of relational algebra with example.
What do you mean by database scheme. Explain with example.
What do you mean by relational algebra?
Explain Aggregation
What do you mean by Generalization and Specialization in DBMS?
Explain superclass and subclass entity types
Describe EER Model?
What is ER Entity relationship Diagram.
Explain the concept of weak entity and strong entity.
What are the entities and attributes? Explain them.
What are keys? Discuss its types.
Define relationship sets.
What do you mean by attributes? Explain its types.
What are the limitations of a database system.
Explain database administrator and its functions
Explain different database system users
What is database abstraction. Explain its levels.
Write advantages and disadvantages of Hierarchical Data Model
Write advantages and disadvantages of Network Data Model
Write advantages and disadvantages of Relational Data Model
What are data models? Explain its types.
Write different applications of a database
What are the advantages and disadvantages of a database system
Explain Database. Explain different types of elements.

Advantages Of NCERT, CBSE & State Boards Solutions For All Subjects

  • All the NCERT Solutions have been prepared by academic experts having 10+ years of teaching experience.
  • They have prepared all the solutions in simple and easy language so that each and every student can understand the concepts easily.
  • All the solutions have been explained step to step-wise in details with better explanations.
  • Students can also use these question and answers for your assignments and in homework help.
  • All the solutions have been explained in detail and the answers have been compiled in a step-wise manner.
  • All the questions and answers are commonly prepared according to the Latest Syllabus of Board Education and Guidelines.
  • Students can know about the various types of questions asked in the exams with the help of these solutions.

Top Course Categories