sequential key vs. composite key again!

From: cameron cleland <cameron.cleland_at_ci.sj.ca.us>
Date: 1998/01/22
Message-ID: <34C7F13C.70EB_at_ci.sj.ca.us>#1/1


I've read the old posts where some people think a sequential key is better than a composite key. Their arguments tend to stess 2 points:

  1. sequential keys allow for faster queries.
  2. sequential keys allow for changes to composite keys without ripple effects into foreign keys.

I have issues with each of these points:

  1. Why would sequential keys allow faster queries? You would never need to query by the sequence number anyway. Queries would be by the composite key, because that's what the user knows.
  2. If your business rules requires changes to your composite keys, then don't use them as foreign keys! Isn't that the same effect as a surrogate key?

A real world example is address data. The composite primary key is 5 columns: street name, street direction, street number, street type (like "dr" or"rd") and suite number. Sometimes addresses change, but I really don't see a need for a sequential surrogate key.

DO you? Received on Thu Jan 22 1998 - 00:00:00 CET

Original text of this message