Best Way To Store Multiple Flags In Database

前端 未结 5 798
天涯浪人
天涯浪人 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:33

    I'd expect that letting the DB manage it by using Bool columns would be better. I seem to recall that some systems will pack bools to bits (null might mess that up). To avoid clutter, you might make it a separate table.

    (I'm no DBA)

    Edit: slaps head "I just suggested exactly what you are thing of" :b

提交回复
热议问题