數(shù)據庫實驗報告概念模型的建立_第1頁
數(shù)據庫實驗報告概念模型的建立_第2頁
數(shù)據庫實驗報告概念模型的建立_第3頁
數(shù)據庫實驗報告概念模型的建立_第4頁
數(shù)據庫實驗報告概念模型的建立_第5頁
已閱讀5頁,還剩18頁未讀, 繼續(xù)免費閱讀

下載本文檔

版權說明:本文檔由用戶提供并上傳,收益歸屬內容提供方,若內容存在侵權,請進行舉報或認領

文檔簡介

1、重 慶 交 通 大 學學 生 實 驗 報 告實驗課程名稱 數(shù)據庫原理 開課實驗室 數(shù)學實驗室 學 院 理學院 年級 2012 專業(yè)班 信息與計算科學2班 學 生 姓 名 西西里孩子 學 號 68431685 開 課 時 間 2014 至 2015 學年第 1 學期評分細則評分報告表述的清晰程度和完整性(20分)概念模型的合理性(30分)轉換的邏輯模型的合理性(20分)創(chuàng)建對象的SQL代碼正確性(20分)實驗結果分析(10分)總成績教師簽名數(shù)據庫原理實驗報告 實驗一 概念模型的建立一、實驗目的1、根據給定的題目,把現(xiàn)實世界中的具體事物抽象為某一概念級的模型,即建立整個問題的概念模型,建立起數(shù)據庫

2、設計人員與用戶之間的交流,為數(shù)據模型的建立奠定基礎。2、學會認識和分析現(xiàn)實世界,根據對用戶需求,描述用戶的數(shù)據要求:(1)練習如何從中抽取實體;(2)練習如何建立各實體之間的聯(lián)系;(3)從各實體和實體間的聯(lián)系,抽取出數(shù)據處理的過程。二、實驗內容及要求(一)實驗內容:通過運用一些軟件如power designer、編輯工具如WPS等,對多個實體建立概念模型,通過該方法可以建立直觀的概念模型,再通過該模型來建立邏輯模型和物理模型。(二)實驗要求:1、問題描述某大學需要使用計算機管理學生信息、成績信息等,要求如下:(1)學生信息管理,包含學生的基本信息,如學號、姓名、性別、出生日期等;還要包含學生的

3、簡歷、社會關系等;(2)課程管理,包含整個學校開設的所有課程;(3)教學計劃管理,包含設定各系各專業(yè)在哪學期開設什么樣的課程,學分是多少;(4)學生選課管理,包含學生在某學期選擇什么樣的課程;(5)學生成績管理,包含學生各課程的成績、是否補考、補考成績;(6)學生獎懲管理,管理學生在校期間所獲得的獎勵和懲罰記錄。2、根據以上要求,為該大學的計算機管理系統(tǒng)建立數(shù)據庫的概念模型。三、實驗設備及軟件1、設備:個人電腦2、軟件:PowerDesigner 15、Microsoft SQL Server 2005、WPS Office 四、設計方案(一)題目:概念模型的建立(二)設計的主要思路1、根據前

4、面所要求的應該做的內容及其客觀要求,按照步驟進行;2、進入power designer環(huán)境中,如下圖:3、通過點擊相應的圖標,建立相應的對象。如實體的建立、聯(lián)系的建立等。如下圖:上圖共建立了3個實體:學生、課程和學生選課,在該模型中,也表明了各實體之間的聯(lián)系,如學生和課程之間有一對多的聯(lián)系,課程和學生選課之間也具有一對多的聯(lián)系。3、實體屬性的建立雙擊實體對象,彈出實體描述對話框;如下圖:要求輸入輸入實體的名稱(name)、實體代碼(code)、實體標簽(label)。點擊attributes(屬性)按鈕,進入實體的屬性輸入框,如下圖:在彈出框中輸入多個屬性,包含屬性的名稱(name)、代碼(c

5、ode)、數(shù)據類型(data type),對于數(shù)據類型可以選擇,如下圖:在輸入屬性時注意屬性的特性:I:為主碼(在PowerDesigner 15里P為主碼);如果是主碼,則表明該屬性唯一標識一個實體。M:為是否允許為空;如果選中,則表示該屬性不允許為空。(三)主要功能1、通過整體把握,能夠對學生的基本信息(如學號、姓名、性別出生日期、社會關系、學生簡歷)進行統(tǒng)一的、有效地管理;2、能清晰的描繪出關于學生實體以及有和學生有關系的實體情況,可以對學校開設的課程進行管理;3、能對教學計劃、學生選課、學生成績、學生獎懲進行管理;五、主要代碼/*=*/* DBMS name: Microsoft SQ

6、L Server 2005 */* Created on: 2014/12/23 19:01:33 */*=*/if exists (select 1 from sysobjects where id = object_id('cla') and type = 'U') drop table clagoif exists (select 1 from sysobjects where id = object_id('col') and type = 'U') drop table colgoif exists (select 1

7、from sysobjects where id = object_id('jcxm') and type = 'U') drop table jcxmgoif exists (select 1 from sysobjects where id = object_id('ltest') and type = 'U') drop table ltestgoif exists (select 1 from sysobjects where id = object_id('maj') and type = 'U&

8、#39;) drop table majgoif exists (select 1 from sysobjects where id = object_id('nat') and type = 'U') drop table natgoif exists (select 1 from sysobjects where id = object_id('"plan"') and type = 'U') drop table "plan"goif exists (select 1 from sys

9、objects where id = object_id('pol') and type = 'U') drop table polgoif exists (select 1 from sysobjects where id = object_id('selcla') and type = 'U') drop table selclagoif exists (select 1 from sysobjects where id = object_id('shehuiguanxi') and type = 'U

10、') drop table shehuiguanxigoif exists (select 1 from sysobjects where id = object_id('stu') and type = 'U') drop table stugoif exists (select 1 from sysobjects where id = object_id('stufencon') and type = 'U') drop table stufencongoif exists (select 1 from sysobje

11、cts where id = object_id('stuhj') and type = 'U') drop table stuhjgoif exists (select 1 from sysobjects where id = object_id('stutext') and type = 'U') drop table stutextgoif exists (select 1 from sysobjects where id = object_id('term') and type = 'U')

12、 drop table termgoif exists (select 1 from sysobjects where id = object_id('xueyear') and type = 'U') drop table xueyeargoif exists (select 1 from sysobjects where id = object_id('xykcgl') and type = 'U') drop table xykcglgo/*=*/* Table: cla */*=*/create table cla ( c

13、lano varchar(10) not null, clana varchar(40) not null, constraint PK_CLA primary key nonclustered (clano)go/*=*/* Table: col */*=*/create table col ( colno varchar(10) not null, colna varchar(40) not null, constraint PK_COL primary key nonclustered (colno)go/*=*/* Table: jcxm */*=*/create table jcxm

14、 ( jxno varchar(10) not null, jxna varchar(60) not null, constraint PK_JCXM primary key nonclustered (jxno)go/*=*/* Table: ltest */*=*/create table ltest ( ltestno varchar(10) not null, ltestna varchar(20) not null, testtime float not null, constraint PK_LTEST primary key nonclustered (ltestno)go/*=

15、*/* Table: maj */*=*/create table maj ( majno varchar(10) not null, colno varchar(10) not null, majna varchar(40) not null, constraint PK_MAJ primary key nonclustered (majno)go/*=*/* Table: nat */*=*/create table nat ( natno varchar(6) not null, natna varchar(30) not null, constraint PK_NAT primary

16、key nonclustered (natno)go/*=*/* Table: "plan" */*=*/create table "plan" ( majno varchar(10) not null, clano varchar(10) not null, xyeno varchar(6) not null, termno int not null constraint CKC_TERMNO_PLAN check (termno in (1,2), xuefen float not null, constraint PK_PLAN primary k

17、ey nonclustered (majno, clano)go/*=*/* Table: pol */*=*/create table pol ( polno varchar(10) not null, polna varchar(40) not null, constraint PK_POL primary key nonclustered (polno)go/*=*/* Table: selcla */*=*/create table selcla ( majno varchar(10) not null, clano varchar(10) not null, stuno varcha

18、r(15) not null, ltestno varchar(10) not null, constraint PK_SELCLA primary key nonclustered (majno, clano, stuno)go/*=*/* Table: shehuiguanxi */*=*/create table shehuiguanxi ( stuno varchar(15) not null, gxno varchar(6) not null, gxna varchar(40) not null, constraint PK_SHEHUIGUANXI primary key nonc

19、lustered (stuno, gxno)go/*=*/* Table: stu */*=*/create table stu ( stuno varchar(15) not null, stuna varchar(40) not null, majno varchar(10) not null, nianji int not null, sex char(2) not null default '1' constraint CKC_SEX_STU check (sex in ('1','2'), natno varchar(6) not nu

20、ll, polno varchar(10) null, birt datetime null, constraint PK_STU primary key nonclustered (stuno)go/*=*/* Table: stufencon */*=*/create table stufencon ( stextci int not null, majno varchar(10) not null, clano varchar(10) not null, stuno varchar(15) not null, gfen float not null, constraint PK_STUF

21、ENCON primary key nonclustered (stextci, majno, clano, stuno)go/*=*/* Table: stuhj */*=*/create table stuhj ( stuno varchar(15) not null, jxno varchar(10) null, constraint PK_STUHJ primary key nonclustered (stuno)go/*=*/* Table: stutext */*=*/create table stutext ( stuno varchar(15) not null, jlthin

22、g text not null, constraint PK_STUTEXT primary key nonclustered (stuno)go/*=*/* Table: term */*=*/create table term ( termno int not null constraint CKC_TERMNO_TERM check (termno in (1,2), xyeno varchar(6) not null, constraint PK_TERM primary key nonclustered (termno, xyeno)go/*=*/* Table: xueyear */*=*/create table xueyear ( xyeno varchar(6) not null, constraint PK_XUEYEAR primary key nonclustered (xyeno)go/*=*/* Table: xykcgl */*=*/create table xykcgl (

溫馨提示

  • 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網頁內容里面會有圖紙預覽,若沒有圖紙預覽就沒有圖紙。
  • 4. 未經權益所有人同意不得將文件中的內容挪作商業(yè)或盈利用途。
  • 5. 人人文庫網僅提供信息存儲空間,僅對用戶上傳內容的表現(xiàn)方式做保護處理,對用戶上傳分享的文檔內容本身不做任何修改或編輯,并不能對任何下載內容負責。
  • 6. 下載文件中如有侵權或不適當內容,請與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準確性、安全性和完整性, 同時也不承擔用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。

評論

0/150

提交評論