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 285077
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T05:30:50+00:00 2026-05-12T05:30:50+00:00

I am re-creating a part of my company’s database because it does not meet

  • 0

I am re-creating a part of my company’s database because it does not meet future needs.
Currently we have mainly a flat file and some disjoined tables that were never fully realized.

My way of thinking is we have a table for each category except maybe the zips table, which may serve as a connect it all together table.
Please refer to image below:

Database Diagram http://www.freeimagehosting.net/uploads/248cc7e884.jpg

One thing I am thinking of is removing the zip table and just putting the zip code in the zipstocities table since the zip code is almost unique and then indexing the table on the zip code. The only downside is zip code has to be a varchar to take care of zip codes with leading zeros. Just want to know if there is a flaw in my logic.

  • 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-12T05:30:50+00:00Added an answer on May 12, 2026 at 5:30 am

    I don’t know the US ZIPcode and territorial devision system well, but I assume it’s somewhat like the German one.

    • A state has many counties.
    • A county has many cities.
    • A city has many zip codes.

    Hence I would use the following schema.

    
    ZipCodes          CityZipCodes
    ------------      ----------------      Cities
    ZipCode (PK) <─── ZipCode (PK)(FK)      -----------
                      City    (PK)(FK) ───> CityId (PK)
                                            Name
                                            County (FK) ───┐
                                                           │
                                                           │
                                         Counties          │
                                         -------------     │
                  States                 CountyId (PK) <───┘
                  -----------------      Name               
                  StateId      (PK) <─── State    (FK)
                  Name
                  Abbreviation
    

    Fixed for multiple cities per ZIP code.

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

Sidebar

Related Questions

I have a part of my code creating and opening database but I have
I'm programmatically creating an edmx file as part of our code generation process and
You may skip this part: I am creating an application where the client needs
I have a problem creating authentication part for my application. Below is the simplified
I'm currently creating a WPF app in C# and have been following this diagram
I am creating an part of a website that deals with confirmation of a
I am creating a SharePoint web part in C# and part of it outputs
I am creating a simple blog as part of a website and I am
After creating a listview from VS2010 and adding it as a web part to
I'm creating a ASP.NET .NET 4.0 website and part of this site requires that

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.