









Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!










Definition: The process of producing a simpler and more reliable database structure by creating a suitable set of relations for storing data. Purpose: (^) Simplifies database design complexities. (^) Produces consistent, reliable relations. (^) Eliminates processing problems and data redundancy. (^) Brings the database to a "consistent state." Why do we need normalization? To avoid the problems like Redundancy of data, wastage of storage and data inconsistency etc..
(^) Functional dependency is a relationship between two attributes. (^) It states that if the value of one attribute is known, it is possible to obtain the value of another attribute. (^) It means that attribute B is functionally dependent on attribute A if the value of A determines the value of B. The functional dependency is written as follows: A B Determinant (A): The attribute on the left. Determined (B): The attribute on the right.
The process of Normalization works through different stages known as Normal forms. These stages are:
repeating data is stored in the new relation.
Composite Primary Key: (StudentID + CourseID) Functional Dependencies: StudentID StudentName CourseID CourseName
StudentName depends only on StudentID AND CourseName depends only on CourseID They do not depend on the complete primary key. Therefore, this relation contains Partial Dependency
A relation is in 2NF if:
Separate the table into smaller tables StudentID StudentNam e 101 Ali 102 Sara CourseID CourseName C1 DBMS C2 OOP StudentID CourseID 101 C 101 C 102 C Course Table Student Table Enrollment Table Result:
BCNF (Boyce-Codd Normal Form) is an advanced version of 3NF. A table is in BCNF if:
(^) If an attribute determines another attribute, then it must be a candidate key. Example: Teache r Subjec t Room Ahmad DBMS R Ahamd OOP R Sara Java R Not in BCNF Functional Dependencies: Teacher, Subject Room Teacher Room Problem: Teacher determines Room. But Teacher is not a candidate key. Therefore, the relation violates BCNF.
Teacher Room Ahmad R Sara R This Table stores: which Room belongs to which teacher. TeacherSubject Table Teache r Subject Ahmad DBMS Ahmad OOP Sara Java TeacherRoom Table This Table stores: which subject is taught by which teacher. Result: There will be no anomalies. Example: If Ahmad’s room changes from R1 TO R3: We update only ONE row. Not multiple rows.
Studen t Hobby Languag e Ali Readin g English Ali Readin g Urdu Ali Readin g English Ali Readin g Urdu Problem:
A table is in Fifth Normal Form (5NF) if: