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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T07:33:47+00:00 2026-06-17T07:33:47+00:00

I have one question about manipulating with data in database. I have tables like

  • 0

I have one question about manipulating with data in database.
I have tables like this:

enter image description here

The question is, what kind of data should I keep in Status table in it’s Name property?
I have two possibilities:

  1. Keep there strings, for example: ‘Normal’, ‘Hired’, ‘Banned’, ‘Moderator’ etc.
  2. Keep there ints, corresponding to Enum type in my project, also containing all those ‘Normal’, ‘Hired’, etc.

Is there any rule about it? I saw the second option(enum) in one project, and the author justified his choice, with the fact, that it’s easier for him, to parse those int’s to managed code, just with this line:

(StatusEnum)statusInt;

In my opinion, the first option(strings) is more professional, because the database is more independent. But actually I don’t know how to argue, because it only brings me a problem: I have to parse those strings to managed Enum type with two lines (Enum.TryParse...).

Can somebody please, give me their opinion?

  • 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-06-17T07:33:48+00:00Added an answer on June 17, 2026 at 7:33 am

    If you go with enum you don’t need a special table for that. You will simply use Status integer value in User table and map it to enum directly in EF designer. Related table makes sense if your Status is an entity. Is it something you can change, you can add or delete at runtime? If yes make it a table with string name. If no make it an enum field in User table.

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

Sidebar

Related Questions

i have one question about jquery ajax().. I created a table grid and there
I have a question about Criteria method, one-to-many relation to the database, 'one' is
I have one question about the short data type in Java. I know that
I have one question about sys.setrecursionlimit() From the python docs this function: Set the
I have one question about searching and counting files in directories and subdirectories. I
I have one question about Yii framework, and I need your help. Basicly, I
Ok, i have one totaly noob question about php sessions: I have 3 (and
I have another one question about functions reference. For example, I have such definition:
I have one simple question about throwing exeptions in re.match function Is there a
I have a quick question about HTML and CSS. I thought this would be

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.