相关疑难解决方法(0)

我应该为每种数据类型设置一列还是存储所有内容的 1 列

我有一个当前看起来像这样的数据库表:

PageField
-Id (Int, PK)
-FieldType (String) Can be Text, Decimal, Integer or Bit
-Value (This stores the value regardless of the FieldType, so it is not strongly typed)
Run Code Online (Sandbox Code Playgroud)

我是否应该删除Value列并将其替换为 4 个单独的列TextValueDecimalValueIntegerValueBitValue吗?

数据类型将设置为相关内容。这意味着在这 4 列的每一行中,第 3 列将是NULL.

database-design eav

1
推荐指数
1
解决办法
892
查看次数

标签 统计

database-design ×1

eav ×1