Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 522771
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T08:23:20+00:00 2026-05-13T08:23:20+00:00

My application will need to reference addresses. Street info will be stored with my

  • 0

My application will need to reference addresses. Street info will be stored with my main objects but the rest needs to be stored seperately to reduce redundancy. How should I store/retrieve ZIPs, cities and states? Here are some of my ideas.

single table solution (cant do relationships)

[locations]
locationID
locationParent (FK for locationID – 0 for state entries)
locationName (city, state)
locationZIP


two tables (with relationships, FK constraints, ref integrity)

[state]
stateID
stateName

[city]
cityID
stateID (FK for state.stateID)
cityName
zipCode


three tables

[state]
stateID
stateName

[city]
cityID
stateID (FK for state.stateID)
cityName

[zip]
zipID
cityID (FK for city.cityID)
zipName


Then I read into ZIP codes amd how they are assigned. They aren’t specifically related to cities. Some cities have more than one ZIP (ok will still work) but some ZIPs are in more than one city (oh snap) and some other ZIPs (very few) are in more than one state! Also some ZIPs are not even in the same state as the address they belong to at all. Seems ZIPs are made for carrier route identification and some remote places are best served by post offices in neighboring cities or states.

Does anybody know of a good (not perfect) solution that takes this into consideration to minimize discrepencies as the database grows?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T08:23:20+00:00Added an answer on May 13, 2026 at 8:23 am

    I don’t know if you’re internationalizing your app, but the general construct is this, with a one-to-many relationship with the following item:

    Country
    Region (state/province)
    City

    That’s usually sufficient to be able to filter your data in a meaningful way. Trust me on this: you don’t want to get into the technicalities of geographic land division.

    For an address, store the data above plus street address, postal code (international version of zip code), etc. down to the resolution you need. I say resolution because you could split the address field into things like apartment number, street number, street name, street direction, etc. — but that data may be dependent on the location, so I would avoid doing that if you are going to internationalize your app. Just a street address field is sufficient 99.99% of the time.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

My company is looking into writing a custom application that will need to perform
My application (written in WPF/C#) will monitor a live video source and will need
I need to find/create an application that will create employee web usage reports from
My ASP.NET MVC application will take a lot of bandwidth and storage space. How
I'm working on an application for a charitable student organization. The application will track
I have an application that uses the accelerometer. Sometimes, the application will launch without
We are designing asp.net web application in wcsf. Web application will be deployed to
I have an application the will load usercontrols dynamically depending on the user. You
We have an application that will be collecting data and storing it in local
I'm creating an application that will store a hierarchical collection of items in an

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.