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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T23:18:33+00:00 2026-06-15T23:18:33+00:00

On one of my sites, I have a main Users table with each user’s

  • 0

On one of my sites, I have a main Users table with each user’s unique user id, e-mail address, password, etc.

I need to start keeping track of a lot of binary flags related to each user, such as whether they have confirmed their e-mail, whether they have posted a message, whether they have upgraded their account, whether they have done X, whether they have done Y, etc.

Each of these flags is a simple “0” (false) or “1” (true), and based on these flags, my site shows the user or does different things.

My question is, does it make more sense to add these binary flags to the main Users table or to create a separate table for the binary flags or something else?

Please try to explain your reasoning (and the advantages of your approach) so that I understand where you’re coming from.

  • 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-15T23:18:35+00:00Added an answer on June 15, 2026 at 11:18 pm

    Do all these flags need to be stored or they can be calculated? For example, if user hasn’t posted any message, this can be easily determined by querying the MESSAGE table.

    Physically storing “calculable” flags is redundant and opens the possibility for data inconsistencies. For example what if user adds a message but a bug in your application prevents the flag update? Such “denormalization” may be justified for performance reasons, but only make this decision after you have measured the performance on realistic amounts of data and representative workloads.

    OTOH, some flags may be “real” (e.g. whether the user has confirmed the e-mail). If such flags are relatively static (i.e. you know them in advance, at the time you are designing your data model), store them directly as simple boolean (or equivalent) fields in the USER table itself.

    Only if you need to have a considerable run-time flexibility, consider using a separate FLAG table that is in N:1 relationship with USER table. This is a kind of EAV.

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

Sidebar

Related Questions

One of my sites has a lot of users. They currently each have one
I've implemented DISQUS on one of my main sites. However, I have 22 pages
I have multiple asp.net sites. When a user logs unto one of the sites,
i have one big directory namely project folder,it's address is C:\Users\daviti\Desktop\project in this folder,i
I have two sites one is written in asp.net webforms and the other one
Okay, on one of my sites I have a news sidebar that displays events
I'm tying to send POST data from one site to another (both sites have
I have a tab layout on one of my sites that shows a log
I have two sites with different SITE_IDs, but I want to have only one
I have 2 sites that are the same, but different databases and data. One

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.