Storing flags in a DB

前端 未结 3 1530
無奈伤痛
無奈伤痛 2021-01-06 11:12

In my application, I\'d like the user to select his working days. then store them in the database. Of course my application will process the users\' data like: Is today a wo

3条回答
  •  孤城傲影
    2021-01-06 11:28

    I would say that bit mask fields are a relational anti-pattern.

    A field should have a single meaningful value, otherwise you end up with querying issues - parsing the field every time you need to query using it.

    Such a field also requires extra documentation, as the values it stores are not self describing.

提交回复
热议问题