SQL Server:一张表有 400 列还是 40 表有 10 列?

SQL Server: One Table with 400 Columns or 40 Tables with 10 Columns?(SQL Server:一张表有 400 列还是 40 表有 10 列?)
本文介绍了SQL Server:一张表有 400 列还是 40 表有 10 列?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用的是 SQL Server 2005 Express 和 Visual Studio 2008.

I am using SQL Server 2005 Express and Visual Studio 2008.

我有一个包含 400 列的表的数据库.在我不得不在多个数据库之间执行双向同步之前,事情是(几乎可以管理的).

I have a database which has a table with 400 Columns. Things were (just about manageable) until I had to perform bi-directional sync between several databases.

我想知道支持和反对使用 400 列数据库或 40 表数据库的论据是什么?

I am wondering what arguments are for and against using 400 column database or 40 table database are?

该表未规范化,主要由 nvarchar(64) 列和一些 TEXT 列组成.(没有数据类型,因为它是从文本文件转换而来的).

The table in not normalised and comprises of mainly nvarchar(64) columns and some TEXT columns. (there are no datatypes as it was converted from text files).

还有一个表链接到这个表,并且是 1-1 关系(即一个条目与 400 列表中的一个条目相关).

There is one other table that links to this table and is a 1-1 relationship (i.e one entry relates to one entry in the 400 column table).

该表是一个列表文件,其中包含插入"到应用程序中的参数.

The table is a list files that contained parameters that are "plugged" into a application.

期待您的回复.

谢谢

推荐答案

根据你的流程描述,我会从这样的事情开始.该模型被简化,不捕捉历史等等——但是,它是一个很好的起点.注意:参数=属性.

Based on your process description I would start with something like this. The model is simplified, does not capture history, etc -- but, it is a good starting point. Note: parameter = property.


- 设置属性 的集合.一个设置可以有多个属性,一个属性只属于一个设置.
- 机器可以有多个设置,一个设置只属于一台机器.
- 属性是特定的类型(温度、运行时间、主轴转速),某个特定的属性可以有多种输入.
- 度量特质属性的类型.度量是一个数字属性,如速度.特征是一种描述性的属性,如颜色或一些文字.


- Setup is a collection of properties. One setup can have many properties, one property belongs to one setup only.
- Machine can have many setups, one setup belongs to one machine only.
- Property is of a specific type (temperature, run time, spindle speed), there can be many properties of a certain type.
- Measurement and trait are types of properties. Measurement is a numeric property, like speed. Trait is a descriptive property, like color or some text.

这篇关于SQL Server:一张表有 400 列还是 40 表有 10 列?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!

本站部分内容来源互联网,如果有图片或者内容侵犯您的权益请联系我们删除!

相关文档推荐

Execute complex raw SQL query in EF6(在EF6中执行复杂的原始SQL查询)
SSIS: Model design issue causing duplications - can two fact tables be connected?(SSIS:模型设计问题导致重复-两个事实表可以连接吗?)
SQL/MySQL: split a quantity value into multiple rows by date(SQL/MySQL:按日期将数量值拆分为多行)
SQL Server Graph Database - shortest path using multiple edge types(SQL Server图形数据库-使用多种边类型的最短路径)
Invalid column name when using EF Core filtered includes(使用EF核心过滤包括时无效的列名)
How should make faster SQL Server filtering procedure with many parameters(如何让多参数的SQL Server过滤程序更快)