On Mon, 2006-10-09 at 20:45 +0200, Christian Ulrich wrote:
> > Multiple-fields-primary keys, for 
> > example, I consider as a bad design. (I can imagine some 
> > exceptions, but those are really rare) 
> 
> Why ? I have at example an article table wher the primary key consists
> of 
> article number + version + language
> 
> Why an primary key that consists of these 3 fields is not an good idea
> ??

Because an primary index on one field is always faster. You could also
add ean extra index on those three fields.

Well, except, if the only thing you do is searching the database using
that three-field-primary key. So, if you also want to search for an
article-number plus a language, but without a version, it's not
effective anymore, or if you want to sort on version.... 

Joost.



_________________________________________________________________
     To unsubscribe: mail [EMAIL PROTECTED] with
                "unsubscribe" as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives

Reply via email to