In cases where the userid - accountid pairs are always unique, the
additional PK is redundant (although 99% of the time it's there anyway
due to lazy design).  A "lookup" table whose sole purpose is to create
relationships between the two other tables should not have duplicate
userid-accountid pairs.

In another case, let's say you have a table containing logon
information which stores userid and accountid along with other data in
each row.  In this case you'd have multiple instances of the same
userid-accountid pairs, and you'd need a separate PK to uniquely
reference specific instances of that pair in the table.

Kristina


I think I said I agreed with that.

Cheers,

tedd

--
-------
http://sperling.com  http://ancientstones.com  http://earthstones.com
_______________________________________________
New York PHP Users Group Community Talk Mailing List
http://lists.nyphp.org/mailman/listinfo/talk

http://www.nyphp.org/Show-Participation

Reply via email to