The Wayback Machine - https://web.archive.org/web/20240901181834/https://www.geeksforgeeks.org/multivalued-dependency-and-fourth-normal-form/
Open In App

Multivalued Dependency and Fourth Normal Form

Last Updated : 15 May, 2024
Comments
Improve
Suggest changes
Like Article
Like
Save
Share
Report
News Follow

In database management systems, normalization is an essential process to ensure that data is organized efficiently and effectively. Multivalued dependency (MVD) is a concept that helps to identify and eliminate data redundancy and anomalies, and Fourth Normal Form (4NF) is a normalization form that addresses the challenges associated with multivalued dependency.

In this article, we will discuss multivalued dependency, the Fourth Normal Form, and its importance in database management systems.

Multivalued Dependency (MVD)

Multivalued dependency (MVD) is a type of dependency that exists when a table contains more than one multivalued attribute and changes to one attribute can affect another attribute. In other words, MVD occurs when a table has a non-trivial relationship between attributes that are not part of the same composite key.

  • Multivalued dependency occurs when two attributes in a table are independent of each other but, both depend on a third attribute.
  • A multivalued dependency consists of at least two attributes that are dependent on a third attribute that’s why it always requires at least three attributes.

Example: Suppose there is a bike manufacturer company that produces two colors(white and black) of each model every year.

NIKE_MODEL

MANUF_YEAR

COLOR

M2011

2008

White

M2001

2008

Black

M3001

2013

White

M3001

2013

Black

M4006

2017

White

M4006

2017

Black

Here columns COLOR and MANUF_YEAR are dependent on BIKE_MODEL and independent of each other.

In this case, these two columns can be called as multivalued dependent on BIKE_MODEL. The representation of these dependencies is shown below:

BIKE_MODEL -> -> MANUF_YEAR

BIKE_MODEL -> -> COLOR

This can be read as “BIKE_MODEL multidetermined MANUF_YEAR” and “BIKE_MODEL multidetermined COLOR”.

Fourth Normal Form (4NF)

Fourth Normal Form (4NF) is a level of database normalization that requires a relation to be in BCNF and have no non-trivial multivalued dependencies other than the candidate key, to eliminate redundant data and maintain data consistency. If a table violates this standard, it needs to be split into two tables to achieve 4NF.

For a relation R to be in 4NF, it must meet two conditions −

  1. It should be in Boyce-Codd Normal Form (BCNF).
  2. It should not have any non-trivial multivalued dependencies.

Example:

To remove the multivalued dependency (MVD) in the “Students” table example, we can create two new tables, one for “Courses” and another for “Textbooks,” and establish a relationship between them using foreign keys.

Here’s how we can create the tables:

Table 1: Students

Student ID

Course ID

1

1

1

2

2

3

2

4

2

5

3

6

Table 2: Courses

Course ID

Course Name

1

Math

2

Science

3

Art

4

History

Table 3: Textbooks

Textbook ID

Textbook Name

Course ID

1

Algebra

1

2

Calculus

2

3

Biology

2

4

Chemistry

2

5

Art History

3

6

American History

4

So, we removed the multivalued dependency by splitting the “Course” and “Textbook” columns into separate tables.

We have also added a new “Course ID” column to the “Students” table. It has a foreign key that references the “Course ID” column in the “Courses” table. Similarly, the “Textbooks” table also has a “Course ID” column that serves as a foreign key referencing the “Course ID” column in the “Courses” table.

Hence, we have achieved the fourth normal form (4NF) for the “Students” table. It has done after by removing the multivalued dependency and creating separate tables. The Resultant schema eliminates data redundancy and improves data integrity, making it easier to manage and query the database.

Challenges of Fourth Normal Form

Achieving 4NF can be challenging, as it requires careful analysis of functional dependencies, selecting appropriate keys, and balancing between normalization and performance. Achieving 4NF can be time-consuming, and it may require additional storage space.

Examples of Achieving Fourth Normal Form

An example of achieving 4NF is splitting a table with MVDs into two or more tables, with each table containing attributes that are functionally dependent on the primary key. In another example, an intersection table can be used to eliminate MVDs by creating a separate table that links two other tables with MVDs.

Example:

MOVIE

Movie

Location

Genre

PIE

USA

STRATEGY

DOOM

UK

THRILLER

DUNE

UK

ACTION

INTERSTELLAR

USA

ACTION

DHAMAAL

INDIA

COMEDY

The table is not in it 4th Normal Form, as the various locations can have the same movie, and multiple movies can have same listing. Therefore, let’s split the table to achieve 4th Normal Form.

LOCATION

MOVIE

LOCATION

PIE

USA

DOOM

UK

DUNE

UK

INTERSTELLAR

USA

DHAMAAL

INDIA

GENRE

MOVIE

LOCATION

PIE

USA

DOOM

UK

DUNE

UK

INTERSTELLAR

USA

DHAMAAL

INDIA

Now, the table has achieved its 4th Normal Form, by splitting the tables and converting it into its violation free table.

Conclusion

Multivalued dependency is a concept which can be removed by 4NF. 4NF helps to eliminate data redundancy, improve data integrity, and improve database performance. Achieving 4NF can be challenging. But it improves data quality, better database performance, and less anomalies associated that has data redundancy. By analyzing functional dependencies and using appropriate techniques, 4NF can be achieved.

Frequently Asked Quesions on Multivalued Dependency and Fourth Normal Form – FAQs

What are the benefits of achieving 4NF?

Achieving 4NF helps in reducing data redundancy, improving data integrity, and enhancing database performance. It ensures that data is organized efficiently and eliminates anomalies associated with multivalued dependencies.

How does MVD differ from other types of dependencies?

MVD differs from other types of dependencies, such as functional dependencies, in that it involves dependencies between sets of attributes rather than individual attributes. It identifies relationships where changes in one attribute affect multiple other attributes, leading to data redundancy.

What are some common techniques for achieving 4NF?

Common techniques for achieving 4NF include splitting tables, creating additional tables to represent multivalued attributes, and establishing relationships between these tables using foreign keys. Intersection tables are also used to eliminate multivalued dependencies.

When should I consider applying 4NF to my database design?

4NF should be considered during the database design phase, especially when dealing with complex data structures or tables containing multivalued attributes. It helps in ensuring data integrity and efficiency in data storage and retrieval.



Similar Reads

Multivalued Dependency (MVD) in DBMS
In Database Management Systems (DBMS), multivalued dependency (MVD) deals with complex attribute relationships in which an attribute may have many independent values while yet depending on another attribute or group of attributes. It improves database structure and consistency and is essential for data integrity and database normalization. MVD or m
3 min read
Differentiate between Partial Dependency and Fully Functional Dependency
Fully Functional Dependency :If X and Y are an attribute set of a relation, Y is fully functional dependent on X, if Y is functionally dependent on X but not on any proper subset of X.Example -In the relation ABC->D, attribute D is fully functionally dependent on ABC and not on any proper subset of ABC. That means that subsets of ABC like AB, BC
3 min read
Multivalued Attributes in DBMS
Attributes are significant in DBMS as it deals with the organization and formatting of data. Of all the attributes, multivalued attributes are somewhat different and they have to be understood properly. To help us understand the above idea in the subsequent sections of this article, we will also explain related key terminologies, and how multivalue
6 min read
What is Fourth Generation Programming Language?
The language which is used to create programs is called a programming language. It comprises a set of instructions that are used to produce various kinds of output. A Fourth Generation (Programming) Language (4GL) is a grouping of programming languages that attempt to get closer than 3GLs to human language, a form of thinking, and conceptualization
3 min read
Domain Key Normal Form in DBMS
Prerequisites - Normal Forms, 4th and 5th Normal form, find the highest normal form of a relation It is basically a process in database to organize data efficiently. Basically there are two goals of doing normalization these are as follows: To remove repeated data or in simple words we can say to remove redundant data.Second one is to ensure that t
4 min read
What is PJNF(Project-Join Normal Form)?
Fifth normal form (5NF), is also known as project-join normal form (PJNF). It is a level of database normalization designed to reduce redundancy in relational databases. A relation is said to be in 5NF if and only if it satisfies 4NF and no join dependency exists. A relation is said to have join dependency if it can be recreated by joining multiple
2 min read
First Normal Form (1NF)
If a table has data redundancy and is not properly normalized, then it will be difficult to handle and update the database, without facing data loss. It will also eat up extra memory space and Insertion, Update, and Deletion Anomalies are very frequent if the database is not normalized. Normalization is the process of minimizing redundancy from a r
3 min read
Minimum Relations Satisfying First Normal Form (1NF)
A relation that does not contain any composite or multivalued attribute, then the relation is in its First Normal Form. Relations that contain a single-valued attribute comes under First Normal Form. In this article, we will be going to discuss the minimum relations satisfying the First Normal Form. Before proceeding to First Normal Form, let's dis
4 min read
Third Normal Form (3NF)
Although Second Normal Form (2NF)relations have less redundancy than those in 1NF, they may still suffer from update anomalies. If we update only one tuple and not the other, the database will be in an inconsistent state. This update anomaly is caused by a transitive dependency. We need to remove such dependencies by progressing to the Third Normal
3 min read
How to find the highest normal form of a relation
To understand this topic, you should have a basic idea about Functional Dependency & Candidate keys and Normal forms .Steps to find the highest normal form of relation: Find all possible candidate keys of the relation.Divide all attributes into two categories: prime attributes and non-prime attributes.Check for 1st normal form then 2nd and so o
5 min read
What is Fifth Normal Form (5NF) in DBMS?
Normalization is a process that involves removing or decreasing the redundancy present in the database. Normalization mainly focuses on removing duplicate data from the database and making it more consistent. There are various types of normalization such as 1NF,2NF, 3NF, BCNF, 4NF, and 5NF. 5NF is one of the highest levels of normalization form pre
5 min read
Second Normal Form (2NF)
First Normal Form (1NF) does not eliminate redundancy, but rather, it's that it eliminates repeating groups. Instead of having multiple columns of the same kind of data in a record, (0NF or Unnormalized form) you remove the repeated information into a separate relation and represent them as rows. This is what constitutes 1NF. Second Normal FormThe
4 min read
Boyce-Codd Normal Form (BCNF)
Pre-Requisite: First Normal Form, Second Normal Form, Third Normal Form Application of the general definitions of 2NF and 3NF may identify additional redundancy caused by dependencies that violate one or more candidate keys. However, despite these additional constraints, dependencies can still exist that will cause redundancy to be present in 3NF r
6 min read
Functional Dependency and Attribute Closure
Fundamental ideas in database management and design are functional dependency and attribute closure. They are essential to maintaining data integrity and building effective, organized, and normalized databases. Functional DependencyA functional dependency A->B in a relation holds if two tuples having the same value of attribute A also have the s
6 min read
Lossless Join and Dependency Preserving Decomposition
Decomposition of a relation is done when a relation in a relational model is not in appropriate normal form. Relation R is decomposed into two or more relations if decomposition is lossless join as well as dependency preserving. Lossless Join DecompositionIf we decompose a relation R into relations R1 and R2, Decomposition is lossy if R1 ⋈ R2 ⊃ RDe
4 min read
Armstrong's Axioms in Functional Dependency in DBMS
Prerequisite - Functional Dependencies This article contains Armstrong's Axioms and how Armstrong's Axioms are used to decide about the functional dependency on the database. We will be also learning about the Secondary Rules and Armstrong Relations. We will learn each thing in detail. Before moving ahead, you must have a knowledge of Functional De
4 min read
Database Management System | Dependency Preserving Decomposition
Dependency Preservation: A Decomposition D = { R1, R2, R3...Rn } of R is dependency preserving wrt a set F of Functional dependency if (F1 ? F2 ? … ? Fm)+ = F+. Consider a relation R R ---> F{...with some functional dependency(FD)....} R is decomposed or divided into R1 with FD { f1 } and R2 with { f2 }, then there can be three cases: f1 U f2 =
4 min read
How do you Check Functional Dependency Validity?
Answer: To validate functional dependency ensure a clear relationship, check for redundancy, and analyze data consistency using closure and transitivity.Understanding FD ConceptFunctional Dependency (FD) denotes that the value of one attribute determines another in a database. Ensuring Data Redundancy-FreePrioritize a redundancy-free dataset before
1 min read
Partial Dependency in DBMS
Database Management Systems (DBMS) design and optimize their databases for working, expecting partial dependency. It is something like a functional or strong dependency that makes it possible to show a constrained relationship between two or more attributes in a table. In this essay, we will discuss partial reliances, how to overcome them, and how
9 min read
Fully Functional Dependency in DBMS
In the case of database management systems (DBMS), knowledge of dependencies is vital for the base built on this and it is a must for the development of the database that is most useful and practical. Special interdependency, which is expressed in the schema of the database, is based on the rule of changing attributes by changing the rest of the sc
4 min read
What is Functional Dependency in DBMS?
Functional dependency in DBMS is an important concept that describes the relationship between attributes (columns) in a table. It shows that the value of one attribute determines the other. In this article, we will learn about functional dependencies and their types. What is Functional Dependency in DBMS?A dependency function (FD) is a database con
6 min read
Join Dependency in Database
Join Dependency means re-creating the original Table by joining multiple sub-tables of the given Table. It is a further generalization of MVD(multi-valued Dependencies). When a relation R can be obtained by joining the R1, R2, R3..., Rn where R1, R2, R3..., Rn are sub-relations of R, it is called a Join Dependency.R1,R2,R3...Rn are the sub-relation
5 min read
Types of Normal Forms in DBMS
Database normalization is nothing but the process of structuring an RDBMS by applying some general rules either by creating a new database design or by decomposition with a series of so-called normal forms which are: Unnormalized form or UNF First Normal Form or 1NF Second Normal Form or 2NF Third Normal Form or 3NF Elementary key normal form or EK
6 min read
Allowed Functional Dependencies (FD) in Various Normal Forms (NF)
Prerequisite - Functional Dependency and Attribute Closure We all know the following: 2 NF does not allow partial dependency.3NF does not allow transitive dependency.BCNF does not allow anything other than super key as determinant. Let’s check all possible functional dependencies to find out what is allowed and what’s not. Please note: prime attrib
2 min read
Normal Forms in DBMS
Normalization is the process of minimizing redundancy from a relation or set of relations. Redundancy in relation may cause insertion, deletion, and update anomalies. So, it helps to minimize the redundancy in relations. Normal forms are used to eliminate or reduce redundancy in database tables. Normalization of DBMSIn database management systems (
12 min read
Difference between Clausal form and Horn Clausal form in Deductive Database
1. Clausal form : In this form, the formula is made up of a number of clauses, where each clause is composed of a number of literals connected by OR logical connectives only. A clausal form formula must be transformed into another formula with the following characteristics : All variables in the formula are universally quantified. Hence, it is not
3 min read
ODBS Full Form
ODBS stands for Oracle Database Backup Service Oracle Database Backup Benefit may be a secure, adaptable, dependable, and on-demand Oracle public cloud capacity arrangement for putting away Oracle Database backups. Businesses can access extra capacity in minutes with zero equipment venture. The Oracle Database Backup Service can be gotten to from a
3 min read
ODBMS Full Form
ODBMS stands for Object Database Management System. In ODBMS data is encapsulated and represented in the form of objects. It relates the concept of object-oriented programming with database systems. ODBMS grew out of research during the early 1970s as database support for graph-structured objects. In comparison with RDBMS, where data is stored in t
2 min read
DDL Full Form
DDL stands for Data Definition Language. These commands are used to change the structure of a database and database objects.For example, DDL commands can be used to add, remove, or modify tables with in a database.The DDL commands are: CREATEALTERDROPTRUNCATERENAME 1. CREATE : This command is used to create table in the relational database . This c
4 min read
DML Full Form
DML stands for Data Manipulation Language. Tables and formulas are helpful when communicating with data stored up to a point in a database through SQL (Structured Query Language), but a time comes when we actually want to execute some fairly complicated data interactions. We will also need the Data Manipulation Language in that situation. DML is a
4 min read
Article Tags :