Normalization Question? Have I gone too far......
Normalization Question? Have I gone too far......
(OP)
Ex. tblCompany stores city, state, name, zipcode, etc.
tblAddress stores Address Line 1, 2, 3, 4.
Using a FK relationship I store the address information about the the company in tblAddress. When needed I use the appropriate join and voila. I am also doing the same with phone numbers in respect to a customer. Have I gone too far? Is this common practice to normalize to this level?
My intentions were to eliminate as many null fields in the database as possible.
tblAddress stores Address Line 1, 2, 3, 4.
Using a FK relationship I store the address information about the the company in tblAddress. When needed I use the appropriate join and voila. I am also doing the same with phone numbers in respect to a customer. Have I gone too far? Is this common practice to normalize to this level?
My intentions were to eliminate as many null fields in the database as possible.
Scott
Programmer Analyst
<><
RE: Normalization Question? Have I gone too far......
Steven van Els
SAvanEls@cq-link.sr
RE: Normalization Question? Have I gone too far......
When it comes time to make a change (adding additional fields to handle foreign addresses, for example), you can do it in one place, not several.
Unless this is a huge, time-critical database, developer maintenance costs will usually far outweigh the performance costs of a separate table.
RE: Normalization Question? Have I gone too far......
So splitting an address into 2 parts is not part of normalisation, so you have gone too far.
If your personal preference is to do it though, then go ahead.
You should only get tables whose relationship is one to many at the end of normalisation. Many to Many needs an intermediate table and One to One (yours) is unnecessary splitting information.
RE: Normalization Question? Have I gone too far......
I have a contact(could be employee) table, company table, address table.
tblContact contains a FK to tblCompany's PK
tblAddress contains a FK to tblCompany's PK
So inorder to retrieve a contacts information I will need to join 3 tables.
Little Havoc,
I understood the final relationship between the two tables is 1:M or more specifically 1:4.
You are correct that normalization is used to break up repetative information. However, it is also used to reduce the number of null values in a database.
Thank you all for you comments.
Scott
Programmer Analyst
<><