Results 1 to 2 of 2
  1. #1
    Join Date
    Jun 2004
    Posts
    10

    Unanswered: supertype relationships

    Is there a way to create a supertype/subtype table in sql server 2000 or is supertype/subtype an abstract idea rather than an option on creating a table?

    i would like to set up a supertype table:

    person
    personid
    firstname
    lastname

    and two subtype tables:

    employee
    id
    personId
    ss#

    customer
    id
    personId
    someOtherInfo

    how do i set this up so that I cant have the same personid in employee and customer. How do i make sure that the personid is in either one or the other.

    thanks

  2. #2
    Join Date
    Nov 2002
    Location
    Jersey
    Posts
    10,322
    With foreign keys and 2 triggers...


    But what do you mean that it has to be 1 or the other...it could be none...
    Brett
    8-)

    It's a Great Day for America everybody!

    dbforums Yak CorralRadio 'Rita
    dbForums Member List
    I'm Good Once as I ever was

    The physical order of data in a database has no meaning.

Posting Permissions

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