https://stackoverflow.com/questions/4089830/whats-better-many-small-tables-or-one-big-table
比如:
https://en.wikipedia.org/wiki/Database_normalization
"Functional Dependency", "Normalization" and "Database Design"
Functional Dependency means:
x -> y ?given any two tuples in table R. 如果他們的x值一樣膘流,他們的Y值一定一樣!
有時(shí)候之所以要拆分Big Table into small table是因?yàn)?big table里會(huì)有redundancy, waste 空間。
比如說:
Rating 和 wage 有一種functional dependency. Rating只要是8,wage一定是10。
rating只要是5, wage一定是7. 那么為什么我們還要花space多一個(gè)wage column在big table?
更加省空間的做法:
Decomposition 的時(shí)候要非常小心藏否,因?yàn)橐徊蛔⒁馕覀兛赡軐?dǎo)致Lossy, 拆分出的table拼不回原本的table。
A-->B; C-->B ?會(huì)導(dǎo)致好多種combination 因此lossy...
lossless: