Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

关系数据库-范式和反范式-理论和实践(长期累积) #37

Open
yudidi opened this issue Jun 27, 2020 · 0 comments
Open

关系数据库-范式和反范式-理论和实践(长期累积) #37

yudidi opened this issue Jun 27, 2020 · 0 comments

Comments

@yudidi
Copy link
Member

yudidi commented Jun 27, 2020

范式和反范式的核心要义

范式是为了消除 冗余 和 维护异常(插入,删除,更新异常)。有冗余就会有数据一致性问题。
反范式为了提高查询效率,但是会增加冗余,进而导致数据一致性问题,所以反范式后需要在代码中增加维护数据一致性的代码。

其他好的设计

某些字段存json

  1. 有助于保证数据库表设计的扩展性,只是增加一些序列化的开销。
  2. 如果要所以json中的字段,给表新增冗余列即可。
@yudidi yudidi changed the title 关系数据库-范式和反范式-理论和实践(长期累计) 关系数据库-范式和反范式-理论和实践(长期累积) Jun 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant