Docsity

DBMS Normalization Notes - 1NF, 2NF, 3NF, BCNF with Solved Examples, Study notes of Database Management Systems (DBMS)

Toggle sidebar
bg1
MODULE 4-
MODULE 4-
Normalization
Normalization
Different anomalies in designing a database,
The idea of normalization, Functional
dependency,
Armstrong’s Axioms (proofs not required),
Closures and their computation, Equivalence of
Functional Dependencies (FD), Minimal Cover
(proofs not required). First Normal Form (1NF),
Second Normal Form (2NF), Third Normal Form
(3NF), Boyce Codd Normal Form (BCNF),
Lossless join and dependency preserving
decomposition, Algorithms for checking
Lossless Join
(LJ) and Dependency Preserving (DP)
properties.
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c
pf1d
pf1e
pf1f
pf20
pf21
pf22
pf23
pf24
pf25
pf26
pf27
pf28

Partial preview of the text

Download DBMS Normalization Notes - 1NF, 2NF, 3NF, BCNF with Solved Examples and more Study notes Database Management Systems (DBMS) in PDF only on Docsity!

MODULE 4-MODULE 4-

Normalization Normalization

Different anomalies in designing a database, The idea of normalization, Functional dependency, Armstrong’s Axioms (proofs not required), Closures and their computation, Equivalence of Functional Dependencies (FD), Minimal Cover (proofs not required). First Normal Form (1NF), Second Normal Form (2NF), Third Normal Form (3NF), Boyce Codd Normal Form (BCNF), Lossless join and dependency preserving decomposition, Algorithms for checking Lossless Join (LJ) and Dependency Preserving (DP)

Different anomalies inDifferent anomalies in

designing a database designing a database

 If a table is not properly normalized and have data redundancy then it will not only eat up extra memory space but will also make it difficult to handle and update the database, without facing data loss.  Insertion, Updation and Deletion Anomalies are very frequent if database is not normalized.

 In the table above, we have data of 4 Computer Sci. students.  As we can see, data for the fields branch, hod(Head of Department) and office_tel is repeated for the students who are in the same branch in the college, this is Data Redundancy.

Insertion AnomalyInsertion Anomaly

Suppose for a new admission, until and unless a student opts for a branch, data of the student cannot be inserted, or else we will have to set the branch information as NULL.  Also, if we have to insert data of 100 students of same branch, then the branch information will be repeated for all those 100 students.  These scenarios are nothing but Insertion anomalies.

Deletion AnomalyDeletion Anomaly

 In our Student table, two different informations are kept together, Student information and Branch information.  Hence, at the end of the academic year, if student records are deleted, we will also lose the branch information.  This is Deletion anomaly.

What is Normalization?What is Normalization?

 (^) Normalization is a database design technique that reduces data redundancy and eliminates undesirable characteristics like Insertion, Update and Deletion Anomalies.  (^) Normalization rules divides larger tables into smaller tables and links them using relationships.  (^) The purpose of Normalisation in SQL is to eliminate redundant (repetitive) data and ensure data is stored logically.

roll_no name dept_name dept_buildi ng 42 abc CO A 43 pqr IT A3the 44 xyz CO A

invalid functionalinvalid functional

dependencies: dependencies:

 name → dept_name ◦ Students with the same name can have different dept_name, hence this is not a valid functional dependency.  dept_building → dept_name ◦ There can be multiple departments in the same building, For example, in the above table departments ME and EC are in the same building B2, ◦ hence dept_building → dept_name is an invalid functional dependency.

Armstrong’sArmstrong’s axioms/properties ofaxioms/properties of

functional dependencies: functional dependencies:  (^) Reflexivity: If Y is a subset of X, then X →Y holds by reflexivity rule ◦ For example, {roll_no, name} → name is valid.  (^) Augmentation: If X → Y is a valid dependency, then XZ → YZ is also valid by the augmentation rule. ◦ For example, If {roll_no,^ name}^ → dept_building is valid, hence {roll_no, name, dept_name} → {dept_building, dept_name} is also valid.→  (^) Transitivity : If X → Y and Y → Z are both valid dependencies, then X →Z is also valid by the Transitivity rule. ◦ For example, roll_no → dept_name & dept_name → dept_building, then roll_no → dept_building is also valid.

Non Trivial FunctionalNon Trivial Functional

Dependency Dependency

 when A->B holds true where B is not a subset of A. In a relationship, if attribute B is not a subset of attribute A, then it is conside ◦ (Company} -> {CEO} (if we know the Company, we knows the CEO name) ◦ But CEO is not a subset of Company, and hence it's non-trivial functional dependency.

Multivalued DependencyMultivalued Dependency

 Multivalued dependency occurs in the situation where there are multiple independent multivalued attributes in a single table.  A multivalued dependency is a complete constraint between two sets of attributes in a relation.  It requires that certain tuples be present in a relation.