In: Computer Science
Create an ERD chart that prevents data redundancies and anomalies. The entire primary key must determine the values in the other columns of a table. No non-key column should determine the value of another column.
The data this system must store:
Property lot numbers and their corresponding addresses
Owners’ last names and first names
Owners’ various phone numbers
Owners various email addresses
Owner various mailing addresses and the months when they reside at them
The relationship between owners and properties
Lot number |
Property Address |
Owner |
Mailing a Address 1 |
Months |
Mailing a Address 2 |
Months |
Phone Numbers |
Phone 2 |
Email Addresses |
|
1 |
1 First St., Tucson, AZ, 85700 |
Andrew Andover |
1 First St., Tucson, AZ, 85700 |
1 2 3 4 5 6 7 8 9 10 11 12 |
520-111-1111 |
|||||
2 |
2 Second St.,Tucson, AZ 85700 |
Barbara Berthold |
2 Second St.,Tucson, AZ 85700 |
1 2 3 4 5 6 7 8 9 10 11 12 |
520-222-2222, 520-222-2223 |
|||||
3 |
3 Third St., Tucson, AZ 85700 |
Carl Clementi & Carol Clementi |
3 Third St., Tucson, AZ 85700 |
1 2 3 4 5 6 7 8 9 10 11 12 |
520-333-3333 (Carl), 520-333-3334 (Carol) |
|||||
4 |
4 Fourth St, Tucson, AZ 85700 |
David Lopez |
4 Fourth St, Tucson, AZ 85700 |
10 11 12 1 2 3 4 |
4 Faraway Rd., Show Low, AZ 85400 |
5 6 7 8 9 |
520-444-4444, 520-444-4445 |
|||
5 |
5 Fifth St., Tucson, AZ 85700 |
Edward Eversharp & Elena Eagleton |
5 Fifth St., Tucson, AZ 85700 |
10 11 12 1 2 3 4 |
5 Forest Way, Show Low, AZ 85400 |
5 6 7 8 9 |
520-555-5555 (land), 520-555-5556 (Edward), 520-555-5557 (Elena) |
|||
The database system needs to be normalised to remove redundancies and anomalies,
Let’s break the given table in below tables and add FirstName and LastName for the Owner as per the requirement:
Now Consider the table Owner, if we observe, the table is not in 1st normal form as:
Break the Owner table to store the EmailAddreses and PhoneNumber in separate tables, Owner table will be changed in this process:
Now consider Address and Months columns in Owner table, an owner can stay at different addresses for different months. Thus these columns need to be handled in separate tables:
Thus the table given in the problem is broken into below tables:
Let’s create the ERD for the above tables:
Relationship in ERD Diagram:
ERD Notations: