troubleshooting Question

Database schema for locations - country, state, city, street, etc

Avatar of stretch73
stretch73Flag for United States of America asked on
Microsoft SQL ServerMicrosoft SQL Server 2005
4 Comments1 Solution2955 ViewsLast Modified:
I am trying to optimize how our application stores and uses location data.  Right now we have a table called buildingCodes.  Each row is identified by a unique building ID and stores country, state, city, and street address.  Every row has country but it's kind of spotty in that we don't always have state, city, and street address.  I use this table to populate drop down lists and, considering that it has over 13k records, the response is pretty slow.  I'd like to break this into separate tables so that country has a countryID, state has a state and countryID, city has a cityID and stateID, etc and I'm wondering if anyone has a way to account for the records that are missing the information.  Am I just going to have to put in placeholders for say, the states in India, and give them generic IDs?  Pretty much stuck here, hoping someone else has run into this.

Thanks,

N
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 4 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 4 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros