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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T02:40:00+00:00 2026-05-27T02:40:00+00:00

My application is processing user requests. Each request has the following statuses: some parts

  • 0

My application is processing user requests. Each request has the following statuses: “some parts of request received from user”, “all parts received”, “started processing”, “result is ready”, “result is sent to user”.
I want to store request status in a database as a single column. Right now I have two ideas how to implement it:

  1. Use a string column. Each request status is stored as text. For
    instance, a request which was sent to the user, will have a status
    value of “sent”.

    • (+) Even a technician not familiar with my code can understand what’s happened with request after looking in DB
    • (-) For storing a request status I use multiple bytes, thougn actually this information can be stored in one byte (see p. 2)
  2. Use an integer column. Each request status is stored as int. For instance, “some parts of request received from user” = 1, “all parts received” = 2, “started processing” = 3, “result is ready” = 4, “result is sent to user” = 5.

    • (+) When you look in the database you can’t understand what’s going on. Need to write a code which converts integers to textual representation. Also when you suddenly decide, that between “result is ready” and “result is sent to user” should be a status “user agreed to get result”, you must accept that status “user agreed to get result” will be 6, not between “result is ready” (4) and “result is sent to user” (5), which seems a little bit unlogical to me.
    • (-) Use as little space as possible

I see there is no point in using more than one byte when one byte is enough. I even agree to write converting code (text status -> integer status and vice versa). But what should I do with sudden intermediate statuses? Is there a different approach?

  • 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-27T02:40:01+00:00Added an answer on May 27, 2026 at 2:40 am

    Storing the data as an integer does not have to hide your information, you can create a lookup table that relates the integer constants to their textual values, and then join them if you want to look at a textual representation of the data.

    On the other hand, unless you plan on storing many millions of rows, or have to process many thousands of transactions per second, the extra few bytes in your state table will probably not make that much of a difference.

    I’m not sure what you mean by the latter part of your question when you say, “sudden intermediate statuses.” Are you worried about having to add more states later, or are you talking about modeling transitions from one state to the next as states in your finite state machine?

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

Sidebar

Related Questions

I'm building a web application which has some processing of user requests involved. A
I'm developing an application that needs to perform some processing on the user's Outlook
I've recently started converting some of the standard requests I have in my application
I have an application processing network communication with blocking calls. Each thread manages a
In my distributed application, I am dispatching processing requests to a JMS queue. I
I have a web application that integrates DWR 3 and Spring 3. All requests
I am writing a basic word processing application and am trying to settle on
I have a pseudo-realtime data processing application where I would like to use LazyInit<double>
We are working on a video processing application using EmguCV and recently had to
I'm working on an image processing application where I have two threads on top

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.