數(shù)據(jù)庫中數(shù)據(jù)的更新_第1頁
數(shù)據(jù)庫中數(shù)據(jù)的更新_第2頁
數(shù)據(jù)庫中數(shù)據(jù)的更新_第3頁
數(shù)據(jù)庫中數(shù)據(jù)的更新_第4頁
數(shù)據(jù)庫中數(shù)據(jù)的更新_第5頁
已閱讀5頁,還剩3頁未讀 繼續(xù)免費(fèi)閱讀

下載本文檔

版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進(jìn)行舉報(bào)或認(rèn)領(lǐng)

文檔簡介

1、沈陽工程學(xué)院學(xué)生實(shí)驗(yàn)報(bào)告(課程名稱:數(shù)據(jù)庫原理及應(yīng)用)實(shí)驗(yàn)題目:數(shù)據(jù)庫中數(shù)據(jù)的更新班級 信安本111學(xué)號 2011416109姓名 夏彬珊日 期20131021地點(diǎn)F612指導(dǎo)教師孫先麗 祝世一、實(shí)驗(yàn)?zāi)康恼莆誗QL的數(shù)據(jù)更新功能,包括:插入數(shù)據(jù)、修改數(shù)據(jù)和刪除數(shù)據(jù)。二、實(shí)驗(yàn)環(huán)境Oracle10g數(shù)據(jù)庫系統(tǒng)。三、實(shí)驗(yàn)內(nèi)容與要求對實(shí)驗(yàn)一中的三個(gè)表student, course, sc進(jìn)行更新操作。(1)在student表中輸入6條記錄。在course表中輸入4條記錄。在sc表中輸入10條記錄,注意有些課程可有多人選,有些課程可能 沒人選。練習(xí)數(shù)據(jù)的刪除和修改。練習(xí)多個(gè)記錄的增加,刪除和修改。四、實(shí)

2、驗(yàn)過程及結(jié)果分析(1)在student表中輸入6條記錄。insert into student (sno,sname,ssex,sage,sdept,scome)values(09,夏彬珊,男,22,信息學(xué)院,10-10 月-2011);insert into student (sno,sname,ssex,sage,sdept,scome)values(28,白文峰,男,21,電氣,10-10 月-2011);insert into student (sno,sname,ssex,sage,sdept,scome)values(26,唐勝熙,男,22,信息學(xué)院,10-10 月-2011);i

3、nsert into student (sno,sname,ssex,sage,sdept,scome)values(11,孫宇軒,男,22,英語系,10-10 月-2011);insert into student (sno,sname,ssex,sage,sdept,scome)values(13,朱帝,男,22,政法,10-10 月-2011);insert into student (sno,sname,ssex,sage,sdept,scome)values(23,李明明,女,22,熱動(dòng),10-10 月-2011);Insert into student (sno, sname, s

4、sex, sage, sdept, sconie) values (09 f 夏彬珊 row created.1 row created.1 +-.-.TTT。十1= , + i=i 廣1 廣男 1 22 信息學(xué)院 1 * 1 10-10 -20111 ) Insert into student (sno, sname, ssex, sage, sdept, sconie) values ( 1 23 明明.】男 1 , 1 22 1 ,】專升本 1 . 1 10-101 -20111 ); Insert into student (sno, sname, ssex, sage, sdept,

5、 sconie) values ( 1 28 1 白文峰男 1 21 1 電氣】.1 ID-ID月-20111 ); Insert into student (sno, snaine, ssex, sage, sdept, scome) values (26 f 唐勝熙 1 廣男 1 22 信息學(xué)院 1 * 1 10-10 -20111 ) Insert into student (sno, snaine, ssex, sage, sdept, scoine) values (11 f | 孫宇軒;男 1 22 ,英語索 1 * 1 10-10 -20111 );IvT)加載腳木)保存腳本)(

6、1)分析:未建立scomenm己int口 mtuH己nt mnci, mnam己,mm己x, m日計(jì)己,mH己口七,mucini已)SNO SSEX SAGE SDEPTS_ENTRANCE SNAMESCOME9男22信息學(xué)院夏彬珊1 CM 口月-1128男21電氣白曳峰10-10-1126男22信息學(xué)院唐勝熙10-10-1111男22英倍系孫宇軒10-10-1113111男22政法朱帝10-10-11601.33652819123397094950919323482284(2)在course表中輸入4條記錄。6078V2 60insert into course(cnofcnameccre

7、dit) values(1 11 f1 math1,161); insert into course(cnofcnameccredit) values(121f1english1f14.51); insert into course(cnofcnameccredit) values(131 f1 rd1,121); insert into course(cnofcnameccredit) values(141f1xinxi1f131);values(1,math,6);insert into course(cno,cname,ccredit) values(2,english,4.5);ins

8、ert into course(cno,cname,ccredit) values(3,rd,2);insert into course(cno,cname,ccredit) values(4,xinxi,3);CNOCNAMECCREDIT1math62english53rd24xinxi3(3)在sc表中輸入10條記錄,注意有些課程可有多人選,有些課程可能 沒人選。insert into sc(sno,cno,grade)values(06,2,59);insert into sc(sno,cno,grade)values(11,3,78);insert into sc(sno,cno,g

9、rade)values(11,4,60);insert into sc(sno,cno,grade)values(13,3,65);insert into sc(sno,cno,grade)values(28,1,91);insert into sc(sno,cno,grade)values(23,3,97);insert into sc(sno,cno,grade)values(09,4,95);insert into sc(sno,cno,grade)values(09,1,93);insert into sc(sno,cno,grade)values(23,4,82);insert into sc(sno,cno,grade)values(11,1,78);1137811460133652819123397094950919334)練習(xí)數(shù)據(jù)的刪除和修改。8228460刪除11178delletefrom scwheresno=11and cno=3;1146013365281912339709435091932348228460修改178update scset grade=70wheresno=11 and cno=1;1146013365281912339709

溫馨提示

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

評論

0/150

提交評論