我可以在SQL Server数据库中创建多少个coulmns [英] How many coulmns can I create in SQL server database

查看:128
本文介绍了我可以在SQL Server数据库中创建多少个coulmns的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是数据库的初学者,但我有一个诊所的项目。 
我正在研究C#和MS SQL Server 2008 R2(SP2)。

问题是:
患者数据庞大且必须安全多年(每天都会保存新的记录)

每个患者记录必须包含约60个医疗数据字段
是否有权使患者餐桌包含60个coulmns或我应该做什么?





我尝试过:



患者表格如下:

姓名年龄性别地址电话

X 27男性有01234
X2 32女性旁边X 56789
X3 18男性旁边X2 10453

等等列约60列,我可以在同一个表中创建60列吗?
或创建多个表,如六个表,并将每个患者数据分布在这些表中,如每10个列一个表,并使用ID链接所有数据?

解决方案

我会创建两个表 - 一个包含患者识别信息,另一个包含所有其他字段。



这样可以更容易以后满足HIPAA要求。



表PHI:

PatientID(这应该是数据库支持的最大整数类型)

名称

街道



邮编

手机

SSN

DOB



表信息:

PatientID

EncounterDate

所有其他栏目



此时,您执行简单的连接以在查询中将表格结合在一起。



尽管如此,请随意忽略我。在过去的17年里,我一直只在医疗保健IT行业工作。


没有足够的医疗数据信息来确定你需要创建多少个表。

此时我可以说,你必须创建至少2个表。一个用于患者数据,另一个用于医疗数据,但这取决于必须存储哪些数据。



我建议阅读数据库规范化 [ ^ ]

数据库中的1NF,2NF,3NF和BCNF规范化| DBMS教程| Studytonight [ ^ ]

Quote:

是否正确使患者表包含60个coulmns或我应该做什么?



从SQL服务器的角度来看,60列根本不是问题。

引用:

我是数据库的初学者,但我有一个诊所的项目。



这让我很担心。

设计一个除了用于学习目的之外,具有医学数据的数据库不是初学者的问题。这样的数据库充满了陷阱。

- 安全:检查访问是否被授权

- 安全:防止大量访问数据。

- 安全:备份

- 设计:大多数数据必须有历史

- 设计:跟踪谁做出更改

等等


I'm a beginner in databases, but i got a project for a clinic.
I'm working on C#, and MS SQL Server 2008 R2(SP2).

Problem is:
Patients data are huge and it must be safe for years (new recordes will be saved every day)

Every patient record must contains about 60 medical data fields
Is that right to make the patient table contains 60 coulmns or what i should do?



What I have tried:

Patients table will be like this:

Name	Age	Sex	Address		Phone

X	27	Male	there		01234
X2	32	Female	next to X	56789
X3	18	Male	next to X2	10453

and a lot other columns about 60 column, can i just create 60 columns in the same table? 
or create more than one table like six tables and distribute every patient data on these table like one table for every 10 columns and link all with ID?

解决方案

I would create two tables - One with patient identifying information, and the other with all other fields.

This will make it easier to satisfy HIPAA requirements later.

Table PHI:
PatientID (this should be the biggest integer type supported by your database)
Name
Street
State
Zip
Phone
SSN
DOB

Table Info:
PatientID
EncounterDate
All other columns

At that point, you perform a simple join to marry the tables together in a query.

Feel free to ignore me, though. I've only been working in the health care IT industry on and off for the last 17 years.


There's not enough information about medical data to determine how many tables you have to create.
At this moment i can say, you have to create at least 2 tables. One for patient data and second for medical data, but it depends on what data have to be stored there.

I'd suggest to read about Database normalization[^]
1NF, 2NF, 3NF and BCNF in Database Normalization | DBMS Tutorial | Studytonight[^]


Quote:

Is that right to make the patient table contains 60 coulmns or what i should do?


From SQL server point of view, 60 columns is not a problem at all.

Quote:

I'm a beginner in databases, but i got a project for a clinic.


This is what worry me.
Designing a database with medical data is not a matter for beginners otherwise than for learning purpose. Such a database is full of pitfalls.
- Security: check if access is authorized
- Security: prevent massive access to data.
- Security: backups
- Design: Most data must have history
- Design: keep track of who made changes
and so on


这篇关于我可以在SQL Server数据库中创建多少个coulmns的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆