Take the 2-minute tour ×

Suppose i have a table with 3 fields

Person_id, Name and address. Now the problem is that a person can have multiple addresses. and the principle of atomic values says that data should be atomic.

So then how am i suppose to store multiple addresses for a single person ?

share|improve this question
ya well i am getting use to the sites functions initially i didn't knew how to approve an answer. –  Some Body May 13 '12 at 16:09

3 Answers 3

up vote 9 down vote accepted

You're supposed to create an ADDRESS table that has a foreign key linking it to a PERSON record, i.e. PERSON_ID. This is the "relational" component of a relational database, and it's why it's more flexible than a flat file (which is like a single table).

share|improve this answer
but then what would be the primary key of the address table ? –  Some Body May 13 '12 at 15:44
ID would be the primary key. ADDRESS table would have multiple fields, starting with ID, PERSON_ID,STREET,CITY, etc. –  Marc May 13 '12 at 15:45
ok and what if the a single address can have have multiple persons ? –  Some Body May 13 '12 at 15:48
That single address could have multiple records in the ADDRESS table with different PERSON_ID. BTW, is this homework? –  Marc May 13 '12 at 15:49
@SomeBody, you could consider making ADDRESS the parent side of the relationship with PERSON being the reference, or you could create a bidirectional relationship. But this discussion is going beyond the scope of your original question. –  Marc May 13 '12 at 16:02

Put adresses in a second table, give each adress a "Person ID", so that mutiple rows in the adress-table can referr to on person.

share|improve this answer
Better explained by Marc, below :) –  Jim H May 13 '12 at 15:40

I would suggest adding a address type to the address table to identify which type of address it is (Home, Vacation, Office), etc. Something like: AddType that refers to a list table where more types could be added down the road.

share|improve this answer

Your Answer


