Jump to content

Keeping track of changing multiple owners of an object.


KitCarl

Recommended Posts

I need to track ownership of animals that can have up to four owners at a time which can change as they are bought/sold. I have a person table with all their info and an animal table with their respective info. Is there a better way to store this info than using a table with the fields listed below. What problems do you forward thinkers for see for this down the road?

 

PersonAnimalID | AnimalID | PersonID | DateBought | DateSold

 

 

 

 

Strictly speaking, the PersonAnimalID is not required (although, sometimes it is useful to have). You can use a primary key composed of the two fields: PersonID,AnimalID (or AnimalID,PersonID). This would only be a problem if a single person can own more than one share of the animal.

 

Other than that, your table suggestion is correct for the "many-to-many" relationship you described - many people own many animals

 

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.