当我们需要在数据库设计中使用1对1关系时? [英] When we need to use 1-to-1 relationship in database design?

查看:128
本文介绍了当我们需要在数据库设计中使用1对1关系时?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们什么时候需要在数据库设计中使用1对1关系?在我看来,如果两个表是1对1的关系,他们可以组合成一个表。这是真的吗?

When do we need to use a 1-to-1 relationship in database design? In my opinion, if two tables are in a 1-to-1 relationship, they can be combined into one table. Is this true?

推荐答案


  1. 大型表格的垂直分割以减少I / O,

  1. Vertical partitioning for large tables to reduce I/O and cache requirements -- separate columns that are queried often vs rarely.

alter table 添加列到生产系统时, code>是太贵。

Adding a column to a production system when the alter table is "too expensive".

超级类型/子类型 模式。

Super-type/subtype pattern.

垂直分区以从表(连接)消除中受益 - 提供优化器
支持它(再次减少I / O和缓存)。

Vertical partitioning to benefit from table (join) elimination -- providing optimizer supports it (again to reduce I/O and cache) .

锚定建模 - 与4类似,但最终缩小为 6NF

Anchor modeling -- similar to 4, but down to 6NF.

这篇关于当我们需要在数据库设计中使用1对1关系时?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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