[英]splitting table
I have the following table which holds data on customers and staff. 我有下表,其中包含客户和员工的数据。 Would it be beneficial if I split it into 2 separate tables: Persons and Address?
如果我把它分成两个单独的表:人和地址,这会有好处吗? Each single person can have only one address, phone and mobile.
每个人只能拥有一个地址,电话和手机。 I have a separate table for orders.
我有一个单独的订单表。
My database is quite complex and I wonder if this would be useful for implementation. 我的数据库非常复杂,我想知道这对实现是否有用。
Many thanks, zan 非常感谢,赞
_______________
Persons |
_______________|
PersonID |
FirstName |
LastName |
OrderName |
Email |
Telephone |
Mobile |
StreetAddress |
City |
RegionID FK |
Country |
PostCode |
TitleID FK |
PersonCat FK |
MailingList |
_______________|
Only split tables when it's for normalizing purposes: for example, if one person can have multiple addresses or if less than a certain amount of people have an address (let's say 90%), which would result in a lot of NULL values. 只有在用于规范化目的时才拆分表:例如,如果一个人可以拥有多个地址,或者如果少于一定数量的人拥有地址(假设为90%),这将导致大量NULL值。
If it's not for normalizing, don't split tables. 如果不是为了规范化,请不要拆分表。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.