The Artima Developer Community
Sponsored Link

Design Forum
Designing address table

3 replies on 1 page. Most recent reply: May 16, 2005 4:09 AM by Adam Duffy

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 3 replies on 1 page
kam k

Posts: 2
Nickname: kamk
Registered: May, 2005

Designing address table Posted: May 11, 2005 3:47 AM
Reply to this message Reply
Advertisement
Hi,

I have several entities having address as the attribute (address is a composite attribute with first line, second line, third line, town, postcode). And also i will have multiple addresses for some of the entities. Is it a good idea to put the address as a separate table?


Adam Duffy

Posts: 168
Nickname: adamduffy
Registered: Feb, 2003

Re: Designing address table Posted: May 13, 2005 3:30 AM
Reply to this message Reply
Unless you have more than say more than 100 entities at the same address then just put the address in the same table.

Do what works today and if it becomes a performance problem then worry about creating a separate table (but only then).

Adam

P.S. The number 100 above is not the Universal Constant of Decomposition. It's just an illustrative figure.

Ravi Venkataraman

Posts: 80
Nickname: raviv
Registered: Sep, 2004

Re: Designing address table Posted: May 13, 2005 8:40 AM
Reply to this message Reply
Yes, it is a good idea to put addresses in a separate table.

Especially since some entities can have multiple addresses.

That is the requirement now, not some future one.

Putting address into the same table will cause you a lot of problems.

Adam Duffy

Posts: 168
Nickname: adamduffy
Registered: Feb, 2003

Re: Designing address table Posted: May 16, 2005 4:09 AM
Reply to this message Reply
I jumped the gun on answering that question.

If this is a college database assignment. Normalise the database to the maximum possible.

If this is a personal/business application then the question of "what is the address for?" needs to be considered. Is it for posting informative letters (think students sharing a house or apartment receiving examination results) or is it for a utility supplier (i.e. electricity company where one address should only receive one bill)?

Adam

Flat View: This topic has 3 replies on 1 page
Topic: Database design Previous Topic   Next Topic Topic: web desigh

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use