If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > General > Database Concepts & Design > Ideas for table design?

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 02-14-05, 15:35
RedNeckGeek RedNeckGeek is offline
Village Idiot
 
Join Date: Jul 2003
Location: Michigan
Posts: 1,941
Ideas for table design?

I import a large table from our legacy system daily. It has a lot more data than I need, so I'm going to skip many of the columns. I'm also thinking
about normalizing the data some by splitting into two tables.

It's a customer table, and the columns I need are:

Billto#
Shipto#
and address info

The billto is the parent, and the shipto is the child. In many cases the billto is the same as the shipto. But a billto can also have multiple shipto's.
A billto cannot exist unless it is also a shipto.

I'll use this info generally for mailing. Sometimes I'll want to do mass mailings only to the Billtos, and sometimes I may want to do a mailing to all of the Shipto's belonging to a Billto.

I guess my question is:
Should I just leave everything in one table, or would I be better to split it into
2 tables with a one-to-many relationship? I'm leaning towards 1 table, but I'm not sure.

Thanks
__________________
Inspiration Through Fermentation
Reply With Quote
  #2 (permalink)  
Old 02-14-05, 23:57
ByteRyder52 ByteRyder52 is offline
Registered User
 
Join Date: Feb 2005
Location: Colorado Springs
Posts: 222
It seems there might be advantages to having an Addresses table, with your main table having 1:M links to it on both the BillTo and ShipTo fields. From your description, it might be that ShipTo actually has M:M link to main table? This would require an intermediate table.
Reply With Quote
  #3 (permalink)  
Old 02-15-05, 01:32
certus certus is offline
Registered User
 
Join Date: Dec 2003
Location: Canada
Posts: 710
Here's a possible approach:
Attached Images
File Type: jpg untitled.JPG (21.3 KB, 104 views)
__________________
visit: relationary
Reply With Quote
  #4 (permalink)  
Old 02-15-05, 06:49
RedNeckGeek RedNeckGeek is offline
Village Idiot
 
Join Date: Jul 2003
Location: Michigan
Posts: 1,941
That's what I was looking for, but couldn't quite figure out.
Thanks a lot!
__________________
Inspiration Through Fermentation
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On