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

  • Home
  • SEARCH
  • 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 347391
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T11:15:59+00:00 2026-05-12T11:15:59+00:00

I am not able to make a clear decision on this one. I am

  • 0

I am not able to make a clear decision on this one.

I am OK by having numeric values on my tables and have the value information on the description of the column on the database for DBA.

But I also don’t want to come to a point in future where having these numeric values on database creating too much headache for maintenance.

I’m not feeling particularly drawn to having strings for these enum columns on database either as it will create a lot of duplicated string repetition on the database. It might not be a major performance issue but does not feel that right to me to have so much string on a table to indicate a value.

Can you please share your thoughts from your long term experience. Thank you

  • 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-12T11:15:59+00:00Added an answer on May 12, 2026 at 11:15 am

    The standard way to deal with your situation is via lookup tables. Generally, these have a simple structure (often just two columns):

    CREATE TABLE LookupTable
    (
        code    SMALLINT NOT NULL PRIMARY KEY,
        name    VARCHAR(32) NOT NULL
    );
    

    You might or might not make the name column unique too. Then for a table that contains values of the relevant type, you use:

    CREATE TABLE ReferencingTable
    (
        ...
        lookup   SMALLINT NOT NULL REFERENCES LookupTable,
        ...
    );
    

    Here, I’ve not been very clever with the names; you might use ‘CustomerStatus’ in place of ‘LookupTable’ and then use the column name CustStatus in ReferencingTable. You can choose a variety of types for the ‘code’ column – a single byte tiny integer, a small CHAR field, or an INTEGER, depending on how many values you might need. Sometimes the lookup table becomes more complex and acquires extra attributes describing the entity, too, though that typically means that it is modelling an entity of some importance to your DB and it is no longer ‘just a lookup table’.

    You can end up with quite a lot of these lookup tables, but resist the temptation to fall into the trap of generalizing to the ‘One True Lookup Table’ (OTLT) idiom. As documented in other SO questions and elsewhere on the web, this leads to data integrity problems.

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

Sidebar

Related Questions

I am not able to make this out: Between eliminates use of >= and
I'm not being able to make this line work with Tk import os while(1):
I am not able to figure out this simple thing in ASP.NET MVC: I
Now this question has been asked before but I am not able to get
I'm not sure what this is called, which is why I'm having trouble searching
First of all, I need to make it clear - this is for an
This is a pretty esoteric question, so just to make clear here from the
I am not able to access localhost https pages in firefox3. It gave the
I am not able to use the breakpoint in Studio with Javascript. I'm able
Why are we not able to override an instance variable of a super class

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.