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

下載本文檔

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

文檔簡介

1、習題12分用英文解釋1、DBMS 2、Data Dictionary 3、Transaction 二、10 分、單項選擇題1. There may be instances where an attribute has a set of values for a specificen tity. This type of attribute is said to be【】A. single valued attribute B . multivalued attributeC. simple attribute D. composite attribute2. In a particular

2、bank, a loan can belong to only one customer, and a customercan have several loa ns, 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 dictionary D . trigge

3、r4 . The phrase“greater than at least one ” is represented in SQL by 【】A. all B . all C . some5 . In general, all aggregate functions except 【】ignore null values in their input collectio n.A. sum B . avg C . min D . count6. If a schedule S can be transformed into a schedule Sby a series of swaps ofn

4、on-con flict ing in struct ions, we say that S and S ar e UA. non-con flict ing equivale nt B. con flict equivale ntC. non-conflicting serializable D. conflict serializable7. The fun dame ntal operati ons in the relati onal algebra are【】。A. U, - ,X,n 和 c B . U, -,冗和 cC.U,n,X,n 和 c D . U,n,n 和 c8. In

5、 SQL, =someis identical toin, and【】is identical to not in 。A. some?B =all C . all?D . =some9. The result of true and null is 【】。A. null B . true C . false D . not null10 . The fun cti onsum applied on the collecti on 1,1,3,4,4,11 retur ns the value【】.A . 24?B. 6 C . 4?D. 11三、10分設有Course(課程)、Teacher(

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

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

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

9、閉包X+.2、求F的一個正則覆蓋.3、求滿足3NF分解的關系模式九、12分設有如下調(diào)度S。T1T3T2read(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沖突等價的串行調(diào)度。習題答案八、12分用英文解釋(每題3分)3、DBMS A database man ageme ntsystem con sists of a collecti on of in terrelated data and a

10、collecti on of programs to access those data.4、Data dicti on ary: A data dictio nary is a file that contains metadata, thatis data about data.5、Tran sacti on: The tran sact ion is a unit of program executi on that accessesand possibly updates various data items.九、10 分單項選擇題(每題 1 分)1. 【B12.【A 3.【C】4 .

11、【DI5.【D】6.【B7.【A】8.【C1 9.【A】10.【A1十、10分(2) 描述出Teacher和Student之間為1對多關系-1 分(3) 描述出Teacher和Course之間為多對多關系-1分(4) 矩形、菱形等符號表示正確-3分卜一、12分Teacher (tno, tname, major) 主鍵:tno 2 分tnoStudent (sno, sname, age, bno, tno,score)主鍵: sno 外鍵:-4 分 其中主鍵和外鍵各占 1 分Teach(tno, cno) 主鍵: tno, cno 外鍵: tno 和 cno-4分 其中主鍵和外鍵各占1.5分

12、十二、 8 分n tname(? tno= t01 (Teacher)- 4 分n snam4? age21 or ?bno=b01 (Student) -4 分十三、12 分1 create table Course (cno char(4),cname char(10),mark integer,primary key (cno) -1 分create table Teacher (tno char(10), tname char(4),major char(8) primary key (tno) - 1 分create table Student ( sno char(10), sna

13、me char(10), age integer, tno char(10), bno char(10), score integer,Teacher (tno),primary key (sno), foreign key (tno) referencescheck (age0)-1 分create table Teach( tno char(10), cno char(4), primary key (tno,cno),foreign key (tno) references Teacher (tno),foreign key (eno) references Course (cno)-

14、1 分2insert into Student(sno,sname,age) values (a01, zhang, 22)-2分3Select tname, tnofrom Teacherwhere major= 計算機order by tno desc -1.5分 order by 語句正確占 0.5 分4Delete from StudentWhere sno likea01%-1.5分 like 語句表達正確占 0.5 分5select distinct snamefrom Studentwhere score(select max(score)from studentwhere bn

15、o=b01)-1.5 分6. Select avg(score)From stude ntwhere tno=(Select tnoFrom TeacherWhere tname=張山)-1.5 分十四、12分BC, AD, BE都是候選碼,-4分1. 所有屬性都是某個候選碼的屬性,顯然是3NF -4分2. E C非平凡依賴,而E不是R的一個超碼,R不屬于BCNF -4分十五、12分1. X+=ABDC- 1.5 分2. 正則覆蓋:D?A E?C B?CD-4.5 分 每個依賴1.5分3. D,AE,CB,C,D B,E-6 分 每個模式 1.5 分十六、12分1. S為沖突可串行化調(diào)度。-4

16、分2. 沖突等價的串行調(diào)度為 -8 分 十七、 12 分 用英文解釋:6、Transaction7、DBMS8、Data model十八、 20 分 選擇題:1. 一個關系中的主鍵() 。A. 不可能多于一個 B. 不可以作為其他關系的外部鍵C. 可以取空值 D. 不可以是屬性組合2. 在數(shù)據(jù)庫中,產(chǎn)生數(shù)據(jù)不一致的根本原因是() 。A. 數(shù)據(jù)存儲量太大B. 數(shù)據(jù)冗余C. 未對數(shù)據(jù)進行完整性控制D. 沒有嚴格保護數(shù)據(jù)3. 事務在執(zhí)行時,所遵循的“要么所有操作全部發(fā)生,要么由于出錯而全不發(fā)生”這是 事務的()性質(zhì) .A. 隔離性 B. 持久性4. ()是數(shù)據(jù)抽象的最低層次,描述數(shù)據(jù)實際上是怎樣存儲

17、的。A.物理層B.邏輯層C.視圖層D.子模式層5. 對數(shù)據(jù)庫系統(tǒng)進行集中控制的人稱為()。A.操作系統(tǒng)管理員B. 數(shù)據(jù)庫管理員C.數(shù)據(jù)庫操作員D. 程序員6. A中的一個實體至多同E中的一個實體相聯(lián)系,而E中的一個實體可以同A中任意數(shù)目的實體相聯(lián)系,則A和E之間的映射基數(shù)為()。A.一對多 B.一對一C.多對一 D.多對多7. ()提供定義關系模式、刪除關系以及修改關系模式的命令。A.數(shù)據(jù)定義語言B. 視圖定義語言C.數(shù)據(jù)操縱語言D. 動態(tài)SQL語言8. 事務不具有的性質(zhì)有()。A.原子性 B. 可恢復性C.隔離性 D. 持久性A. avg ( ) B. max ()C. min ( ) D.

18、 cou nt ()10.假設關系 person 包含元組John. Smith, Jeffrey, Mary, Valeria,關系 customer包含元組John, Jeffrey, Tom。貝U person和customer的集合差運算結(jié)果應該包含()個元組。A. 3 B. 2 C. 1 D. 5三、8分請設計一個體育比賽技術統(tǒng)計數(shù)據(jù)庫。數(shù)據(jù)庫對每個運動員保存?zhèn)€人記錄,包 括:姓名、性別、年齡、身份證號。對每項比賽存有:比賽編號、比賽時間、地點、比分、 參加比賽的球隊名稱。還應記錄上場隊員在每場比賽的統(tǒng)計數(shù)據(jù),包括:進球數(shù)、助攻次 數(shù)。畫出相應的E-R圖,并加以必要的說明。四、8分根

19、據(jù)下面的E-R圖設計關系數(shù)據(jù)庫,要求指出相應的主鍵和外鍵。五、12分考慮下圖所示員工數(shù)據(jù)庫。為下面每個查詢語句寫出SQL表達式。employee( employee-n ame, street, city )works (employee-name, company-name, salary )compacompany-name, city )a .找出不為First Bank Corporation工作的所有員工的名字b . 修改數(shù)據(jù)庫,使得Jones現(xiàn)在居住在Newtown市d. 刪除works關系中的所有元組。六、10分關于關系模式R=(A, B, C, D, E)的函數(shù)依賴集F如下所示

20、,A?BCCD?EB?DE?Aa .計算正則覆蓋Fcb .計算閉包(AB) +七、10分設有屬于1NF的關系模式R=( A, B, C, D, E), R上的函數(shù)依賴集F= A?BCCD?E B?D E?A 。下面是R的兩個分解(1) n= Ri=( A, B, C )和 F2(A, D, E ) (2) Z= Ri=( A, B, C )和 F2( C, D, E )試判別n, Z是否為無損連接分解,為什么?八、10分設有屬于1NF的關系模式R=(A, B, C, D, E ), R上的函數(shù)依賴集F= A?BC,CD?E, B?D, A?D 。求滿足3NF分解的關系模式。九、10 分 考慮如

21、下所示的優(yōu)先圖,相應的調(diào)度是沖突可串行化的嗎?如果是,請給出 串行化調(diào)度次序。參考答案十九、 12 分 用英文解釋:9、Transaction : A transaction is a unit of program execution that accesses and possibly updates various data items.10、DBM:S A database managementsystem consists of a collection of interrelated data and a collection of programs to access that

22、data.11、Data model : A collection of conceptual tools for describing data, datarelationships, data semantics, and data constraints.二十、 20 分 選擇題:三、8 分 請設計一個體育比賽技術統(tǒng)計數(shù)據(jù)庫。數(shù)據(jù)庫對每個運動員保存?zhèn)€人記錄,包 括:姓名、性別、年齡、身份證號。對每項比賽存有:比賽編號、比賽時間、地點、比分、 參加比賽的球隊名稱。還應記錄上場隊員在每場比賽的統(tǒng)計數(shù)據(jù),包括:進球數(shù)、助攻次 數(shù)。畫出相應的 E-R 圖,并加以必要的說明。四、8 分 根據(jù)下面的

23、 E-R 圖設計關系數(shù)據(jù)庫,要求指出相應的主鍵和外鍵。account (account_number, balance, branch_name) primary key (account_number)foreign key (branch_name) branch (bra nch_n ame, bran ch_city, assets) primary key (bra nch_n ame) customer (customer, name, customer_city) primary key (customer, name) depositor (acco unt_nu mber,

24、customer, name)primary key (acco unt_nu mber, customer, name)foreig n key (acco unt_nu mber)foreig n key (customer, name)五、12分考慮下圖所示員工數(shù)據(jù)庫。為下面每個查詢語句寫出SQL表達式employee( employee-n ame, street, city)works (employee-name, company-name, salary ) compacompany-name, city )a .找出不為First Bank Corporation工作的所有員工

25、的名字select employee-n amefrom workswhere compa ny-n ame != First Bank Corporati on b . 修改數(shù)據(jù)庫,使得Jones現(xiàn)在居住在Newtown市update employeeset city= Newtow nwhere employee-name= Jones C 找出各個公司員工的平均工資,并按照公司名稱排序(逆序)。Select company-name, avg (salary)From worksGroup by company-nameOrder by company-name descd 刪除 wor

26、ks 關系中的所有元組。Delete from works六、10分關于關系模式R=(A, B, C, D, E) 的函數(shù)依賴集F如下所示,A?BCCD?EB?DE?Aa .計算正則覆蓋Fcb .計算閉包(AB) +答: FC= A?BC, CD?E, B?D, E?A(AB) +=ABCDE七、10分設有屬于1NF的關系模式R=(A, B, C, D, E), R上的函數(shù)依賴集F= A?BCCD?E B?D E?A 。下面是R的兩個分解(1) n=Ri=( A, B, C )和F2(A, D, E )(2) Z=R=( A, B, C )和F2( C, D, E)試判別n,Z是否為無損連接分

27、解,為什么?答:n是無損連接分解,Z不是無損連接分解八、10分設有屬于1NF的關系模式R=(A, B, C, D, E ), R上的函數(shù)依賴集F= A?BC,CD?E, B?D, A?D 。求滿足3NF分解的關系模式。答:R仁ABC, R2=CDE, R3=BD九、10分考慮如下所示的優(yōu)先圖,相應的調(diào)度是沖突可串行化的嗎?如果是,請給出串行化調(diào)度次序。T1,T2,T6,T3,T4,T5習題6二十一、12分用英文解釋:12、View13、DBMS14、Query Lan guage二十二、 10 分 填空題(在下列各小題中的括號部分省略了數(shù)據(jù)庫系統(tǒng)的術語,在答題紙上寫好小題號,并在其后用英文填寫

28、相應的術語) :1. The collection of information stored in the database at a particular moment is called an ( ) of the database.2. A () is a language that enables users to access ormanipulate data as organized by the appropriate data model.3. A person who has such central control over the system is called a

29、 ( ).4. Application programs are said to exhibit ( ) if they donot depend on the physical schema, and thus need not be rewritten if the physical schema changes.5. A ( ) is a collection of conceptual tools for describing data, data relationships, data semantics, and consistency constraints.6. The ove

30、rall design of the database is called the ( ).7. An ( ) is a set of the sametype that share the sameproperties, or attributes.8. We choose a minimal superkey for each entity set from among its superkeys; the minimal superkey is termed the entity set s ( ).9. Any relation that is not part of the logi

31、cal model, but is made visible to a).user as a virtual relation, is called a10.SQL allows the use of () values to in dicate abse nee of in formatio nabout the value of an attribute.三、8分請設計一個圖書館數(shù)據(jù)庫,此數(shù)據(jù)庫中對每個借閱者保存讀者記錄,包括:讀 者號、姓名、地址、性別、年齡、單位。對每本書存有:書號、書名、作者、出版社。同 一書名的書有多本,以便被多個讀者借閱。對每本被借出的書應記錄借出日期和應還日期。

32、 畫出相應的E-R圖,并加以必要的說明。四、8分根據(jù)下面的E-R圖設計關系數(shù)據(jù)庫,要求指出相應的主鍵和外鍵。五、12分考慮下圖所示員工數(shù)據(jù)庫。為下面每個查詢語句寫出SQL表達式。employee( employee-n ame, street, city)works (employee-name, company-name, salary )compacompany-name, city )a .找出所有為First Bank Corporation工作的員工的名字b . 修改數(shù)據(jù)庫,使得Jones現(xiàn)在居住在Newtown市c找出各個公司員工的平均工資,并按照公司名稱排序(逆序) 。d. 為F

33、irst Bank Corporation所有員工增加10%勺薪水。六、10分設有關系模式R=(A, B, C, D, E),R上的函數(shù)依賴集F = A?B, CD?E A?C。 給出R的一個無損連接的BCNF分解。七、10分設有關系模式R= (A, B, C, D, E),R上的函數(shù)依賴集F = A?BC, CD?E B?D E?A 。計算(AB) + ?八、10分設有屬于1NF的關系模式R=(A, B, C, D, E), R上的函數(shù)依賴集F = A?BC,C?DE, A?D。求滿足3NF分解的關系模式。九、10分如下所示的調(diào)度是沖突可串行化的嗎?如果是,請給出串行化調(diào)度次序T1T2rea

34、d(B)write(B)read(B)read(A)write(B)write(A)read(A)write(A)參考答案二十三、12分用英文解釋:15、View views are virtual relati ons defi ned by a query Ian guage16、DBMSA database managementsystem consists of a collection of interrelated data and a collection of programs to access that data.17、Query Language A query lang

35、uage in which a user requests information from the database.二十四、 10 分 填空題(在下列各小題中的括號部分省略了數(shù)據(jù)庫系統(tǒng)的術語,在答題 紙上寫好小題號,并在其后用英文填寫相應的術語) :1. The collection of information stored in the database at a particular moment is called an (instance ) of the database.2. A ( DML) is a language that enables users to acces

36、s or manipulate 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 physical schema, and thus need not be rewritten if the p

37、hysical schema changes.5. A ( Data Model ) is a collection of conceptual tools for describing data, data relationships, data semantics, and consistency constraints.6. The overall design of the database is called the ( database schema).7. An ( entity ) is a set of the same type that share the same pr

38、operties, or attributes.8. We choose a minimal superkey for each entity set from among its superkeys; theminimal superkey is t ermed the entity sets ( candidate key ).9. Any relation that is not part of the logical model, but is made visible to auser as a virtual relation, is called a(view ).10.SQL

39、allows the use of ( null ) values to indicate absence of information about the value of an attribute.三、8 分 請設計一個圖書館數(shù)據(jù)庫,此數(shù)據(jù)庫中對每個借閱者保存讀者記錄,包括:讀 者號、姓名、地址、性別、年齡、單位。對每本書存有:書號、書名、作者、出版社。對 每本被借出的書應記錄借出日期和應還日期。畫出相應的 E-R 圖,并加以必要的說明。四、8 分 根據(jù)下面的 E-R 圖設計關系數(shù)據(jù)庫,要求指出相應的主鍵和外鍵。account (account_number, balance, branc

40、h_name) primary key (account_number)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_

41、number)foreign key (customer_name)五、12分考慮下圖所示員工數(shù)據(jù)庫。為下面每個查詢語句寫出SQL表達式 employee( employee-n ame, street, city )works (employee-name, company-name, salary ) compan( company-name, city )a .找出所有為First Bank Corporation 工作的員工的名字 select employee-n amefrom workswhere compa ny-n ame= First Bank Corporati on b

42、 . 修改數(shù)據(jù)庫,使得Jones現(xiàn)在居住在Newtown市update employeeset city= Newtow nwhere employee-name= Jones c 找出各個公司員工的平均工資,并按照公司名稱排序(逆序)Select compa ny-n ame, avg (salary)From worksGroup by compa ny-n ameOrder by compa ny-n ame descd. 為First Bank Corporation所有員工增加10%勺薪水。Update worksSet salary=salary*1.1where company-

43、name= First Bank Corporation 六、10分設有關系模式R=(A, B, C, D, E), R上的函數(shù)依賴集F = A?B, CD?E A?C。給出R的一個無損連接的BCNF分解。R1=ABR2=CDER3=ACR4=AD七、10分設有關系模式R= (A, B, C, D, E), R上的函數(shù)依賴集F = A?BC, CD?EB?D E?A 。計算(AB) + ?(AB) +=ABCDE八、10分設有屬于1NF的關系模式R=(A, B, C, D, E),R上的函數(shù)依賴集F = A?BC,C?DE, A?D。求滿足3NF分解的關系模式。R1=ABCR2=CDE九、10

44、 分 如下所示的調(diào)度是沖突可串行化的嗎?如果是 請給出串行化調(diào)度次序1.是2. T1,T2二十五、12分用英文解釋:18、 Query Lan guage19、First normal form (1NF)T1T2read(B)write(B)read(B)read(A)write(B)write(A)read(A)write(A)習題120、 View二十六、 10 分 填空題(在下列各小題中的括號部分省略了數(shù)據(jù)庫系統(tǒng)的術語,在答題 紙上寫好小題號,并在其后用英文填寫相應的術語) :1. An ( ) is an object that exists in the real world an

45、d is distinguishable from other objects.2. The overall design of the database is called the ( ).3. We say that a schedule S is ( ), if it is conflict equivalent to a serial schedule.4. A ( ) is an association among several entities.5. Let R be a relation schema. A subset K of R is a ( ) of R if, in

46、any legalrelati on r(R), for all pairs 11 a nd 12 of tuples in r such that 11 工 12, the n t iK工 t 2K.6. Underlying the structure of a database is the ( ): a collection of conceptualtools for describing data, data relationships, data semantics, and data constraints.7. A ( ) is a language that enables

47、 users to access or manipulate data.8. A database schemais 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.lO.The ( ) allows a transaction to lock a new data item only if that transaction h

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

49、);3 給出R的一個分解,使其滿足下列三個條件:五、8分考慮如下所示的調(diào)度S.1、判別S是否為沖突可串行化調(diào)度?2、如果是,請給出與S沖突等價的串行調(diào)度TiT2T3read(A)write(A)read(A)read(B)write(A)read(A)write(B)read(B)write(A)write(B)read(B)write(B)六、16分設有實體c (建筑公司)、e (員工)、p (建筑工程項目),其中:6、c有屬性c# (公司編號)、cn和cl ;7、e有屬性e# (員工編號)、en、ex和dob;8 p有屬性p# (建筑工程項目編號)、pn、pb。9、e與p之間有員工參加建筑

50、工程項目的聯(lián)系,用 ep表示,一名員工可以參加多項建筑工程項目,一個建筑工程項目可以由多名員工參加;10、 一名員工參加一個建筑工程項目有獎金bo11、一名員工必屬于而且只屬于一個建筑公司,一個建筑公司可以有多個員工。員工與公司間的屬于聯(lián)系用ce表示;1、試畫出E-R圖。2、試根據(jù)所畫的E-R圖,設計出關系數(shù)據(jù)庫。七、12分設有關系數(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ī)生的編號、姓名、性別、年齡、職稱;13、p#、pn和p

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

52、排列。九、6分題設與第七題相同。試根據(jù)下述應用的需要,用SQL定義view,此view的名稱為 aage。應用:求每個科室的編號和此科室的醫(yī)生的平均年齡答案二十七、 12 分 用英文解釋:21、Query Language A query language in which a user requests information from the database.22、First normal form (1NF)A relation schema R is in first normal form if thedomain of all attributes of R are atomic

53、.23、View are virtual relations defined by a query language二十八、 10 分 填空題(在下列各小題中的括號部分省略了數(shù)據(jù)庫系統(tǒng)的術語,在答題紙上寫好小題號,并在其后用英文填寫相應的術語)1. An ( entity ) is an object that exists in the real world and is distinguishable from other objects.database schema).2. The overall design of the database is called the (3. We

54、say that a schedule S is (conflict serializable), if it is conflictequivalent to a serial schedule.4. A ( relation ) is an association among several entities.super key ) of R if, inany legal relation r(R), for all pairs tand t 2 of tuples in r such that t5. Let R be a relation schema. A subset K of R is a (12, then t iK豐 t 2K.6. Underlying the structu

溫馨提示

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

評論

0/150

提交評論