Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

I have an application where I have to store adresses of multiple types of location.

For example, my app requires addresses of people, hotels and event venues.

Should I create separate tables for different type of addresses having same fields? or Should I add an additional field telling what is the type of address?

share|improve this question

1 Answer 1

up vote 6 down vote accepted

Unless the attributes between the different types are totally different (which I doubt), go for the second option and store the address type in a column of the address table.

share|improve this answer
    
I have two different tables and both need an address. Is it okay if I enter foreign key to address table from both the tables above? –  codecool Sep 22 '12 at 15:31
1  
@codecool: that's perfectly fine. –  a_horse_with_no_name Sep 22 '12 at 15:31

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.