無投影片標題

Download Report

Transcript 無投影片標題

其他 ER 相關觀念
以及OO模型
國立中央大學
資訊管理系
范錚強
2002
中央大學。范錚強
1
弱實體 Weak Entity
一些實體並非模式中主要關心的東西。
我們可利用「弱實體」來呈現
存在 existential
 例如:人事資料中的受扶養人,只要員工離職,
我們不會關心受扶養人
ID-dependent
 例如:會員副卡,以主卡之編碼為編碼依據
以雙線方框呈現
中央大學。范錚強
員工
受扶
養人
2
其他語意的呈現
類化 Generalization
使用 is-a 關係
例如:航空母艦是戰艦,戰艦是船
組合 Aggregation/Classification
使用 part-of 關係
例如:出納組和事務組是總務處的一部份
排斥性和非排斥性
Exclusive and non exclusive
中央大學。范錚強
3
Entity cluster :ER之分層簡化
實體群 Entity cluster
DFD將複雜度利用分層展開來涵蓋
ER可將複雜度以Entity Cluster來呈現
以某一個Entity Cluster為代表,於一個ER圖
中來顯示,而以另一個ER圖來描述該Entity
Cluster背後的內涵
中央大學。范錚強
4
物件導向模型 OO data model
基本上, OO data model 觀念起源類似
增加一些OO的觀念,如
 Inheritance of generalization structure
使用UML: Unified Modeling Language
OO涵蓋「狀態」和「行為」
Object, Object class
Association, association class
State, behavior
Method, Operation, Encapsulation
中央大學。范錚強
5
ER 和 OO
OO
Object Class
Object instance
Association class
Class diagram
Generalization
Classification
ER
Entity type
Entity instance
Relationship type,
Comp. Entity type
ER diagram
Generalization, is-a
Classification, part-of
Operations, inheritance,
and other OO concepts
N/A
中央大學。范錚強
6