Re: How would you choose keys for the following?
Posted by: James Gordon
Date: June 13, 2007 08:18AM

I would not have owner in the diseases table as it is the pet that has the disease not the owner.

Personally I would go for a many-to-many joing between pets and diseases.

owners
~~~~~~
ownerid (auto increment)
Name
...
|
|
/|\
Pets
~~~~
petid (auto increment)
Name
...
|
/|\
petdiseases
~~~~~~~~~~~
petid
diseaseid
medication_taken
...
\|/
|
diseases
~~~~~~~~
diseaseid (auto increment)
Description
...

Options: ReplyQuote


Subject
Written By
Posted
Re: How would you choose keys for the following?
June 13, 2007 08:18AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.