本文介绍了数据属性表与许多小表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在为一个客户端工作,目前有一个DataAttributes表,其中包含Name,Type,Value和ParentID。此表用于存储几乎所有内容,如美国状态,解剖项目,组合框选择和系统设置。我会非常想摆脱这张表,把每个部分分成自己的表格。这样做有什么利弊吗?
解决方案
这种方法抛弃了DBMS的许多功能。您不能使用数据库设计来强制数据完整性。一些例子:
- 参照完整性(外键)
- 域完整性(检查约束) li>
- Nullability(NULL / NOT NULL)
- 数据类型
- 唯一性(唯一约束)
- ...
我不知道有没有任何专业人士真正抵消这些缺点。 >
I am working for a client that currently has a DataAttributes table with columns Name, Type, Value, and ParentID. This table is used to store virtually everything such as US states, anatomical items, combo box selections, and system settings. I would seriously like to get rid of this table and break each section into its own table.
Are there any pros and cons in doing so?
解决方案
This approach throws away many features of a DBMS. You can't use database design to enforce data integrity. Some examples:
- Referential integrity (foreign keys)
- Domain integrity (check constraints)
- Nullability (NULL/NOT NULL)
- Data type
- Uniqueness (unique constraint)
- ...
I'm not sure there are any pros that really offset the cons.
这篇关于数据属性表与许多小表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!