Best Way To Store Multiple Flags In Database

前端 未结 5 765
天涯浪人
天涯浪人 2020-12-16 14:51

I have a web-based application that notifies users of activity on the site via email. Users can choose which kinds of notifcations they want to receive. So far there are abo

5条回答
  •  执笔经年
    2020-12-16 15:43

    I would use 10 different bit or bool fields. But if your going to do it in one field, you can use a bitmap 0x1111111111 as a big integer or a text field without the comma. I've worked on different applications, using all those techniques. But I'd actually just go with the multiple fields. It will be a lot easier to do select statements on.

提交回复
热议问题