Unit 4 Relational Database Design
Unit 4 Relational Database Design
Introduction:
• The goal of a relational database design is to generate a set of relation schemas that allows
us to store information without unnecessary redundancy, yet also us to retrieve information
easily.
• The table is basic building block in the database design process.
• A poor table structure degrades the performance of the RDBMS.
• So reorganization a poor table structure and producing a good table is based on
normalization.
• Normalization reduces data redundancies and helps to eliminate the data anomalies that
result from those redundancy.
Redundancies and Anomalies
• Delete Anomaly occurs when certain field information is lost due to deletion
of other fields.
• Consider the following table. It records the students and course details.
• Now if Clarina pass out of the class, and the record is deleted, it also deletes
the information that CourseID for Chemistry is 233!
• This is deletion anomaly. To rectify this defect, we should remove the student
name and course name fields from this table; they do not belong here!
Insert Anomaly
• Insert Anomaly is when we are unable to insert a piece of information unless some other piece is also
present.
• This is an exact opposite of Delete Anomaly. Consider the same table.
• We cannot insert course Algebra (CourseID = 241), unless Daniel (StudentID = 10664) enrolls for
that course!
Functional Dependency
• It is a relationship that exists when one attributes uniquely determine another
attributes.
• A functional dependency occurs when one attribute in a relation uniquely
determines another attribute.
• This can be written A -> B which would be the same as stating "B is functionally
dependent upon A."
• A dependency occurs in a database when information stored in the same database
table uniquely determines other information stored in the same table.
Determinant X Y Dependency Attributes
i.e. X Determines Y , Y is Determines by X or Y dependency on X