bob the poet writes:
[Quoting Norm:]Well, no -- it is true of ALL databases that ANY two tables in them that you intend to use in a "master-detail" fashion should be linked by a field that is unique in the "master" table. (And since a primary key, by its very nature, won't allow any duplicates, it is the obvious candidate for this.)I agree with you that the proper design of a database needs a primary key set on the master table with no duplicates allowed.??? First of all, I think you mean "design of a table (or perhaps 'these two tables')",
If, as a not-even-very-charitable reading suggests, Norm is talking about *only* the case we have here -- how to properly connect two tables _in a "master-detail" relationship_ -- then he is perfectly correct not only in this instance, but for this kind of relationship in all (SQL-based) databases in general.
and second, that's not true for all tables.No, but then we weren't talking about "all" tables in general, but more specifically those that are involved _in a "master-detail" relationship_.
If the "proper" design were "no duplicates allowed", then why have the option at all?For indexes on fields that are *not* used to link a "detail" table to a "master" one, of course.
And for indexing the link field in the *"detail"* table, because it is the nature of a "master-detail" relationship that there *can* be many "detail" records for each "master" record... The uniqueness requirement is only on the "master" table, because there can be only one "master" record for each "detail" record.
Because some sets are not atomistically unique.Huh?!? Idunno, suddenly you're using words like "set" (and, Bog help me, "atomistically unique"! WTF???)... Are you talking of "sets" of values of fields *other* than the one used to link a "detail" to a "master" table?
'Coz if you are, you aren't talking about the same thing as anyone else in this thread. (And besides, if you're talking about "sets" of *complete* rows from a table, you're factually wrong here too.)