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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T14:26:32+00:00 2026-05-28T14:26:32+00:00

just looking for some general direction/best practice about when to use a lookup value

  • 0

just looking for some general direction/best practice about when to use a lookup value table. Lets say I have a table with transactions/payments in it which has the following columns:

transactions

  • transaction_id
  • order_id
  • amount_paid
  • payment_status
  • payment_type

Ok lets say payment_type can be one of 3 options (‘credit card’, ‘direct credit’, or ‘international money transfer’). Currently for every table row this payment_type field is being stored as text. Now is it better to store this value as text or make a lookup table for it and store the foreign key back in the transactions table?

E.g.

payment_type

  • payment_type_id
  • payment_type_name

transactions

  • transaction_id
  • order_id
  • amount_paid
  • payment_status
  • payment_type_id

Now my thoughts are this field is tightly coupled with the web application, so if more payment types are added in the future, the application will likely have to change to accommodate it. It would be just as easy to add another payment type as text e.g. ‘paypal’ or add another entry into the lookup table. The various payment types could be stored within the website code in an array.

The benefits I can see of using the lookup table are less overall data in the database (storing a key rather than text). Disadvantages are maybe slightly slower querying as it has to do another join on the data?

So what’s the best practice here?

  • 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-28T14:26:32+00:00Added an answer on May 28, 2026 at 2:26 pm

    is is necessary…

    I’d say that in this case it is best practice to have the lookup table.

    if you have a simple active/inactive or Yes/No column you can just use a char(1) and a check constraint or a bit, but it is best to have a lookup table if you are representing anything more complex.

    You can then use this table for the user form input (populating the select box, etc.)

    this will flatten and shrink the column, which will allow more rows per page, and help cache memory usage of the main table.

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

Sidebar

Related Questions

I was just looking through some information about Google's protocol buffers data interchange format.
I'm just looking for some direction when it comes to NHibernate and WCF. At
Really quick here... I think I have the answer, but just looking for some
Does anyone have some numbers on this? I am just looking for a percentage,
I am looking for some general feedback here. I have a very simple application
I'm looking for some general advice on the most efficient way to go about
Just looking for some general information on how the Google Analytics javascript code placed
I've been looking at some Azure samples and doing some general searching around Table
I've done some Googling, and can't find anything, though maybe I'm just looking in
I'm looking at some vb.net code I just inherited, and cannot fathom why 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.