【正文】
xmmc end else if(@xm is null and @xmmc is null) begin select * from view_All End(2)xmbh_lwmc_hjbh存儲(chǔ)過(guò)程xmbh_lwmc_hjbh存儲(chǔ)過(guò)程可以通過(guò)教師編號(hào)和項(xiàng)目名稱及獲獎(jiǎng)編號(hào)來(lái)查詢相關(guān)信息。create procedure xmbh_lwmc_hjbh@xmbh nvarchar(2),@lwmc nvarchar(10),@hjbh nvarchar(2)as if(@xmbh is null and @lwmc is null and @hjbh is null) begin select * from view_All endelse if(@xmbh is not null and @lwmc is null and @hjbh is null) begin select * from view_All where xmbh=@xmbh end else if(@xmbh is null and @lwmc is not null and @hjbh is null) begin select * from view_All where lwmc=@lwmc end else if(@xmbh is null and @lwmc is null and @hjbh is not null) begin select * from view_All where hjbh=@hjbh end else if(@xmbh is not null and @lwmc is not null and @hjbh is null) begin select * from view_All where xmbh=@xmbh and lwmc=@lwmc end else if(@xmbh is null and @lwmc is null and @hjbh is not null) begin select * from view_All where xmbh=@xmbh and hjbh=@hjbh end elseif(@xmbh is null and @lwmc is not null and @hjbh is not null) begin select * from view_All where lwmc=@lwmc and hjbh=@hjbh end elseif(@xmbh is not null and @lwmc is not null and @hjbh is not null) begin select * from view_All where xmbh=@xmbh and lwmc=@lwmc and hjbh=@hjbh end 數(shù)據(jù)庫(kù)的備份數(shù)據(jù)庫(kù)的備份在當(dāng)今尤為重要,若沒(méi)有備份,數(shù)據(jù)的損害是無(wú)法修復(fù)的,而數(shù)據(jù)的損壞的原因是多方面的,是難以預(yù)料的,所以數(shù)據(jù)備份是必須的。 本數(shù)據(jù)庫(kù)的備份,,。 新建作業(yè) 數(shù)據(jù)庫(kù)備份界面5 數(shù)據(jù)庫(kù)操作數(shù)據(jù)的插入是數(shù)據(jù)庫(kù)的基礎(chǔ),數(shù)據(jù)錄入是做任操作的前提。 INSERT INTO Paper VALUES(39。0139。,39。論文39。,39。是39。,39。2013/2/339。)。INSERT INTO Paper VALUES(39。0239。,39。論文39。,39。是39。,39。2011/5/1339。)。INSERT INTO Paper VALUES(39。0339。,39。論文39。,39。是39。,39。2012/5/339。)。INSERT INTO Paper VALUES(39。0439。,39。論文39。,39。是39。,39。2013/4/339。)。 數(shù)據(jù)插入數(shù)據(jù)的刪除是為了去除數(shù)據(jù)庫(kù)中不需要的信息和錯(cuò)誤的信息。DELETE FROM OwnWHERE jsbh=39。0639。 AND hjbh=39。0439。數(shù)據(jù)的更新是為了在數(shù)據(jù)出錯(cuò)的情況下,進(jìn)行的更改。UPDATE ResearchSET xmlx=39。學(xué)術(shù)性39。WHERE xmbh=39。0139。 數(shù)據(jù)更新數(shù)據(jù)的查詢是數(shù)據(jù)庫(kù)的核心,我們可以直接對(duì)建立好的表進(jìn)行直接查詢也可以通過(guò)視圖進(jìn)行查詢。直接對(duì)表進(jìn)行查詢:SELECT * FROM Teacher WHERE xm = 39。張三39。借助視圖進(jìn)行查詢:SELECT * FROM view_Prize WHERE xm = 39。張三39。 數(shù)據(jù)查詢6 總結(jié)本次課題設(shè)計(jì)任務(wù)是開(kāi)發(fā)高??蒲泄芾硐到y(tǒng)數(shù)據(jù)庫(kù),通過(guò)課堂當(dāng)中所學(xué)知識(shí)以及對(duì)課堂中所舉高校圖書(shū)管理系統(tǒng)的設(shè)計(jì)進(jìn)行參考,在我們小組的不斷努力和共同探討下最終將該任務(wù)順利完成。在此次設(shè)計(jì)與實(shí)現(xiàn)當(dāng)中,我們都遇到了如下問(wèn)題:1. 在需求分析這里出現(xiàn)分歧。由于每個(gè)人對(duì)事物的看法不同導(dǎo)致起初在需求分析這里出現(xiàn)了一些分歧,無(wú)法達(dá)成一致。最終通過(guò)多次商量和網(wǎng)上調(diào)查后將需求分析梳理清楚并設(shè)計(jì)好了數(shù)據(jù)流程以及實(shí)體。2. 對(duì)TSQL語(yǔ)句書(shū)寫的不熟練。在最后實(shí)施階段中,由于需要實(shí)際上機(jī)操作。此時(shí)則會(huì)發(fā)現(xiàn)要將理論知識(shí)靈活運(yùn)用到實(shí)際當(dāng)中并不容易,尤其在存儲(chǔ)過(guò)程這里比較困難。最后,在經(jīng)過(guò)多次的復(fù)習(xí)和實(shí)際操作后將數(shù)據(jù)庫(kù)的實(shí)踐環(huán)節(jié)完成。通過(guò)這次課程設(shè)計(jì),盡管設(shè)計(jì)的系統(tǒng)不是很完善并且安全性不高。但足以讓我認(rèn)識(shí)到了自己的不足以及急需要彌補(bǔ)的地方。所以,在今后的學(xué)習(xí)道路中,我會(huì)更加努力的完善自己,不斷的復(fù)習(xí)鞏固所學(xué)知識(shí),并多加練習(xí)以達(dá)到可以在實(shí)際中靈活使用的地步。總的來(lái)說(shuō)這次課程設(shè)計(jì)讓我感到收獲頗豐。參考文獻(xiàn)[1] [M].北京:清華大學(xué)出版社,2009[2] [M]. 北京:清華大學(xué)出版社,2007[3] [M]. 北京:機(jī)械工業(yè)出版社,201335