What#39;s better - many small tables or one big table?(什么更好 - 多张小桌子还是一张大桌子?)
问题描述
我有一个数据库,可以存储有关个人的个人资料.这些人有大约 50 个可能的领域.
I've got a database which will store profiles about individuals. These individuals have about 50 possible fields.
有些是常见的,例如名字、姓氏、电子邮件、电话号码.
Some are common things like, first name, last name, email, phone number.
其他是爱好、技能、兴趣等
Others are things like hobbies, skills, interests
有些是身高、体重、肤色.
Some are height, weight, skin color.
系统在不同时间使用这些组中的每一个.就能够通过数据库进行协商而言,我更喜欢有 7 个表,每个表大约有 8 个字段.最佳做法是什么?
Each of these groups are used by the system at different times. In terms of being able to negotiate through the database I would prefer to have 7 tables each of about 8 fields. What is best practice to do?
数据将用于搜索引擎,用于查找配置文件匹配项.这会影响我的工作吗?
The data is going to be used in a search engine, for finding profile matches. Does this affect what I am doing?
推荐答案
这很难说,要根据应用程序的需要而定.我会说研究 Database Normalization 因为它会告诉你如何规范化数据库它应该阐明您想要将哪些内容分离到他们自己的表格等中.
It is hard to say, and is based on what the application requires. I would say to look into Database Normalization as it will show you how to normalize the database and in that it should shed light on what you would want to separate out into their own tables etc.
这篇关于什么更好 - 多张小桌子还是一张大桌子?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:什么更好 - 多张小桌子还是一张大桌子?
基础教程推荐
- 无法在 ubuntu 中启动 mysql 服务器 2021-01-01
- SQL Server 中单行 MERGE/upsert 的语法 2021-01-01
- Sql Server 字符串到日期的转换 2021-01-01
- SQL Server 2016更改对象所有者 2022-01-01
- ERROR 2006 (HY000): MySQL 服务器已经消失 2021-01-01
- SQL Server:只有 GROUP BY 中的最后一个条目 2021-01-01
- 使用pyodbc“不安全"的Python多处理和数据库访问? 2022-01-01
- 将数据从 MS SQL 迁移到 PostgreSQL? 2022-01-01
- 在 VB.NET 中更新 SQL Server DateTime 列 2021-01-01
- 如何在 SQL Server 的嵌套过程中处理事务? 2021-01-01