###### tags: `database` `note` `thu` {%hackmd theme-dark %} # EER Diagram至Schema的轉換 本頁將會聚焦在將EER Diagram轉換至Schema的演算法。 詳細請參見課本Ch9。 ## 簡介 這裡只會講大概的方向,詳細步驟請見[老師筆記](/GK34a_FiRhSZHvJPx3m4ag)。 ## 1. Subclasses / Superclasses 的處理方式: ### a. 把泛化後抽象出來的資料分開放,其它的用Foreign key連結  ### b. 退化回泛化前  ### c. 全部瞎雞巴合成一個表格 (那當初為什麼還要泛化?!) #### Example 1 (原c)   #### Example 2 (原d)   ## 2. Union Type 的處理方式: ### Note: 該處relationship採取Relationship relation的處理方式。 ### a. 各個Superclass各開一個表格 ### b. 有共同的key就用,沒有就生出一個來(Surrogate key, dummy primary key) ### c. 把該primary key用foreign key 連起來。   # 考古 
×
Sign in
Email
Password
Forgot password
or
By clicking below, you agree to our
terms of service
.
Sign in via Facebook
Sign in via Twitter
Sign in via GitHub
Sign in via Dropbox
Sign in with Wallet
Wallet (
)
Connect another wallet
New to HackMD?
Sign up