數(shù)據(jù)庫(kù)的設(shè)計(jì)及表的創(chuàng)建課件
單擊此處編輯母版標(biāo)題樣式,單擊此處編輯母版文本樣式,第二級(jí),第三級(jí),第四級(jí),第五級(jí),*,,*,,課前復(fù)習(xí),通用數(shù)據(jù)庫(kù)知識(shí),1.數(shù)據(jù)、DB、DBS、DBMS,數(shù)據(jù)模型,①概念模型:從用戶的角度考慮數(shù)據(jù)的表示方式,E-R,②概念模型相關(guān)術(shù)語(yǔ):實(shí)體、實(shí)體屬性、屬性值、,候選鍵;,③邏輯模型從DBMS的角度考慮數(shù)據(jù)的表示方式,(層次、網(wǎng)狀、關(guān)系),④物理模型:從數(shù)據(jù)的存儲(chǔ)方式考慮數(shù)據(jù)的表示方,式,一般由DBMS自動(dòng)設(shè)置。,,課前復(fù)習(xí),1,,數(shù)據(jù)庫(kù)設(shè)計(jì)過(guò)程與設(shè)計(jì)實(shí)例,數(shù)據(jù)年設(shè)計(jì)是根據(jù)一個(gè)給定的,應(yīng)用環(huán)境,構(gòu)造最優(yōu)的數(shù)據(jù),棋型,利用DBMS,建立數(shù)據(jù),庫(kù)應(yīng)用糸統(tǒng)。,,數(shù)據(jù)庫(kù)設(shè)計(jì)過(guò)程與設(shè)計(jì)實(shí)例,2,,數(shù)據(jù)庫(kù)設(shè)計(jì)過(guò)程與設(shè)計(jì)實(shí)例,簡(jiǎn)草地講,數(shù)據(jù)庠設(shè)計(jì)包括,①結(jié)構(gòu)設(shè)計(jì):是指按照應(yīng)用要求,確定一個(gè)合理的,數(shù)據(jù)模型,結(jié)構(gòu)設(shè)計(jì)的結(jié)票就是得到數(shù)據(jù)年中表,的結(jié)構(gòu)。,②行為設(shè)計(jì):是指應(yīng)用程序的設(shè)計(jì),將設(shè)計(jì)的結(jié),物理化,實(shí)施數(shù)據(jù)庠(如完成查詢、修改、派,加、刪除、統(tǒng)計(jì)數(shù)據(jù),制作報(bào)表等)。行為設(shè),計(jì)要求端足教據(jù)的完整性、安全性、并發(fā)控制,和數(shù)據(jù)庫(kù)的恢復(fù)。,,數(shù)據(jù)庫(kù)設(shè)計(jì)過(guò)程與設(shè)計(jì)實(shí)例,3,,數(shù)據(jù)庫(kù)設(shè)計(jì)過(guò)程與設(shè)計(jì)實(shí)例,數(shù)據(jù)庫(kù)設(shè)計(jì)要經(jīng)歷6個(gè)階段(p23-25),①需求分析,②概念結(jié)構(gòu)設(shè)計(jì),③邏輯結(jié)構(gòu)設(shè)計(jì),④物理結(jié)構(gòu)設(shè)計(jì),⑤數(shù)據(jù)庫(kù)實(shí)施,⑥數(shù)據(jù)庫(kù)運(yùn)行與維護(hù),,數(shù)據(jù)庫(kù)設(shè)計(jì)過(guò)程與設(shè)計(jì)實(shí)例,4,,數(shù)據(jù)庫(kù)設(shè)計(jì)過(guò)程與設(shè)計(jì)實(shí)例,禹求分析,概念設(shè)計(jì),邏輯設(shè)計(jì),數(shù)據(jù)庫(kù)設(shè)計(jì)流程,數(shù)據(jù)棋型評(píng)價(jià),物理設(shè)計(jì),性能評(píng)價(jià),救據(jù)庫(kù)尖施,滿志試運(yùn)行x湍意,運(yùn)行與維護(hù),,數(shù)據(jù)庫(kù)設(shè)計(jì)過(guò)程與設(shè)計(jì)實(shí)例,5,,數(shù)據(jù)庫(kù)設(shè)計(jì)過(guò)程與設(shè)計(jì)實(shí)例,1》需求分析,需求分析階段的工作是詳細(xì)準(zhǔn)確地了解數(shù)據(jù)庫(kù)應(yīng),用系統(tǒng)的運(yùn)行環(huán)境和用戶要求,1.開(kāi)發(fā)的目的是什么;,2.用戶需要從數(shù)據(jù)庫(kù)中得到的數(shù)據(jù)信息是,什么;,輸出這些信息采用何種方式或格式,,數(shù)據(jù)庫(kù)設(shè)計(jì)過(guò)程與設(shè)計(jì)實(shí)例,6,,數(shù)據(jù)庫(kù)設(shè)計(jì)過(guò)程與設(shè)計(jì)實(shí)例,需求分析,需求分析的方法-調(diào)查,步驟,方式,1.調(diào)查各部門(mén)的組成和業(yè)務(wù):1.發(fā)調(diào)查表,活動(dòng),請(qǐng)專業(yè)人員介紹,幫助用戶進(jìn)一步明確系統(tǒng)::3.詢問(wèn),最終要求,把結(jié)果以標(biāo)準(zhǔn)化的文檔表4.跟班作業(yè),示出來(lái),如使用數(shù)據(jù)流程5.查閱資料,圖、數(shù)據(jù)字典和需求說(shuō)明,o0n0ddDDeDnDDDDDDEDDDD,,數(shù)據(jù)庫(kù)設(shè)計(jì)過(guò)程與設(shè)計(jì)實(shí)例,7,,數(shù)據(jù)庫(kù)設(shè)計(jì)過(guò)程與設(shè)計(jì)實(shí)例,2概念結(jié)構(gòu)設(shè)計(jì),任務(wù),將需求分析結(jié)果抽象為概念模型,方法,1.建立ER模型( Entity-Relationship model),2.ER模型的表示方法為ER圖,3.ER圖實(shí)質(zhì):表示了實(shí)體、屬性和實(shí)體間,的聯(lián)系,,數(shù)據(jù)庫(kù)設(shè)計(jì)過(guò)程與設(shè)計(jì)實(shí)例,8,,數(shù)據(jù)庫(kù)設(shè)計(jì)過(guò)程與設(shè)計(jì)實(shí)例,2》概念結(jié)構(gòu)沒(méi)計(jì),建立FR模型應(yīng)遵循的原婭,相對(duì)原則:對(duì)于同一對(duì)象抽象的結(jié)果可,能不同,◆簡(jiǎn)單原則:現(xiàn)實(shí)世界的事物能作為屬性,的盡量歸為屬性,,數(shù)據(jù)庫(kù)設(shè)計(jì)過(guò)程與設(shè)計(jì)實(shí)例,9,,數(shù)據(jù)庫(kù)設(shè)計(jì)過(guò)程與設(shè)計(jì)實(shí)例,2概念結(jié)構(gòu)設(shè)計(jì),◆ER模型的設(shè)計(jì)過(guò)程,1.設(shè)計(jì)局部E-R模型,2.集成全局E-R模型,解決三種沖突,命名沖突,2.屬性沖突,3.結(jié)構(gòu)沖突,,數(shù)據(jù)庫(kù)設(shè)計(jì)過(guò)程與設(shè)計(jì)實(shí)例,10,,數(shù)據(jù)庫(kù)的設(shè)計(jì)及表的創(chuàng)建課件,11,,數(shù)據(jù)庫(kù)的設(shè)計(jì)及表的創(chuàng)建課件,12,,數(shù)據(jù)庫(kù)的設(shè)計(jì)及表的創(chuàng)建課件,13,,數(shù)據(jù)庫(kù)的設(shè)計(jì)及表的創(chuàng)建課件,14,,數(shù)據(jù)庫(kù)的設(shè)計(jì)及表的創(chuàng)建課件,15,,數(shù)據(jù)庫(kù)的設(shè)計(jì)及表的創(chuàng)建課件,16,,數(shù)據(jù)庫(kù)的設(shè)計(jì)及表的創(chuàng)建課件,17,,數(shù)據(jù)庫(kù)的設(shè)計(jì)及表的創(chuàng)建課件,18,,數(shù)據(jù)庫(kù)的設(shè)計(jì)及表的創(chuàng)建課件,19,,數(shù)據(jù)庫(kù)的設(shè)計(jì)及表的創(chuàng)建課件,20,,數(shù)據(jù)庫(kù)的設(shè)計(jì)及表的創(chuàng)建課件,21,,數(shù)據(jù)庫(kù)的設(shè)計(jì)及表的創(chuàng)建課件,22,,數(shù)據(jù)庫(kù)的設(shè)計(jì)及表的創(chuàng)建課件,23,,數(shù)據(jù)庫(kù)的設(shè)計(jì)及表的創(chuàng)建課件,24,,數(shù)據(jù)庫(kù)的設(shè)計(jì)及表的創(chuàng)建課件,25,,數(shù)據(jù)庫(kù)的設(shè)計(jì)及表的創(chuàng)建課件,26,,數(shù)據(jù)庫(kù)的設(shè)計(jì)及表的創(chuàng)建課件,27,,數(shù)據(jù)庫(kù)的設(shè)計(jì)及表的創(chuàng)建課件,28,,數(shù)據(jù)庫(kù)的設(shè)計(jì)及表的創(chuàng)建課件,29,,數(shù)據(jù)庫(kù)的設(shè)計(jì)及表的創(chuàng)建課件,30,,數(shù)據(jù)庫(kù)的設(shè)計(jì)及表的創(chuàng)建課件,31,,數(shù)據(jù)庫(kù)的設(shè)計(jì)及表的創(chuàng)建課件,32,,數(shù)據(jù)庫(kù)的設(shè)計(jì)及表的創(chuàng)建課件,33,,數(shù)據(jù)庫(kù)的設(shè)計(jì)及表的創(chuàng)建課件,34,,數(shù)據(jù)庫(kù)的設(shè)計(jì)及表的創(chuàng)建課件,35,,數(shù)據(jù)庫(kù)的設(shè)計(jì)及表的創(chuàng)建課件,36,,數(shù)據(jù)庫(kù)的設(shè)計(jì)及表的創(chuàng)建課件,37,,數(shù)據(jù)庫(kù)的設(shè)計(jì)及表的創(chuàng)建課件,38,,數(shù)據(jù)庫(kù)的設(shè)計(jì)及表的創(chuàng)建課件,39,,數(shù)據(jù)庫(kù)的設(shè)計(jì)及表的創(chuàng)建課件,40,,數(shù)據(jù)庫(kù)的設(shè)計(jì)及表的創(chuàng)建課件,41,,數(shù)據(jù)庫(kù)的設(shè)計(jì)及表的創(chuàng)建課件,42,,數(shù)據(jù)庫(kù)的設(shè)計(jì)及表的創(chuàng)建課件,43,,數(shù)據(jù)庫(kù)的設(shè)計(jì)及表的創(chuàng)建課件,44,,數(shù)據(jù)庫(kù)的設(shè)計(jì)及表的創(chuàng)建課件,45,,數(shù)據(jù)庫(kù)的設(shè)計(jì)及表的創(chuàng)建課件,46,,數(shù)據(jù)庫(kù)的設(shè)計(jì)及表的創(chuàng)建課件,47,,數(shù)據(jù)庫(kù)的設(shè)計(jì)及表的創(chuàng)建課件,48,,數(shù)據(jù)庫(kù)的設(shè)計(jì)及表的創(chuàng)建課件,49,,數(shù)據(jù)庫(kù)的設(shè)計(jì)及表的創(chuàng)建課件,50,,數(shù)據(jù)庫(kù)的設(shè)計(jì)及表的創(chuàng)建課件,51,,數(shù)據(jù)庫(kù)的設(shè)計(jì)及表的創(chuàng)建課件,52,,數(shù)據(jù)庫(kù)的設(shè)計(jì)及表的創(chuàng)建課件,53,,數(shù)據(jù)庫(kù)的設(shè)計(jì)及表的創(chuàng)建課件,54,,數(shù)據(jù)庫(kù)的設(shè)計(jì)及表的創(chuàng)建課件,55,,數(shù)據(jù)庫(kù)的設(shè)計(jì)及表的創(chuàng)建課件,56,,數(shù)據(jù)庫(kù)的設(shè)計(jì)及表的創(chuàng)建課件,57,,數(shù)據(jù)庫(kù)的設(shè)計(jì)及表的創(chuàng)建課件,58,,數(shù)據(jù)庫(kù)的設(shè)計(jì)及表的創(chuàng)建課件,59,,數(shù)據(jù)庫(kù)的設(shè)計(jì)及表的創(chuàng)建課件,60,,數(shù)據(jù)庫(kù)的設(shè)計(jì)及表的創(chuàng)建課件,61,,數(shù)據(jù)庫(kù)的設(shè)計(jì)及表的創(chuàng)建課件,62,,數(shù)據(jù)庫(kù)的設(shè)計(jì)及表的創(chuàng)建課件,63,,數(shù)據(jù)庫(kù)的設(shè)計(jì)及表的創(chuàng)建課件,64,,數(shù)據(jù)庫(kù)的設(shè)計(jì)及表的創(chuàng)建課件,65,,數(shù)據(jù)庫(kù)的設(shè)計(jì)及表的創(chuàng)建課件,66,,數(shù)據(jù)庫(kù)的設(shè)計(jì)及表的創(chuàng)建課件,67,,數(shù)據(jù)庫(kù)的設(shè)計(jì)及表的創(chuàng)建課件,68,,數(shù)據(jù)庫(kù)的設(shè)計(jì)及表的創(chuàng)建課件,69,,數(shù)據(jù)庫(kù)的設(shè)計(jì)及表的創(chuàng)建課件,70,,數(shù)據(jù)庫(kù)的設(shè)計(jì)及表的創(chuàng)建課件,71,,數(shù)據(jù)庫(kù)的設(shè)計(jì)及表的創(chuàng)建課件,72,,數(shù)據(jù)庫(kù)的設(shè)計(jì)及表的創(chuàng)建課件,73,,數(shù)據(jù)庫(kù)的設(shè)計(jì)及表的創(chuàng)建課件,74,,數(shù)據(jù)庫(kù)的設(shè)計(jì)及表的創(chuàng)建課件,75,,數(shù)據(jù)庫(kù)的設(shè)計(jì)及表的創(chuàng)建課件,76,,數(shù)據(jù)庫(kù)的設(shè)計(jì)及表的創(chuàng)建課件,77,,數(shù)據(jù)庫(kù)的設(shè)計(jì)及表的創(chuàng)建課件,78,,數(shù)據(jù)庫(kù)的設(shè)計(jì)及表的創(chuàng)建課件,79,,數(shù)據(jù)庫(kù)的設(shè)計(jì)及表的創(chuàng)建課件,80,,數(shù)據(jù)庫(kù)的設(shè)計(jì)及表的創(chuàng)建課件,81,,數(shù)據(jù)庫(kù)的設(shè)計(jì)及表的創(chuàng)建課件,82,,數(shù)據(jù)庫(kù)的設(shè)計(jì)及表的創(chuàng)建課件,83,,數(shù)據(jù)庫(kù)的設(shè)計(jì)及表的創(chuàng)建課件,84,,數(shù)據(jù)庫(kù)的設(shè)計(jì)及表的創(chuàng)建課件,85,,數(shù)據(jù)庫(kù)的設(shè)計(jì)及表的創(chuàng)建課件,86,,數(shù)據(jù)庫(kù)的設(shè)計(jì)及表的創(chuàng)建課件,87,,數(shù)據(jù)庫(kù)的設(shè)計(jì)及表的創(chuàng)建課件,88,,數(shù)據(jù)庫(kù)的設(shè)計(jì)及表的創(chuàng)建課件,89,,數(shù)據(jù)庫(kù)的設(shè)計(jì)及表的創(chuàng)建課件,90,,數(shù)據(jù)庫(kù)的設(shè)計(jì)及表的創(chuàng)建課件,91,,數(shù)據(jù)庫(kù)的設(shè)計(jì)及表的創(chuàng)建課件,92,,數(shù)據(jù)庫(kù)的設(shè)計(jì)及表的創(chuàng)建課件,93,,數(shù)據(jù)庫(kù)的設(shè)計(jì)及表的創(chuàng)建課件,94,,數(shù)據(jù)庫(kù)的設(shè)計(jì)及表的創(chuàng)建課件,95,,數(shù)據(jù)庫(kù)的設(shè)計(jì)及表的創(chuàng)建課件,96,,數(shù)據(jù)庫(kù)的設(shè)計(jì)及表的創(chuàng)建課件,97,,數(shù)據(jù)庫(kù)的設(shè)計(jì)及表的創(chuàng)建課件,98,