Jump to content

Keeping track of changing multiple owners of an object.


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

 

 

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.