gpt4 book ai didi

sql - 数据库中的标志 - 保持跟踪的明智方式

转载 作者:太空狗 更新时间:2023-10-29 11:15:21 24 4
gpt4 key购买 nike

我正在尝试设计我的第一个数据库,我发现我有很多不同的“标志”要保留在数据库中:

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/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com