【文章內(nèi)容簡介】
圖(續(xù)) ? 下圖是第一層數(shù)據(jù)流圖,虛線部分劃出了系統(tǒng)邊界 圖 銷售管理子系統(tǒng)第一層數(shù)據(jù)流圖 An Introduction to Database System 逐一設計分 ER圖(續(xù)) ? 上圖中把系統(tǒng)功能又分為 4個子系統(tǒng),下面四個圖是第二層數(shù)據(jù)流圖 圖 接收訂單 An Introduction to Database System 逐一設計分 ER圖(續(xù)) 圖 處理訂單 An Introduction to Database System 逐一設計分 ER圖(續(xù)) 圖 開發(fā)票 An Introduction to Database System 逐一設計分 ER圖(續(xù)) 圖 支付過賬 An Introduction to Database System 逐一設計分 ER圖(續(xù)) 分 ER圖的框架 An Introduction to Database System 逐一設計分 ER圖(續(xù)) ?參照第二層數(shù)據(jù)流圖和數(shù)據(jù)字典,遵循兩個準則,進行如下調(diào)整: ? (1) 訂單與訂單細節(jié)是 1∶ n的聯(lián)系 ? (2) 原訂單和產(chǎn)品的聯(lián)系實際上是訂單細節(jié)和產(chǎn)品的聯(lián)系。 ? (3) 圖 “發(fā)票主清單”是一個數(shù)據(jù)存儲,不必作為實體加入分 ER圖 ? (4) 工廠對大宗訂貨給予優(yōu)惠 An Introduction to Database System 逐一設計分 ER圖(續(xù)) ?得到分 ER圖如下圖所示 銷售管理子系統(tǒng)的分 ER圖 An Introduction to Database System 逐一設計分 ER圖(續(xù)) 對每個實體定義的屬性如下: ? 顧客: {顧客號 ,顧客名,地址,電話,信貸狀況,賬目余額 } ? 訂單: {訂單號 ,顧客號,訂貨項數(shù),訂貨日期,交貨日期,工種號,生產(chǎn)地點 } ? 訂單細則: {訂單號,細則號 ,零件號,訂貨數(shù),金額 } ? 應收賬款: {顧客號,訂單號 ,發(fā)票號,應收金額,支付日期,支付金額, ? 當前余額,貨款限額 } ? 產(chǎn)品描述: {產(chǎn)品號,產(chǎn)品名,單價,重量 } ? 折扣規(guī)則: {產(chǎn)品號,訂貨量 ,折扣 } An Introduction to Database System 概念結構設計 概念結構 概念結構設計的方法與步驟 數(shù)據(jù)抽象與局部視圖設計 視圖的集成 An Introduction to Database System 視圖的集成 ?各個局部視圖即分 ER圖建立好后,還需要對它們進行合并,集成為一個整體的數(shù)據(jù)概念結構即總 ER圖。 An Introduction to Database System 視圖集成的兩種方式 ?多個分 ER圖一次集成 ?一次集成多個分 ER圖 ?通常用于局部視圖比較簡單時 An Introduction to Database System 視圖的集成(續(xù)) ?逐步集成 ? 用累加的方式一次集成兩個分 ER圖 An Introduction to Database System 視圖的集成(續(xù)) ? 集成局部 ER圖的步驟 1. 合并 2. 修改與重構 An Introduction to Database System 視圖的集成(續(xù)) 視圖集成 An Introduction to Database System 合并分 ER圖,生成初步 ER圖 ? 各分 ER圖存在沖突 ? 各個分 ER圖之間必定會存在許多不一致的地方 ?合并分 ER圖的主要工作與關鍵 ? 合理消除各分 ER圖的沖突 An Introduction to Database System 合并分 ER圖,生成初步 ER圖(續(xù)) ? 沖突的種類 ? 屬性沖突 ? 命名沖突 ? 結構沖突 An Introduction to Databa