Results 1 to 2 of 2
  1. #1
    Join Date
    Jan 2002

    Question Unanswered: Table relationships

    I have 3 tables: Products, Books, and CDs.

    Products {Product_ID(PK), Price}
    Books {Product_ID(FK), ISBN, Author, Pages}
    CDs {Product_ID(FK), Album, Artist, Tracks}

    There are similar/overlapping attributes (Product_ID, Price) and there are different/disjoint attributes among the 3 tables.

    Is there a way to create a relationship in Ms-Access such that a "Product can either be a Book OR a CD but not both"?

    Please help. Thanks.

  2. #2
    Join Date
    Jan 2002
    At the Edge of America!
    Yes you can! You need to create a table just for your id and price.

    Then you need to create a table for cds and books

    Your cd table needs to have your productID set to a number field and
    NOT allow Duplicate entries. The same for your book table.

    Each table has its own different fields. I has one common field the product id. When you create the relationship it will create a One-toOne relationship. You can then bring them all together with a union query if you needed to.


Posting Permissions

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