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

查看:27
本文介绍了什么时候需要在数据库设计中使用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太贵"时向生产系统添加一列.

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

超级-type/subtype 模式.

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.

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

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