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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T00:34:17+00:00 2026-05-23T00:34:17+00:00

Say that I have a few tables that never change, such as a ‘State’

  • 0

Say that I have a few tables that never change, such as a ‘State’ (referring to U.S. states) or ‘Country’ table. If I then have a Customer table which stores information such as CustomerState, CustomerCountry, is it really necessary to store them as the FK to the respective table?

The values are populated from forms that pull the appropriate data from State or Country (i.e. states will always be going in as their correct 2-letter codes – users can’t enter custom input or anything fishy like that).

I ask because it seems like adding extra joins for something so simple will just slow queries down. This isn’t an issue for me now since I work on a tiny database…but someday I might not. Does it even matter? Is the performance loss so insignificant that I should just do it?

  • 1 1 Answer
  • 1 View
  • 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-23T00:34:18+00:00Added an answer on May 23, 2026 at 12:34 am

    The design rule of thumb here is that if the set of values has low cardinality and its members are stable (though not necessarily immutable) then use a CHECK constraint (example: ISO 5218 sex codes). Otherwise, use a look table with a foreign key.

    Note that some nation states (borders and names) are less stable than others 🙂 CustomerCountry may have different meanings for different consumers. Think of all the variations of my country’s name that you could put on an item of snail mail (UK, Great Britain, The United Kingdom of Great Britain and Northern Ireland, Angleterre, etc) and still expect it to be delivered, whereas your application logic may want to work exclusively with the value ISO 3166-1 alpha-3 = 'GBR'

    Note that in mySQL although using a CHECK constraint is valid syntax it never actually gets checked, so I suppose, then, the rule of thumb for mySQL is to always use a lookup table with a foreign key!

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

Sidebar

Related Questions

I have few tables in the database with parent table say P is having
Say I have a table or 2 that contains data that will never or
Say you have a few DropDownLists that filter data: Car Make: [Ford,Chevrolet,etc] Car Year:
Say I have a few tables in the MSSQL database, each with about 5-10
I have two tables that have a foreign key constraint between them Table event
Say that I have an immutable Point class with x and y parameters, and
Say that I have a data model called Widget . If I pick one
Say that you have a loop and depending on the outcome of the loop
Say that I have an article with multiple pages. Each page has a short
Say that i have a generic dictionary with data like this (I hope the

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.