Results 1 to 4 of 4
  1. #1
    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

  2. #2
    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.

  3. #3
    Join Date
    Dec 2003
    Location
    Canada
    Posts
    710
    Here's a possible approach:
    Attached Thumbnails Attached Thumbnails untitled.JPG  

  4. #4
    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •