or
or
By clicking below, you agree to our terms of service.
New to HackMD? Sign up
Syntax | Example | Reference | |
---|---|---|---|
# Header | Header | 基本排版 | |
- Unordered List |
|
||
1. Ordered List |
|
||
- [ ] Todo List |
|
||
> Blockquote | Blockquote |
||
**Bold font** | Bold font | ||
*Italics font* | Italics font | ||
~~Strikethrough~~ | |||
19^th^ | 19th | ||
H~2~O | H2O | ||
++Inserted text++ | Inserted text | ||
==Marked text== | Marked text | ||
[link text](https:// "title") | Link | ||
 | Image | ||
`Code` | Code |
在筆記中貼入程式碼 | |
```javascript var i = 0; ``` |
|
||
:smile: | ![]() |
Emoji list | |
{%youtube youtube_id %} | Externals | ||
$L^aT_eX$ | LaTeX | ||
:::info This is a alert area. ::: |
This is a alert area. |
On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?
Please give us some advice and help us improve HackMD.
Do you want to remove this version name and description?
Syncing
###### tags: `Data Base`
tags:
Data Base
第九章: ER/EER Relational Mapping
ER 轉 Relational Mapping Algorithm
Step 1: Mapping of Regular Entity Types
Step 2: Mappingg of Weak Entity Types
Step 3: Mapping of Binary 1:1 Relation Types
Step 4: Mapping of Binary 1:N Relationship Types
Step 5: Mapping of Binary M:N Relationshop Types
Step 6: Mapping of Multivalued attributes
Step 7: Mapping of N-ary Rekationship Types
Step 8: Mapping Specialization or Generalization
進行 specailization 與 generalized,有四個 options:
8A(specialize): 每個 subclass/superclass 都建一個表,並將各個連接的 attribute 填入表中,另外,subclass 需 include superclass 的 PK 並成為 subclass 表的 PK



Example
8B(genralize): 每個 subclass 都建一個表,並將各個 attribute 填入表中,另外,subclass 們需要共有的 attributes 會填入 subclass 中,並找出一個共同的 PK



Example
8C(for disjoint specialize): 只建立一個 superclass 的表,並將各個 subclass 的 attribute 納入 superclass 的表中,另外,加上一個 type 的 attribute 來表示是哪個 subclass

Example


8D(for overlapping specialize): 只建立一個 superclass 的表,並加入 type 的 boolean 值,若為該 subclass ,則布林值為 true ,並在旁邊加上各個 subclass 的 attribute



Example
多重繼承狀況: 使用 8D 的狀況處理


Example
Step 9: Mapping of Union Types
Example: Registered_vehicle