MySQL Forums
Forum List  »  Newbie

How to store data for person who has resided in multiple residences and residences with multiple occupants
Posted by: Heather Gilchrist
Date: June 11, 2014 10:56AM

Teaching myself mysql in order to create a database to store family photos/genealogical info. There's something I'm not grasping and it's driving me crazy.

A person will often have multiple residences (or occupations, children, etc) over their lifetime. Is there a recommended way to store these multiple residences (etc) so they are related to a specific person_id without having to make a multiple new 'residence_id' columns in the person table (ie. residence2_id, residence3_id, etc) or add multiple person_ids to the residence table (ie. residences with multiple occupants)?

Sample tables (simplified for ease of explanation--I have many more columns))

person table

person_id (INT NOT NULL AUTO_INCREMENT key)
person_name (CHAR(128))
person_occupationID (INT)
person_residenceID (INT)

residence table

residence_id (INT NOT NULL AUTO_INCREMENT key)
residence_name (CHAR(128))
residence_street (CHAR(255))
residence_stateprov (CHAR(32))
residence_country (CHAR(32))

Options: ReplyQuote


Subject
Written By
Posted
How to store data for person who has resided in multiple residences and residences with multiple occupants
June 11, 2014 10:56AM


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.