When to use compound PK instead of a FK?
When to use compound PK instead of a FK?
От:
"Jamie" <jjbegin@gmail.com>
Дата:
I typically use compound primary keys when creating a table that represents a many-to-many relationship. I was wondering if anyone else had other situations in which you would use a compound PK? Why do you use it instead of just a foreign key?
Re: When to use compound PK instead of a FK?
От:
Ron Johnson <ron.l.johnson@cox.net>
Дата:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 02/04/07 09:48, Jamie wrote: > I typically use compound primary keys when creating a table that > represents a many-to-many relationship. I was wondering if anyone else > had other situations in which you would use a compound PK? Why do you > use it instead of just a foreign key? We use multi-segment PKs all the time. Is that what you meant by "compound PK"? -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) iD8DBQFFyBBOS9HxQb37XmcRAiVCAKC6OgW8uBrm5xE9idWrHjzIC/Vv9ACeOM3Q ManPjPaX0eVo+TKmg6YvOQg= =EEH9 -----END PGP SIGNATURE-----