Relational Database Degin - FD and Normalization
Relational Database Degin - FD and Normalization
Here, EmpID→EmpName
Types of Functional Dependency
Closure properties of functional
dependencies
▪ The Closure Properties of FDs refers to the set of all
functional dependencies that can be logically
inferred from a given set of FDs using a set of
inference rules.
▪ The closure properties help determine all possible
FDs that can be derived from a given set of FDs.
▪ These properties, or rules, ensure that any FD that
logically follows from the original set can be
identified.
Closure Properties
Closure Properties
Closure of Attributes
2 Bob 34444555
A relation is in Second Normal Form (2NF) if it is
in First Normal Form (1NF) and all non-key
Second Normal attributes are fully functionally dependent on the
primary key. If any attribute is only partially
Form (2NF) dependent on the primary key (i.e., it depends on a
part of a composite primary key rather than the
whole key), then the table is not in 2NF
This table is not in 2NF. Here, roomNo is dependent only in subject i.e. not whole composite key
To convert the table to 2NF, we need to remove
Converting into partial dependencies. We can achieve this by
creating two tables: one for the student_subject
2NF relationship and another for the subject_room
relationship.
Alternative Design for 2 NF
Third
Normal
Form (3NF)
▪ A relation is in Third Normal
Form (3NF) if it is in Second
Normal Form (2NF) and it has
no transitive dependencies.
▪ In other words, the non-key
attributes must not depend on
other non-key attributes i.e.,
Every non-key attribute must be This relation is not in 3 NF as
directly dependent on the primary roomNo→Building
key.
Converting into 3NF