我正在尝试设计我的第一个数据库,我发现我有很多不同的“标志”要保留在数据库中:
Active # Shows whether the item submission has been completed
Indexed # Shows whether the item has been indexed
Reminded # Shows whether the “expiring email” has been sent to the user
Error # Shows whether there is an error with the submission
Confirmation # Shows whether the confirmation email has been sent
除了为这些设置一个 bool 字段之外,是否有一种巧妙的方法来存储这些详细信息?我想知道我是否在数据库中的状态组下有这些,每个内涵都有一个 ID (32) 并链接到它。
最佳答案
除非有其他原因,否则我建议只将这五个 bool (或位)列添加到项目表中。
关于sql - 数据库中的标志 - 保持跟踪的明智方式,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14627854/