我可以将表拆分成多个表,是否有任何drowbacks? [英] Can I splite table into multiple tables, is there any drowbacks?

查看:87
本文介绍了我可以将表拆分成多个表,是否有任何drowbacks?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,我必须创建具有aproximataly 30个字段的数据库表..将所有字段放在一个表中是否很好..?



我尝试过:



我准备为matrimony应用程序准备数据库。用户信息很长我认为将它分成多个表而不是单个表..

它是否适合进一步的数据操作操作..





请帮助我..

hello, I am have to Create database table having aproximataly 30 fields.. is it good to get all fields in a single table..?

What I have tried:

I am going to prepare database for matrimony application. the user information is to long I am thinking that split it into multiple tables rather than a single one..
Is it good for further data manipulation operations..


Please help me..

推荐答案

大多数现代关系数据库引擎完美无缺,每个列都有很多列行和你通常不需要考虑它,除非:



*有些列更新/使用更频繁,你最好将这些列存储在别处,以便引擎具有更好的缓存/内存利用率。
Most modern relational database engines work perfectly fine with a lot of columns per row and you generally don't need to think about it unless:

* Some columns are updated/used more often and you are better off storing those columns elsewhere so the engines have better cache/memory utilization.


那么,规范化是你应该学习解决这个问题的方法。

简单的规则可能是直接依赖于同一主键的所有30个字段,然后将它们保存在同一个表中。但是,您可以根据其可用性在另一个表格中保留少量信息,但如果您的情况符合上述条件,则大多数人会建议使用单个表格。



请参考以下链接 -

数据库规范化 [ ^ ]

SQL中的规范化是什么? - SQLServerCentral [ ^ ]



希望,它有所帮助:)
Well, Normalization is what you should learn to solve this problem.
The simple rule could be all those 30 fields directly dependent on the same primary key then just keep them in the same table. However, you can keep few information in another table based on their usability but most of the people will recomend to have a single table if the above condition is true in your case.

Please refer to below links-
Database Normalization[^]
What is Normalization in SQL ? - SQLServerCentral[^]

Hope, it helps :)


要规范化表格,首先需要创建新表格,写入SQL将数据插入新表,然后更改原始表。
To normalize the tables you will firstly need to create new tables, write SQL to insert the data into the new tables and then alter the original table.


这篇关于我可以将表拆分成多个表,是否有任何drowbacks?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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