|
Hi
Just a note regarding to a compound PK. Based on my
experience as DBA I would suggest
that you DO NOT use compound PK and use an
artifical PK. You can still create an Index on
you the fields of the original PK and keeping the
values unique.
The rational to do so is that values of the
compound PK could change and you would have
a hard time to adjust because the values must be
unique. Imagine that you have a company
with several offices. The office number is part of
the compound key of the Orders. Now you
have to close an office and transfer all the orders
to one of the other offices. It will take a lot
of time to renumber and adjust all the references
from all FK. If you would use an artifical key
then you would only have to renumber the values of
the original PK attributes but not the
references.
Have a nice day - Andy
|
- [JBoss-dev] fk in compound pk Ken Chang
- RE: [JBoss-dev] fk in compound pk Dain Sundstrom
- RE: [JBoss-dev] fk in compound pk Andreas Schaefer
- RE: [JBoss-dev] fk in compound pk Dan OConnor
