Put it this way:

   you can never go wrong with

      ID Integer Identity Primary Key

   It is efficient and costs little even in something like a state table where,
   by definition, the state code is unique

The one exception I normally make is in the table that provides a 
many to many relationship.  I usually use the combo of two FKs as the 
PK:

CREATE TABLE AdItemAndImage
  (
   AdItemID           Integer References AdItem,
   ImageID            Integer References Image,
   PRIMARY KEY        (AdItemID, ImageID)
  ) 

HTH

Dick

At 2:35 PM -0500 7/20/01, Pooh Bear wrote:
>nooooo!!!  u guys dont understand.  the state thing was an example!  it was
>a design issue in general, and i wanted a general answer.  when is it good
>to use and id, and when is it good not to.  it's good to use an id if the
>information changes a lot, but it could be sitll linked by ID, and can be
>shared by many.  but, if all of the many used textual of actual information,
>instead of getting it from a common source, I'd have a lot of toruble going
>through all of those rows just to change one thing.  understand what i mean?
>hehe
>

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to