1 / 17

單元 3 :軟體設計 3-1 實體關係圖

單元 3 :軟體設計 3-1 實體關係圖. Entity-Relationship Model,( E/R Model). 實體關聯模型 (Entity-Relationship Model) 實體關聯模型主要可以用來協助系統建構者作資料的分析與規劃,其圖示化的表達 (Entity-Relationship Diagram) 更容易讓人理解。. Relationship. Entity. Attributes. ERD 基本元素. ERD 有三種基本元素如下:. 實體. 實體間關係. 屬性. 員工編號. 姓名. 性別. 地址. 薪水. 員工.

Download Presentation

單元 3 :軟體設計 3-1 實體關係圖

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. 單元3:軟體設計3-1實體關係圖

  2. Entity-Relationship Model,( E/R Model) • 實體關聯模型(Entity-Relationship Model) • 實體關聯模型主要可以用來協助系統建構者作資料的分析與規劃,其圖示化的表達(Entity-Relationship Diagram)更容易讓人理解。

  3. Relationship Entity Attributes ERD 基本元素 • ERD有三種基本元素如下: 實體 實體間關係 屬性

  4. 員工編號 姓名 性別 地址 薪水 員工 Entity and Attribute

  5. 實體完整性(entity integrity) • 必要條件:所有的記錄都是唯一的,而且primary key(主鍵)不可含有null值。 • 目的:保證每個記錄都可以辨認,並確保此項紀錄的唯一性。

  6. ERD Weak Entity • 步驟二:對於ER Model中的弱實體建立資料表,其主索引欄位是由弱實體的主索引及其所依靠實體的主索引所組成。 員工編號 姓名 地址 電話 員工 1 薪水 撫養 N 親屬 性別 姓名 性別

  7. Implement ER Model (cont.) 員工 部門 計畫 親屬

  8. n 工作 1 員工 部門 1 管理 1 1 1 m 撫養 控制 參與 n n n 親屬 計畫 Implement ER Model (cont..)

  9. n 工作 1 員工 部門 1 管理 1 1 1 m 撫養 控制 參與 n n n 親屬 計畫 Implement ER Model (cont...) 部門名稱 部門編號 員工編號 姓名 性別 位置 薪水 員工數目 地址 姓名 計畫編號 計畫名稱 地址 性別

  10. Relationship 1 1 n 1 n m

  11. 1 對 1 關係 員工 部門 管理 A B C D E . . . . D1 D2 D3 D4 D5 D6 D7 D8 D9 . . . R1 R2 R3 R4 R5 R6 R7 . . .

  12. 1 對 1 (cont.) 管理 1 1 員工(管理者) 部門

  13. 1 對 多 關係 員工 部門 工作 A B C D E . . . . D1 D2 D3 D4 D5 D6 D7 D8 D9 . . . R1 R2 R3 R4 R5 R6 R7 . . .

  14. 1 對 多 (cont.) 工作 n 1 員工 部門

  15. 多對多 關係 員工 計畫 參與 A B C . . . . D1 D2 D3 D4 D5 D6 D7 D8 D9 . . . R1 R2 R3 R4 R5 R6 R7 . . .

  16. 多對多 (cont.) 參與 n m 員工 計畫

  17. Today’s Work • 教學網站: ERD

More Related