Module 3.1 DBMS PDF
Module 3.1 DBMS PDF
MCA 104
Module–5
Func onal Dependencies
In the field of database management systems (DBMS), func onal
dependencies are a fundamental concept used to describe the
rela onships between a ributes (or columns) in a database table. They
play a crucial role in database design, normaliza on, and ensuring data
integrity.
Func onal dependencies are rules that specify how the values of certain
a ributes determine the values of other a ributes in the same table. In
other words, given a set of a ributes in a table, a func onal dependency
states that the value of one or more a ributes uniquely determines the
value of another a ribute. This rela onship helps us understand the
dependencies and constraints within the data, allowing for the crea on
of well-structured and organized databases.
A func onal dependency is denoted by an arrow (->) and can be
represented as follows:
A -> B
If "B" is a subset of "A," then "A" -> "B." In other words, if a func onal
dependency holds for a set of a ributes, it also holds for any of its
subsets.
Example: If we have a func onal dependency "EmployeeID, Department"
-> "EmployeeID," then we can deduce "EmployeeID" -> "EmployeeID" by
applying the reflexivity axiom.
If "A" -> "B," then "A, C" -> "B, C." This axiom allows us to add the same
a ributes to both sides of an exis ng func onal dependency.
If "A" -> "B" and "B" -> "C," then "A" -> "C." This axiom allows us to
combine two func onal dependencies to deduce a new func onal
dependency.
These three axioms form the basis of inference rules used in Armstrong's
closure algorithm, which is used to compute the closure of a set of
a ributes with respect to a given set of func onal dependencies. The
closure of an a ribute set is the set of all a ributes that are func onally
determined by the given a ribute set.
The mul valued dependency is represented as "A ->> B," where "A" is
the determinant or set of a ributes, and "B" is another set of a ributes.
Example: In a table of students and their courses, where "StudentID" is
the primary key and "CourseName" is an a ribute, the func onal
dependency "StudentID ->> CourseName" states that for each
"StudentID," there can be mul ple values of "CourseName."
3. Transi ve Dependency:
The transi ve dependency is represented as "A -> B" and "B -> C,"
implying "A -> C."
4. Par al Dependency:
In other words, a func onal dependency "A -> B" is non-trivial if "B" is
not included in the set of a ributes represented by "A."
In other words, a func onal dependency "A -> B" is a fully func onal
dependency if, for every a ribute "X" in "A," the dependency "A - {X} ->
B" becomes trivial (B is a subset of A - {X}).
Func onal dependencies play a cri cal role in the field of database
management systems (DBMS) and offer several advantages that
contribute to the effec veness, integrity, and efficiency of database
design and opera ons.
Formally, a mul valued dependency is denoted as "A ->> B," where "A"
and "B" are two sets of a ributes in the same table. The dependency
means that for every combina on of values in "A," there can be mul ple
combina ons of values in "B," and vice versa. It indicates that the sets
"A" and "B" are independent and can exist in various combina ons.
Ar stName
Let's assume that ar sts can perform mul ple genres, and the "Genres"
a ribute is a composite or nested a ribute that can hold a list of genres
for each ar st. For example:
In this case, we have another mul valued dependency "Ar stID ->>
Awards." Each ar st can win mul ple awards, and the set of awards
associated with each ar st is independent of other ar sts' sets of awards.
Ar stName
1. Ar stsGenres Table:
2. Ar stsAwards Table:
Now, the original "Ar sts" table has been decomposed into two smaller
tables, "Ar stsGenres" and "Ar stsAwards." Each table contains non-
repea ng data, and the mul valued a ributes have been resolved. The
"Ar stID" and "Ar stName" a ributes serve as the primary key in both
tables, maintaining the rela onship between ar sts, their genres, and
their awards.