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

    Unanswered: auto increment id primary key OR compound field key

    Is it considered bad design to have a primary key on an auto increment field when the same table has 2 other fields that could make a primary compound key? Any thoughts welcome.

  2. #2
    Join Date
    Apr 2002
    Toronto, Canada
    no, it is not necessarily bad design

    perhaps the question should be seen in the context of related tables

    a compound primary key means there will be compound foreign keys in any tables that reference it

    this usually wastes space compared to integer foreign keys, to say nothing of the performance of joins on compound keys

    if there will be no other tables referencing the table under consideration, then an autonumber primary key is wasteful


Posting Permissions

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