Categories
SQL

Utilising Bit Masks with Bitwise Operators

A few weeks back we looked at options for storing multiple boolean flag values in a table. One of the options we considered was the use of a Bit Mask where we packed multiple flags into a single field. When we have individual fields within a table, using and manipulating those is straightforward. However when we’ve got […]

Categories
SQL

Schema Design for Bit Flags

When designing a data schema to store a variety of entities it can be common to require a selection of flags to be stored. There are different ways in which the data can be designed to accommodate this which I wanted to look at here. Examples of these fields could be an ‘Is Active’ flag […]