I have two tables: addresses and locations.
Locations
zipcode
city
county
state
Addresses
line1
line2
city
county
state
zipcode
Posts
Id
Address_id
Body
All my users are required to provide at least a personal address and some need to provide the business address.
My users can create two types of posts: first requires to have a full address and the second requires just the location (state, city, zipcode).
Now, the issue comes because I need to allow searches for posts based on location. The search is always based on city state and zipcode (not street numbers).
Does it make sense to place all the addresses inside the Addresses table and for the posts that need just the state, city and zipcode to leave the other fields blank? Would this slow down posts searches based on addresses?
Would having in my DB 5.000-10.000 users and maybe 200.000 addresses really slow down the process of searching for first type of posts based on the address?
LocationID
to the Addresses table and remove the common fields from Addresses. City, state, zip is a rather finite set and hence will be repeated often in the Addresses table.