Microsoft Access Removing Redundancy in a Database
Objectives Identify repeated data Identify related information Redundant data anomalies Removing redundancy
Identifying Repeated Data ID NumberNameAmount PaidTrans. Date 93500Phillip, Doe15.754/12/ Phillip, Doe20.354/18/ Phillip, Doe15.755/23/ James, Elsa25.005/23/2009 Repeated data for person with ID Number has to be kept in this table, in order to track amount paid and transaction date Some repeated data may seem redundant (for example, Transaction Date). But should actually be treated as separate fields
Identifying Related Information ID NumberNameAmount PaidTrans. Date 93500Phillip, Doe15.754/12/ Phillip, Doe20.354/18/ Phillip, Doe15.755/23/ James, Elsa25.006/17/2009 ID Number and Name data describe information relevant to a person. Thus, ID Number and Name with (93500, Phillip Doe), should to kept in a Persons table The Amount Paid and Transaction Date describe transaction data, and should be kept in a Transactions table, linked to the Persons table through the ID Number
Redundant Data Anomalies Redundant databases can have modifications anomalies: Update anomaly Insertion anomaly Deletion anomaly
Update Anomaly Update to an employee’s address information did not fully complete The same employee has conflicting address information
Insertion Anomaly Suppose a table stores information about faculty and their courses New faculty that has not been assigned to teach any courses, cannot be inserted into the database
Deletion Anomaly When the faculty member temporarily stops teaching the course assigned, the entire record –including information about the faculty– has to be deleted
Removing Redundancy “Normalization” increases efficiency by eliminating redundant data, while ensuring that only related data are kept together Separate tables are kept for each group of related data Sets of related data are uniquely identified with a primary key Relationships between tables are established via link fields
Faculty and Courses Faculty IDFaculty Name Hire Date 389Dr. Giddens10-Feb Dr. Saperstein 19-Apr Dr. Newsome 29-Mar Course CodeFaculty ID ENG CMP