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

資料庫正規化要做到什麼程度? #4

Open
Jian-Min-Huang opened this issue Jan 9, 2022 · 1 comment
Open

資料庫正規化要做到什麼程度? #4

Jian-Min-Huang opened this issue Jan 9, 2022 · 1 comment

Comments

@Jian-Min-Huang
Copy link
Member

Jian-Min-Huang commented Jan 9, 2022

  • 現代系統比較不流行做極致的正規化,正規化的優點起源自他的背景
  • 關於正規化與反正規化有其使用情境,可以找一下資料自學
    • 例如在高流量狀況下通常會反正規化
  • 這個答案沒有對錯,要根據當下的Context去決定,例如
    • Decision 握在誰手上
    • 你們的系統之於正規化與反正規化優缺點分析
    • 還有你們使用的資料庫類型
    • 這些全部都會影響最終的決定
@mephistoc
Copy link

個人經驗來說,正規化還是要做,但不要走火入魔。
一般來說做到 3NF 就很夠了,而且不要做過頭。
做過頭的意思就是,把你的系統中不需要考慮的變化也做了正規化。

舉例來說,以下兩個 ERD 可以達成的功能是很接近的,有沒有必要做到第二個 ERD 那樣呢?
這就要看你做的是符合專案需求的系統,還是要提供一個更彈性的平台、產品型的系統了。
image

image

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

2 participants