Results 1 to 2 of 2
  1. #1
    Join Date
    Apr 2003
    Posts
    7

    Best design for parent-child related data - please help !

    Hello all.

    I'm designing a database for customer management. Usually our customers have a headquarter and several subsidiary. I've designed in the database one table to hold all the data for customers with an extra column for specifing the parent (in case of a subisdiary):
    ...
    CustomerID
    ParentID (filled with CustomerID of the parent in case of subsidiary)
    CustomerName
    CustomerAddress
    ...

    In the case of headquarter the ParentID field is not filled.
    Is this a good design ? Should I better put them in two separate tables (one for headquarters and one for subsidiaries) and to have a traditional one-to-many realtionship between those two tables ?

    Any advice, pros and cons would be highly appreciated.
    Thanks,
    Pat
    Last edited by patm; 09-27-03 at 10:41.

  2. #2
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    that design is a traditional one-to-many relationship

    leave it, it's good

    rudy
    http://r937.com/

Posting Permissions

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