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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T21:06:35+00:00 2026-05-14T21:06:35+00:00

A colleague is adding a bit mask to all our database tables. In theory

  • 0

A colleague is adding a bit mask to all our database tables. In theory this is so we can track certain properties of each row across the entire system. For example…

  • Is the row shipped with the system or added by the client once they’ve started using the system
  • Has the row been deleted from the table (soft deletes)
  • Is the row a default value within a set of rows

Is this a good idea? Are there other uses where this approach would be beneficial?

My preference is these properties are obviously important, and having a dedicated column for each property is justified to make what is happening clearer to fellow developers.

  • 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-14T21:06:35+00:00Added an answer on May 14, 2026 at 9:06 pm

    Not really, no.

    You can only store bits in it, and only so many. So, seems to me like it’s asking for a lot of application-level headaches later on keeping track of what each one means and potential abuse later on because “hey they’re everywhere”. Is every bitmask on every table going to use the same definition for each bit? Will it be different on each table? What happens when you run out of bits? Add another?

    There are lots of potential things you could do with it, but it begs the question “why do it that way instead of identifying what we will use those bits for right now and just make them proper columns?” You don’t really circumvent the possibility of schema changes this way anyway, so it seems like it’s trying to solve a problem that you can’t really “solve” and especially not with bitmasks.

    Each of the things you mentioned can be (and should be) solved with real columns on the database, and those are far more self-documenting than “bit 5 of the BitMaskOptions field”.

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

Sidebar

Related Questions

My colleague mentioned that our client DBA proposed the removal of all foreign key
A colleague of mine asked me to write a homework for him. Although this
A colleague of mine is going a bit nuts with const in ANSI C
I have an application where the database back-end has around 15 lookup tables. For
I'm looking for the best approach to customize our iOS app so we can
I've seen my colleague do the second snippet quite often. Why is this? I've
adding more info on @serialhobbyist's request hi all. we're (= me and my colleagues)
I'm very new to all this...and for a project work in my college I
This is a general question. One of my colleague was using a class I
A colleague has a stash in their repository which I can access (via 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.