Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Normalization Question? Have I gone too far...... 1

Status
Not open for further replies.

stnkyminky

Programmer
Oct 15, 2001
476
US
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. Scott
Programmer Analyst
<><
 
From a practical point of view, this is to far, store the addresses in a memofield, if they are that big. Storing in multiple tables also main more processing for retrieving the data. Steven van Els
SAvanEls@cq-link.sr
 
I don't think it's going too far to have a separate address table. Yes, you will pay a small performance penalty doing a join. The advantage is decoupling your other tables from the details of addresses. In addition to companies, do you have tables for employees, divisions, etc. that have addresses? If so, they can also use this table.

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.
 
Normalisation is used to break out repeated information.
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.
 
BobWhiteField,
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
<><
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top