!!!數(shù)據(jù)庫考試題及答案_第1頁
!!!數(shù)據(jù)庫考試題及答案_第2頁
!!!數(shù)據(jù)庫考試題及答案_第3頁
!!!數(shù)據(jù)庫考試題及答案_第4頁
!!!數(shù)據(jù)庫考試題及答案_第5頁
已閱讀5頁,還剩29頁未讀, 繼續(xù)免費(fèi)閱讀

下載本文檔

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

文檔簡介

1、習(xí)題一、12分用英文解釋1、DBMS 2、Data Dictionary 3、Transaction二、10 分二、單項(xiàng)選擇題1. There may be instances where an attribute has a set of values for a specific entity. This type of attribute is said to be【】A . single valued attribute B. multivalued attributeC. simple attributeD. composite attribute2. In a particular

2、 bank, a loan can belong to only one customer, and a customer can have several loans, the n the relati on ship set fromcustomer to loa n is【】A . one to many B. many to many C. many to one D . one to one3 . A【】contains metadata that is, data about data.A . table B . view C . data dictio nary D . trig

3、ger4 . The phrase “greater tha n at least one ” is represented in SQL byA . all B . all C . some5 . In gen eral, all aggregate fun cti ons except【】ignore n ull values in their in put collecti on.A . sum B . avg C . min D . count6 . If a schedule S can be transformed into a schedule S by a series of

4、swaps of non-conflictingin struct ions, we say that S and S e【】 arA . non-con flict ing equivale ntB . con flict equivale ntC . non-co nflicti ng serializableD . con flict serializable7 . The fun dame ntal operati ons in the relati onal algebra ar【】。A. U, -, X, n 和(TB. U,-冗和 cC . U,n,X, n和 c D . U ,

5、 n, x,冗和 c8 . In SQL, =someis identical to in, and 【】is identical to not in。A . some B . =all C . all D . =some9 . The result of true and null is【】。A . n ull B . true C . false D . n ot null10 . The function sum applied on the collection 1,1,3,4,4,11 returns the value!.A . 24 B . 6 C . 4 D . 11三、10分

6、設(shè)有Course課程)、Teacher教師)、Student(研究生),其中:1、Course有屬性cno(課程號(hào))、cname課程名)和mark(學(xué)分);2、Teacher有屬性tno(教師編號(hào))、tname(教師姓名)和major(專業(yè)屬性);3、 Student有屬性sno(學(xué)號(hào))、sname學(xué)生姓名)、age(年齡)、bno(班級(jí)號(hào))、score(總成績)屬性。4、Teacher與Student之間有指導(dǎo)論文的聯(lián)系,用Supervise表示,每位教師可指導(dǎo)多名研究生,每名研究生有且只能有一位指導(dǎo)教師;5、Teacher與Course之間有講授的聯(lián)系,用Teach表示,每位教師可以教授多

7、門課程,每門課程可同時(shí)由多位教師開設(shè)。試畫出E-R圖。四、 12分題設(shè)與第三題相同,試根據(jù)你所畫的 E-R圖,設(shè)計(jì)出關(guān)系數(shù)據(jù)庫,并指出每個(gè)關(guān)系中 的主鍵和外鍵。五、8分題設(shè)與第三題相同,試用關(guān)系代數(shù)表達(dá):1 檢索編號(hào)為to的老師的姓名2 檢索班級(jí)號(hào)為bO或者年齡大于21歲所有學(xué)生的姓名六、12分題設(shè)與第三題相同。使用SQL表達(dá):1 .建立表結(jié)構(gòu) Course(課程)、Teacher教師)、Student(研究生)(其中要求age大于零;定義必要的主鍵和外鍵)。2. 將學(xué)號(hào)為” a01姓名為” zhang年齡為” 22的學(xué)生信息加入到Student表中3. 檢索專業(yè)為計(jì)算機(jī)的老師的姓名和編號(hào),并

8、按編號(hào)由大到小排列。4. 將學(xué)號(hào)以aO開頭的學(xué)生信息刪除。5. 檢索比b0班所有學(xué)生的總成績都高的學(xué)生的姓名,去掉重復(fù)的姓名。6. 檢索張山老師所教的學(xué)生的平均總成績(假設(shè)不存在教師重名現(xiàn)象)。七、12分設(shè)有屬于1NF的關(guān)系模式R=( A, B, C, D, E ),R上的函數(shù)依賴集F= BC AD ,AD EB,E C 。1. R是否屬于3NF ?為什么?2. R是否屬于BCNF ?為什么?八、12 分設(shè)有屬于1NF的關(guān)系模式R= (A, B, C, D, E),R上的函數(shù)依賴集F包含如下函數(shù)依賴F=AB C, D A, E C, B CD, B A1、求X=BD關(guān)于F的閉包X+.2、求F的

9、一個(gè)正則覆蓋.3、求滿足3NF分解的關(guān)系模式九、12分設(shè)有如下調(diào)度SoT1T2T3read(B)write(B)read(B)read(A)write(B)write(A)read(B)write(B)read(A)write(A)read(A)write(A)a)判別S是否為沖突可串行化調(diào)度?2、如果是沖突可串行化調(diào)度,則給出與S沖突等價(jià)的串行調(diào)度。習(xí)題答案八、12分用英文解釋(每題3分)3、DBMS: A database man ageme nt system con sists of a collect ion of in terrelated data and a collectio

10、 n of programs to access those data.4、Data dictio nary: A data dictio nary is a file that contains metadata, that is data about data.5、Tran sact ion: The tran sacti on is a unit of program executi on that accesses and possibly updates various data items.九、10分單項(xiàng)選擇題(每題1分)1.【B】2.【A】3.【C】4.【D】5.【D】6.【B】

11、7.【A】8.【C】9.【A】10.【A】十、10分E-R 圖:(1) 正確描述出Teacher Course Teach Supervise Student五個(gè)實(shí)體集及聯(lián)系集及其相關(guān)屬性 5分(2) 描述出Teacher和 Student之間為1對(duì)多關(guān)系 -1分(3) 描述出Teacher和 Course之間為多對(duì)多關(guān)系-1分(4) 矩形、菱形等符號(hào)表示正確-3分十一、12分Course(cno, cname, mark)主鍵:eno 分Teacher (tno, tname, major)主鍵:tno 分Student (sno, sname, age, bno, tno,score主鍵:

12、sno 夕卜鍵:tno-4分 其中主鍵和外鍵各占1分Teach(tno, eno)主鍵:tno, eno夕卜鍵:tno 和 eno-4分 其中主鍵和外鍵各占1.5分十二、8分Htname(”_;tno= to(Teacher)分nsnamd”-,age21 or ;:bno= bo(Stude nt)-4 分十三、12分1. create table Course (eno char(4),cn ame char(10),mark in teger,primary key (cn o)-1 分create table Teacher (tno char(10),tn ame char(4),m

13、ajor char(8)primary key (tno)-分create table Stude nt (sno char(10),sn ame char(10),age in teger,tno char(10),bno char(10),score in teger,primary key (sno),foreign key(t no) referencesTeacher (tno),check (age0)-1 分create table Teach(tno char(10),eno char(4),primary key (tno,cno),foreign key(t no) ref

14、erencesTeacher (tno),foreign key(cno) referencesCourse (eno) -分2. insert into Student(sno,sname,age) values (a01, zhang, 22)分3. Select tname, tnofrom Teacherwhere major=計(jì)算機(jī)order by tno desc -1.5 分 order by 語句正確占 0.5 分4. Delete from StudentWhere sno like a01%-1.5分like語句表達(dá)正確占0.5分5. select distinet sna

15、mefrom Stude ntwhere score(select max(score)from stude ntwhere bno= b01 -)1.5 分6. Select avg(score)From stude ntwhere tno=(Select tnoFrom TeacherWhere tname=張山1.5 分十四、12分BC, AD, BE都是候選碼,-4分1. 所有屬性都是某個(gè)候選碼的屬性,顯然是3NF。-4分2. E C非平凡依賴,而E不是R的一個(gè)超碼,R不屬于BCNF -4分十五、12分1. X+=ABDC-.5 分2. 正則覆蓋:D A E C B CD-4.5分 每

16、個(gè)依賴1.5分3. D,AE,CB,C,D B,E-6 分 每個(gè)模式 1.5 分十六、12分1. S為沖突可串行化調(diào)度。-4分2沖突等價(jià)的串行調(diào)度為-8分十七、12分用央文解釋:7、Transaction8、 DBMS9、Data model十八、20分選擇題:1.一個(gè)關(guān)系中的主鍵()。A.不可能多于一個(gè)B.不可以作為其他關(guān)系的外部鍵C.可以取空值D.不可以是屬性組合2.在數(shù)據(jù)庫中,產(chǎn)生數(shù)據(jù)不-A.數(shù)據(jù)存儲(chǔ)量太大致的根本原因是()。B. 數(shù)據(jù)冗余C. 未對(duì)數(shù)據(jù)進(jìn)行完整性控制D. 沒有嚴(yán)格保護(hù)數(shù)據(jù)3事務(wù)在執(zhí)行時(shí),所遵循的要么所有操作全部發(fā)生,要么由于出錯(cuò)而全不發(fā)生”這是事務(wù)的()性質(zhì)A.隔離性B

17、.持久性C.原子性D.一致性4. ()是數(shù)據(jù)抽象的最低層次,描述數(shù)據(jù)實(shí)際上是怎樣存儲(chǔ)的。A.物理層B.邏輯層C.視圖層D.子模式層5. 對(duì)數(shù)據(jù)庫系統(tǒng)進(jìn)行集中控制的人稱為()。A.操作系統(tǒng)管理員B.數(shù)據(jù)庫管理員C.數(shù)據(jù)庫操作員D.程序員6. A中的一個(gè)實(shí)體至多同E中的一個(gè)實(shí)體相聯(lián)系,而E中的一個(gè)實(shí)體可以同A中任意數(shù)目的實(shí)體相聯(lián)系,則A和E之間的映射基數(shù)為()。A. 一對(duì)多B. 一對(duì)一C.多對(duì)一D.多對(duì)多7. ()提供定義關(guān)系模式、刪除關(guān)系以及修改關(guān)系模式的命令。A.數(shù)據(jù)定義語言B.視圖定義語言|C.數(shù)據(jù)操縱語言D.動(dòng)態(tài)SQL語言8. 事務(wù)不具有的性質(zhì)有A.原子性C.隔離性9. 計(jì)算過程中不忽略(

18、)B.可恢復(fù)性D.持久性Null值的聚集函數(shù)包括()A. avg ( )B. max ()C. mi n( )D. count()10. 假設(shè)關(guān)系 person 包含元組John. Smith, Jeffrey, Mary, Valeria,關(guān)系 customer 包含元組John, Jeffrey, Tom。 則person和customer的集合差運(yùn)算結(jié)果應(yīng)該包含()個(gè)元組。A. 3 B. 2 C. 1 D. 5三、8分請(qǐng)?jiān)O(shè)計(jì)一個(gè)體育比賽技術(shù)統(tǒng)計(jì)數(shù)據(jù)庫。數(shù)據(jù)庫對(duì)每個(gè)運(yùn)動(dòng)員保存?zhèn)€人記錄,包括:姓名、性別、年齡、身份證號(hào)。對(duì)每項(xiàng)比賽存有:比賽編號(hào)、比賽時(shí)間、地點(diǎn)、比分、參加比賽的球隊(duì)名稱。還應(yīng)

19、記錄上場隊(duì)員在每場比賽的統(tǒng)計(jì)數(shù)據(jù),包括:進(jìn)球數(shù)、助攻次數(shù)。畫出相應(yīng)的E-R圖,并加以必要的說明。四、8分根據(jù)下面的E-R圖設(shè)計(jì)關(guān)系數(shù)據(jù)庫,要求指出相應(yīng)的主鍵和外鍵。五、12分考慮下圖所示員工數(shù)據(jù)庫。為下面每個(gè)查詢語句寫出SQL表達(dá)式。employee(employee-n ame, street, city)works (employee-name, company-name, salary) compa ny (compa ny-n ame, city)a.找出不為First Bank Corporation工作的所有員工的名字b .修改數(shù)據(jù)庫,使得 Jones現(xiàn)在居住在 Newtown市c

20、 .找出各個(gè)公司員工的平均工資,并按照公司名稱排序(逆序)。d-刪除works關(guān)系中的所有元組。六、10分關(guān)于關(guān)系模式R=(A, B, C, D, E)的函數(shù)依賴集F如下所示,A BCCD EB DE Aa .計(jì)算正則覆蓋Fcb .計(jì)算閉包(AB) +七、 10分設(shè)有屬于1NF的關(guān)系模式 R=( A, B, C, D, E ),R上的函數(shù)依賴集 F= A BC,CD E, B D ,E A 。 下面是R的兩個(gè)分解(1) n= Ri=( A, B, C )和 R2(A, D, E ) (2) Z= Ri=( A, B, C )和 R2 ( C, D, E ) 試判別n Z是否為無損連接分解,為什

21、么?八、 10分設(shè)有屬于1NF的關(guān)系模式 R=(A, B, C, D, E),R上的函數(shù)依賴集 F= A BC, CD E, B D, A D 。 求滿足3NF分解的關(guān)系模式。九、10分考慮如下所示的優(yōu)先圖,相應(yīng)的調(diào)度是沖突可串行化的嗎?如果是,請(qǐng)給出串行化調(diào)度次序。T2T1T3T626參考答案十九、12分用英文解釋:10、Transaction: A transaction is a unit of program execution that accesses and possibly updates various data items.11、DBMS : A database mana

22、gement system consists of a collection of interrelated data and a collection of programs to access that data.12、Data model: A collection of conceptual tools for describing data, data relationships, data semantics, and data constraints.二十、20分選擇題:A. B.C.A.B.C.A.B.D.A三、8分請(qǐng)?jiān)O(shè)計(jì)一個(gè)體育比賽技術(shù)統(tǒng)計(jì)數(shù)據(jù)庫。數(shù)據(jù)庫對(duì)每個(gè)運(yùn)動(dòng)員保存?zhèn)€人記

23、錄,包括:姓名、性別、年齡、身份證號(hào)。對(duì)每項(xiàng)比賽存有:比賽編號(hào)、比賽時(shí)間、地點(diǎn)、比分、參加比賽的球隊(duì)名稱。還應(yīng)記錄上場隊(duì)員在每 場比賽的統(tǒng)計(jì)數(shù)據(jù),包括:進(jìn)球數(shù)、助攻次數(shù)。畫出相應(yīng)的E-R圖,并加以必要的說明。四、8分根據(jù)下面的E-R圖設(shè)計(jì)關(guān)系數(shù)據(jù)庫,要求指出相應(yīng)的主鍵和外鍵。account (account_number, balance, branch_name) primary key (account_number) foreign key (branch_name)branch (branch_name, branch_city, assets) primary key (branch

24、_name) customer (customer_name, customer_city) primary key (customer_name) depositor (account_number, customer_name)primary key (account_number, customer_name) foreign key (account_number) foreign key (customer_name)五、12分考慮下圖所示員工數(shù)據(jù)庫。為下面每個(gè)查詢語句寫出SQL表達(dá)式。employee(employee-n ame, street, city)works (empl

25、oyee-name, company-name, salary) compa ny (compa ny-n ame, city)a.找出不為First Bank Corporation工作的所有員工的名字select employee-namefrom workswhere company-name != First Bank Corporation b .修改數(shù)據(jù)庫,使得 Jones現(xiàn)在居住在 Newtown市update employeeset city= Newtownwhere employee-name= Jonesc .找出各個(gè)公司員工的平均工資,并按照公司名稱排序(逆序)。Sel

26、ect company-name, avg (salary)From worksGroup by company-nameOrder by company-name descd刪除works關(guān)系中的所有元組。Delete from works六、10分關(guān)于關(guān)系模式R=(A, B, C, D, E)的函數(shù)依賴集F如下所示,A BCCD EB DE Aa 計(jì)算正則覆蓋Fcb 計(jì)算閉包(AB) +答:Fc= A BC, CD E, B D, E A (AB) +=ABCDE七、10分設(shè)有屬于1NF的關(guān)系模式 R=( A, B, C, D, E ),R上的函數(shù)依賴集 F= A BC,CD E, B D

27、 ,E A 。 下面是R的兩個(gè)分解(1) n= Ri=( A, B, C )和 R2(A, D, E ) (2) Z= Ri=( A, B, C )和 R2 ( C, D, E ) 試判別n Z是否為無損連接分解,為什么?答:n是無損連接分解,Z不是無損連接分解 八、10分設(shè)有屬于1NF的關(guān)系模式 R=(A, B, C, D, E ) , R上的函數(shù)依賴集 F= A BC, CD E, B D, A D 。 求滿足3NF分解的關(guān)系模式。答:R1= ABC, R2=CDE, R3=BD九、10分考慮如下所示的優(yōu)先圖,相應(yīng)的調(diào)度是沖突可串行化的嗎?如果是,請(qǐng)給出串行化調(diào)度次序。T1,T2,T6,T

28、3,T4,T5習(xí)題612分用英文解釋:13、View14、DBMS15、Query Lan guage二十二、10分填空題(在下列各小題中的括號(hào)部分省略了數(shù)據(jù)庫系統(tǒng)的術(shù)語,在答題紙上寫好小題號(hào),并在其后用英文填寫相應(yīng)的術(shù)語)1. The collection of information stored in the database at a particular moment is called an () of thedatabase.2. A () is a Ian guage that en ables users to access or man ipulate data as or

29、ga ni zed by theappropriate data model.3. A pers on who has such cen tral con trol over the system is called a ().4. Applicati on programs are said to exhibit () if they do not depe nd on the physical schema,and thus n eed not be rewritte n if the physical schema cha nges.5. A () is a collect ion of

30、 con ceptual tools for describ ing data, data relati on ships, data sema ntics,and con siste ncy con stra in ts.6. The overall desig n of the database is called the ().7. A n () is a set of the same type that share the same properties, or attributes.8. We choose a minimal superkey for each entity se

31、t from among its superkeys; the minimal superkey is termed theentity set ( s).9. Any relation that is not part of the logical model, but is made visible to a user as a virtual relation, is called a( ).10.SQL allows the use of () values to in dicate abse nee of in formati on about the value of an att

32、ribute.三、8分請(qǐng)?jiān)O(shè)計(jì)一個(gè)圖書館數(shù)據(jù)庫,此數(shù)據(jù)庫中對(duì)每個(gè)借閱者保存讀者記錄,包括:讀者號(hào)、姓名、地址、性 別、年齡、單位。對(duì)每本書存有:書號(hào)、書名、作者、出版社。同一書名的書有多本,以便被多個(gè)讀者借閱。對(duì) 每本被借出的書應(yīng)記錄借出日期和應(yīng)還日期。畫出相應(yīng)的E-R圖,并加以必要的說明。四、8分根據(jù)下面的accou nt-n umberbala neebra nch-n ameacco untacco un t-bra nchbranchE-R圖設(shè)計(jì)關(guān)系數(shù)據(jù)庫,要求指出相應(yīng)的主鍵和外鍵。assetscustomerbra nch-citydepositorcustomer-name :cus

33、tomer-city五、12分考慮下圖所示員工數(shù)據(jù)庫。為下面每個(gè)查詢語句寫出SQL表達(dá)式。employee(employee-n ame, street, city)works (employee-name, company-name, salary) compa ny (compa ny-n ame, city)a.找出所有為 First Bank Corporation工作的員工的名字b .修改數(shù)據(jù)庫,使得 Jones現(xiàn)在居住在 Newtown市c .找出各個(gè)公司員工的平均工資,并按照公司名稱排序(逆序)。d為First Bank Corporation所有員工增加 10%的薪水。六、10

34、分設(shè)有關(guān)系模式 R= (A, B, C, D, E ), R上的函數(shù)依賴集 F = A B , CD E, A C。給出R的一個(gè) 無損連接的BCNF分解。七、 10分設(shè)有關(guān)系模式 R= (A, B, C, D, E ) , R上的函數(shù)依賴集 F = A BC, CD E, B D, E A 。計(jì)算 (AB) ?八、10分設(shè)有屬于1NF的關(guān)系模式 R= (A, B, C, D, E ), R上的函數(shù)依賴集 F = A BC, C DE, A D。求滿 足3NF分解的關(guān)系模式。九、10分如下所示的調(diào)度是沖突可串行化的嗎?如果是,請(qǐng)給出串行化調(diào)度次序。T1T2read(B) write(B)read

35、(B)read(A)write(B)write(A)read(A) write(A)參考答案二十三、12分用英文解釋:16、View views are virtual relations defined by a query language17、DBMS A database management system consists of a collection of interrelated data and a collection of programs to access that data.18、Query Lan guage A query language in which a

36、 user requests information from the database.二十四、10分填空題(在下列各小題中的括號(hào)部分省略了數(shù)據(jù)庫系統(tǒng)的術(shù)語,在答題紙上寫好小題號(hào),并在 其后用英文填寫相應(yīng)的術(shù)語):1. The collecti on of in formati on stored in the database at a particular mome nt is called an ( instance ) of the database.2. A ( DML ) is a Ianguage that enables users to access or manipula

37、te data as organized by the appropriate data model.3. A person who has such central control over the system is called a ( DBA ).4. Application programs are said to exhibit (physical data independence ) if they do not depend on the physicalschema, and thus n eed not be rewritte n if the physical sche

38、ma cha nges.5. A (Data Model) is a collect ion of con ceptual tools for describ ing data, data relati on ships, data sema ntics, andcon siste ncy con stra in ts.6. The overall design of the database is called the (database schema ).7. A n (entity ) is a set of the same type that share the same prope

39、rties, or attributes.8. We choose a minimal superkey for each entity set from among its superkeys; the minimal superkey is termed theen tity set ( candidate key ).9. Any relation that is not part of the logical model, but is made visible to a user as a virtual relation, is called a(view ).10.SQL all

40、ows the use of ( null) values to indicate absence of information about the value of an attribute.三、8分請(qǐng)?jiān)O(shè)計(jì)一個(gè)圖書館數(shù)據(jù)庫,此數(shù)據(jù)庫中對(duì)每個(gè)借閱者保存讀者記錄,包括:讀者號(hào)、姓名、地址、性 別、年齡、單位。對(duì)每本書存有:書號(hào)、書名、作者、出版社。對(duì)每本被借出的書應(yīng)記錄借出日期和應(yīng)還日期。 畫出相應(yīng)的E-R圖,并加以必要的說明。讀者CHltefl:account (account_number, balance, branch_name) primary key (account_number)

41、 foreign key (branch_name)branch (branch_name, branch_city, assets) primary key (branch_name) customer (customer_name, customer_city) primary key (customer_name) depositor (account_number, customer_name)primary key (account_number, customer_name)foreign key (account_number)foreign key (customer_name

42、)五、12分考慮下圖所示員工數(shù)據(jù)庫。為下面每個(gè)查詢語句寫出SQL表達(dá)式。employee(employee-n ame, street, city) works (employee-name, company-name, salary) compa ny (compa ny-n ame, city)a.找出所有為 First Bank Corporation工作的員工的名字select employee-namefrom workswhere company-name= First Bank Corporation b .修改數(shù)據(jù)庫,使得 Jones現(xiàn)在居住在 Newtown市update e

43、mployeeset city= Newtown where employee-name= Jonesc .找出各個(gè)公司員工的平均工資,并按照公司名稱排序(逆序)。Select company-name, avg (salary)From worksGroup by company-nameOrder by company-name descd為First Bank Corporation所有員工增加 10%的薪水。Update worksSet salary=salary*1.1where company-name= First Bank Corporation 六、10分設(shè)有關(guān)系模式 R=

44、 (A, B, C, D, E ), R上的函數(shù)依賴集 F = A B , CD E, A C。給出R的一個(gè) 無損連接的BCNF分解。R1= ABR2=CDER3=ACR4=AD七、 10分設(shè)有關(guān)系模式 R= (A, B, C, D, E ) , R上的函數(shù)依賴集 F = A BC, CD E, B D, E A 。計(jì)算(AB) + ?(AB) =ABCDE八、10分設(shè)有屬于1NF的關(guān)系模式 R= (A, B, C, D, E ), R上的函數(shù)依賴集 F = A BC, C DE, A D。求滿 足3NF分解的關(guān)系模式。R1= ABCR2=CDET1九、10分如下所示的調(diào)度是沖突可串行化的嗎?

45、如果是,請(qǐng)給出串行化調(diào)度次序。T2 read(B) write(B)read(B)read(A)write(B)write(A)read(A)write(A)1.2.是T1,T2習(xí)題1卜五、12分用英文解釋:19、Query Lan guage20、First normal form (1NF)21、View二十六、10分填空題(在下列各小題中的括號(hào)部分省略了數(shù)據(jù)庫系統(tǒng)的術(shù)語,在答題紙上寫好小題號(hào),并在 其后用英文填寫相應(yīng)的術(shù)語):1. An ( ) is an object that exists in the real world and is distinguishable from o

46、ther objects.2. The overall desig n of the database is called the ().3. We say that a schedule S is ( ), if it is con flict equivale nt to a serial schedule.4. A () is an associati on among several en tities.5. Let R be a relation schema. A subset K of R is a ( ) of R if, in any legal relation r(R),

47、 for all pairs t 1 and t2 of tuples in r such that珂2, then tjK乞tK.6. Underlying the structure of a database is the ( ): a collection of conceptual tools for describing data, data relati on ships, data sema ntics, and data con stra in ts.7. A ( ) is a Ian guage that en ables users to access or man ip

48、ulate data.8. A database schema is specified by a set of definitions that are expressed using a ().9. A ( ) is a unit of program execution that accesses and possibly updates various data items.10. The ( ) allows a transaction to lock a new data item only if that transaction has not yet uniocked any

49、data item.三、12分設(shè)有屬于1NF的關(guān)系模式R= (A, B, C, D, E ) , R上的函數(shù)依賴集F =AC DE, D B, AB C 1、求屬性集的閉包(AD) +.2、R是否屬于3NF ?為什么?3、R是否屬于 BCNF ?為什么?四、12分設(shè)有屬于1NF的關(guān)系模式 R= (A, B, C, D, E ) , R上的函數(shù)依賴集 F=C AD , AB CD , BE C, E C 。1 把R分解成R1=( A, C, E )和R2(B, D, E ),試判別此分解是否為無損連接分解?2 .求F的一個(gè)Canonical Cover (正則覆蓋,規(guī)范覆蓋);3 .給出R的一個(gè)

50、分解,使其滿足下列三個(gè)條件: .分解后的每一個(gè)關(guān)系模式都屬于3NF ;; .無損連接; .保持依賴。五、8分考慮如下所示的調(diào)度S.1、判別S是否為沖突可串行化調(diào)度?2、 如果是,請(qǐng)給出與S沖突等價(jià)的串行調(diào)度.T1T2T3read(A)write(A)read(A)read(B)write(A)read(A)write(B)read(B)write(A)write(B)read(B)write(B)六、16分設(shè)有實(shí)體c (建筑公司卜e (員工卜p (建筑工程項(xiàng)目),其中:6、c有屬性c# (公司編號(hào) 卜cn和cl;7、e有屬性e# (員工編號(hào))、en、ex和dob;& p有屬性p# (建筑工程項(xiàng)

51、目編號(hào)卜pn、pb。9、 e與p之間有員工參加建筑工程項(xiàng)目的聯(lián)系,用ep表示,一名員工可以參加多項(xiàng)建筑工程項(xiàng)目,一個(gè)建筑工程項(xiàng)目可以由多名員工參加;10、 一名員工參加一個(gè)建筑工程項(xiàng)目有獎(jiǎng)金b。11、 一名員工必屬于而且只屬于一個(gè)建筑公司,一個(gè)建筑公司可以有多個(gè)員工。員工與公司間的屬于聯(lián)系用ce表示;1、試畫出E-R圖。2、試根據(jù)所畫的E-R圖,設(shè)計(jì)出關(guān)系數(shù)據(jù)庫。七、12分設(shè)有關(guān)系數(shù)據(jù)庫:d (d#, dn, dx, da, dt, s# )p (p#, pn, px, w# )dp (d#, p#, wa)s (s#, sn, sl )12、d#、dn、dx、da、dt依次分別表示醫(yī)生的編號(hào)

52、、姓名、性另h年齡、職稱;13、p#、pn和px依次分別表示住院患者的編號(hào)、姓名和性別;14、s# sn和sl依次分別表示醫(yī)院科室的編號(hào)、名稱和地址;15、w#表示病房編號(hào);16、wa表示工作量;17、關(guān)系dp表示醫(yī)生治療患者的聯(lián)系。試用關(guān)系代數(shù)表達(dá):1、求職稱為prof的醫(yī)生的姓名和年齡。2、求姓名為wang的醫(yī)生治療的患者的編號(hào)和姓名。3、求治療w2號(hào)病房的所有患者的男(用 m表示)醫(yī)生的編號(hào)。八、12分題設(shè)與第七題相同。試用 SQL表達(dá):1、求屬于S3號(hào)(即為科室編號(hào))科室的女醫(yī)生(用f表示)的編號(hào)和姓名。2、求年齡比S5號(hào)(科室編號(hào))的所有醫(yī)生的年齡都大的醫(yī)生的姓名和年齡。3、求患者的

53、編號(hào)和姓名,并按照患者編號(hào)的升序排列。九、6分題設(shè)與第七題相同。試根據(jù)下述應(yīng)用的需要,用SQL定義view,此view的名稱為aaga應(yīng)用:求每個(gè)科室的編號(hào)和此科室的醫(yī)生的平均年齡。答案二十七、12分用英文解釋:22、Query Lan guage A query language in which a user requests information from the database.23、First no rmal form (1NF) A relation schema R is in first normal form if the domain of all attributes

54、 of R are atomic.24、View are virtual relations defined by a query language二十八、10分填空題(在下列各小題中的括號(hào)部分省略了數(shù)據(jù)庫系統(tǒng)的術(shù)語,在答題紙上寫好小題號(hào),并在其后用英文填寫相應(yīng)的術(shù)語):1. An ( entity ) is an object that exists in the real world and is distinguishable from other objects.2. The overall design of the database is called the (database schema ).3. We say that a schedule S is ( conflict serializable ), if it is con flict equivale nt to a serial schedule.4. A ( relation ) is an association among several enti

溫馨提示

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

評(píng)論

0/150

提交評(píng)論