Joost van der Sluis schrieb:
On Mon, 2006-10-09 at 20:55 +0200, Vincent Snijders wrote:
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 if you want to use that article in order item table or a bill of
materials table, you need to add 3 fields as foreign key.
how you select one version from another in the orders table when you
havend an field for that
i must add always all 3 fields
and an primary key is for me the security that the article number or
these article dont exist twice
and my data is corrupted, that hasend to do somethig with indexes
data integrity comes first for me then comes speed maybe an index with 3
fields makes no sense
but an key ...
and i can also specify secondary indexes on fields in an primary key
cant i ?!
_________________________________________________________________
To unsubscribe: mail [EMAIL PROTECTED] with
"unsubscribe" as the Subject
archives at http://www.lazarus.freepascal.org/mailarchives