160 likes | 180 Views
Learn about normalization by solving exercises. In this example, we create 3 tables and distribute the attributes among them.
E N D
2nd Normal Form Create 3 Tables Distribute the remaining Attributes COMPID INSTDATE SOFTCOST EMPNUM EMPNAME LOCATION
2nd Normal Form INSTDATE, SOFTCOST (none in this example), could be things like package name, version, etc. COMPID, EMPNUM, EMPNAME, LOCATION Because the Package table has only one field (PACKID), we really don’t need this table
Normalization Example 2 Don’t be tricked!!! The first column of the data is not always the primary key of the 1NF table.
1st Normal Form If 1NF has only one column as the primary key (no composite key) then 1NF and 2NF are the SAME!!!!!
3rd Normal Form Knowing the nature of the information, we can see that one person can have two cars and probably LIC_PLATE_NO should be the primary key for the REGISTRATION table and the foreign key for the PARKING_TICKETS table and that another table with LIC_PLATE_NO and LIC_PLATE_ST as a primary key and SSN as a foreign key should exist