I am still confuse in normalization. (1st, 2nd, 3rd, and more.)
Any body have a detail idea abt that ?
Pls explain with example.
Thxs.
Regards,
Shailesh PatelThis question should be in the data forum...
a non normalized data table for a Company might have columns thus
tblCompany
company
address
city
state
firstname
lastname
telephone
fax
email
now imagine that the same company has 2 employees. the company info gets repeated for each employee. this wastes disk space and create the potential for data to also be incorrect. It also requires a lot of extra tdata entry to keep inputting the same company data.
so lets normalize it by splitting it into 2 tables. A company table and an employee table.
tblCompany
CompanyID
company
address
city
state
tblEmployee
CompanyID
firstname
lastname
telephone
fax
email
These 2 tables are linked on the CompanyID and you can now have many Employees for any single Company. Now one of those pesky employees decided to have 3 different email addresses. So lets normalize the Employee table
tblEmployee
EmployeeID
CompanyID
firstname
lastname
tblEmployeeContactInfo
EmployeeID
telephone
fax
email
These two tables are linked on EmployeeID. Now any single employee can have multiple contact records for an unlimited number of phone, fax or email data.|||Check out this page:
http://www.bkent.net/Doc/simple5.htmsql
No comments:
Post a Comment