Is adding a bit mask to all tables in a database useful?

Posted by Tom on Stack Overflow See other posts from Stack Overflow or by Tom
Published on 2010-05-12T03:40:51Z Indexed on 2010/05/12 3:44 UTC
Read the original article Hit count: 256

Filed under:
|

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.

© Stack Overflow or respective owner

Related posts about sql

Related posts about sql-server