




版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進(jìn)行舉報或認(rèn)領(lǐng)
文檔簡介
1、裝 訂 線班級: 學(xué)號: 姓名:考試科目: 數(shù)據(jù)庫系統(tǒng) 考試時間:120分鐘 試卷總分100分考試班級:軟件05-1、2、3、4、5、6班題號IIIIIIIVV總分得分評卷教師I、Choice Questions(choose ONE corresponding description from four choices for the following terms) ( 2 marks × 10 = 20 marks)1. The relationship among Database(DB), Database System(DBS) and Database Manageme
2、nt System(DBMS) is _b_.A. DBMS includes DB and DBSBDBS includes DB and DBMS CDB includes DBS and DBMSDDB is DBS, also as DBMS2. In relation schemas, the relation ship among different normal forms is _c_.A. 1NFÌ 2NFÌ 3NFB. 3NFÌ 1NFÌ 2NFC. 3NFÌ 2NFÌ 1NFD. 2NFÌ 1NF
3、04; 3NF3. A collection of operations that performs a single logical function in a database application is called as _d_.A. Query languageB. Query ProgramC. File D. Transaction4. In database fields, we refer SQL as b_.A. Standard Query Language B. Structured Query LanguageC. System Query Language D.
4、Sequence Query Language5. Choose the only one incorrect description from the followings: _d_A. Neither tuples nor attributes have order.B. Attributes can appear in any order and the relation is still the same.C. Each value in the database must be a member of some domain.D. Duplicate tuples can exist
5、 in relation.6. Choose the only one correct expression from the followings: _c_.A. (¹ some) º in B. (= all) º not inC. exists r Û r ¹ ØD. X Y ¹ Ø Û X Í Y7. Database users are differentiated by the way they expect to interact with the system, bank tel
6、lers belong to _d_ from the following four kinds.A. application programmers B. sophisticated users C. specialized users D. naïve users 8. The following figure shows _d_ parallel database architectures.A. Shared memory B. Shared disk C. Shared nothing D. Hierarchical 9. Consider the following ki
7、nds of storage media :Tape storage, Flash memory, Optical storage, Magnetic-disk,choose the fastest one from the above four kinds of media: _b_.A. Tape storageB. Flash memoryC. Optical storage D. Magnetic-disk10. Choose the proper choice to make the following query to realize:Find the names of all c
8、ustomers whose street includes the substring “Main”.select customer_namefrom customerwhere customer_street _c_A. like Main% B. like _Main_C. like %Main%D. like Main_II、 Blank-filling Questions.(2 marks × 9 = 18 marks)1. To design a trigger mechanism, we must: Specify the condition(s) under whic
9、h the trigger is to be executed;Specify the action(s) to be taken when the trigger executes.2. Given two original values A=200, B=100; compute the values of A and B after the transactions T1 and T2 with the next schedule. A= 150 ; B= 120 .3. In database systems there are three levels of abstraction.
10、 They are physical level, logical level and view level.Given 0.2ms as time to transfer one block and 0.1ms as time for one seek. If we ignore CPU costs, the cost is 4ms for 15 block transfers and 10 seeks for simplicity.4. The basic query process has been list in the following figure, please fill th
11、e TWO blanks. optimizer evaluation engine III、 Answer FOUR briefly from the next five questions. Please mark the question numbers clearly. ( 4marks × 4 = 16 marks)1. Explain the differences among the terms superkey, candidate key and primary key?A superkey is a set of one or more attributes tha
12、t, taken collectively, to identify uniquely an entity in the entity set. Candidate keys are minimal superkeys which no proper subset is a superkey. Primary key is a candidate key that is chosen as the principal means of identifying entities within an entity set.2. List at least FOUR main functions o
13、f a DBA.l Schema definitionl Storage structure and access method definitionl Schema and physical organization modificationl Granting user authority to access the databasel Specifying integrity constraintsl Acting as liaison with usersl Monitoring performance and responding to changes in requirements
14、3. Here is an authorization graph. a) List the users who still have authorization after only edge m is moved.U4b) List the users who still have authorization after only edge l is moved.U1U5U3U2DBAlma) U2, U3 and U5;b)U1, U3, U4 and U5.4. Let R be a relation scheme with a set F of functional dependen
15、cies:R = (A, B, C, D, E, H),F = A ® B, B ® E , A ® C, CD ® E, CD ®H . Is AD a candidate key? Please compute the closure of AD under F , (AD)+ . result = ADresult = ABCD(A ® C and A ® B)result = ABCDE(CD ® E and CD Í ADBC)result = ABCDEH(CD ® H and CD
16、 Í ADBCE)Is AD a candidate key? 1. Is AD a super key?1 Does AD ® R? = Is (AD)+ Ê R2. Is any subset of AD a superkey?1 Does A ® R? = Is (A)+ Ê R2 Does D ® R? = Is (D)+ Ê R5. Given the following relation SCT and two functional dependencies:Is the relation schema in B
17、CNF? Why? If it isnt, decompose it into BCNF.IV、 Complete the following queries. (29marks)Consider the relational database of a banking enterprise with the following relation schemas, where the primary keys are underlined.branch (branch_name, branch_city, assets)customer (customer_name, customer_str
18、eet, customer_city)loan (loan_number, branch_name, amount)borrower (customer_name, loan_number)account (account_number, branch_name, balance)depositor (customer_name, account_number)1. Give an expression in the relational algebra to express each of the following queries: (3 marks × 3=9 marks)a)
19、 Find the names of all customers who have a loan, an account, or both, from the banka)Õcustomer_name (borrower) È Õcustomer_name (depositor)b) Delete all account records in the Perryridge branch.b)account ¬ account s branch_name = “Perryridge” (account )c) Insert information in t
20、he database specifying that Smith has $1200 in account A-973 at the Perryridge branch.account ¬ account È (“Perryridge”, A-973, 1200)depositor ¬ depositor È (“Smith”, A-973)2. Define the relation account in SQL. (4 marks)Tip: Describe primary keys, foreign keys and check constrai
21、ns if necessary.create table account( account_number char(10),branch_namechar(15),balancenumeric(12,2),primary key (account_number),foreign key (branch_name) references branch,check (balance >=0)3. Give an expression in SQL for each of the following queries. (4 marks × 4=16 marks)a) To find
22、all loan number for loans made at the Perryridge branch with loan amounts greater than $1200.b) Find all customers who have both a loan and an accountc) Find the names of all branches where the average account balance is more than $1,200.d) Find all loan number which appear in the loan relation with
23、 null values for amounta) select loan_numberfrom loanwhere branch_name = Perryridge and amount > 1200b)(select customer_name from depositor)intersect(select customer_name from borrower)c)select branch_name, avg (balance)from accountgroup by branch_namehaving avg (balance) > 1200d)select loan_n
24、umberfrom loanwhere amount is nullV、 Resolve the following questions of designing. (17marks)A university registrars office maintains data about the following entities:(a) students, including student-id, name, program;.(b) instructors, including id, name, department and title.(c) courses, including c-number, title, credits, syllabus and prerequisites;(d) course offerings, including course number, year, semester, section number, instructor(s), timings, and classroom;Further, the enrollment of students in courses and grades awarded to stude
溫馨提示
- 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)方式做保護處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負(fù)責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時也不承擔(dān)用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 2024-2025學(xué)年高中物理第3章萬有引力定律及其應(yīng)用第2節(jié)萬有引力定律的應(yīng)用學(xué)案含解析粵教版必修2
- 2024-2025學(xué)年高中物理課時分層作業(yè)16光的顏色色散激光含解析新人教版選修3-4
- 2025年氣炔項目投資可行性研究分析報告
- 2022-2027年中國經(jīng)濟型轎車行業(yè)市場深度分析及投資規(guī)劃建議報告
- 游戲內(nèi)置廣告行業(yè)市場發(fā)展監(jiān)測及投資潛力預(yù)測報告
- 2025年中國熔體泵行業(yè)發(fā)展前景預(yù)測及投資戰(zhàn)略咨詢報告
- 聚氨酯類項目立項報告
- 中國小型柴油機(非道路)行業(yè)發(fā)展監(jiān)測及投資戰(zhàn)略研究報告
- 2025年特種氣體減壓器行業(yè)深度研究分析報告
- 廢棄動植物油脂資源綜合利用項目可行性研究報告申請備案
- 濟南2024年山東濟南廣播電視臺招聘14人筆試歷年參考題庫附帶答案詳解
- 海洋氣候預(yù)測模型創(chuàng)新研究-深度研究
- 《客戶服務(wù)基礎(chǔ)》教案及課件項
- 2025《醫(yī)藥企業(yè)防范商業(yè)賄賂風(fēng)險合規(guī)指引》解讀課件
- 2025年湖南工業(yè)職業(yè)技術(shù)學(xué)院高職單招職業(yè)技能測試近5年常考版參考題庫含答案解析
- 2025年丹參原藥材項目可行性研究報告
- 物理(A版)-安徽省合肥一中(省十聯(lián)考)2024-2025學(xué)年度高二年級上學(xué)期期末測試試題和答案
- 人教版初中歷史與社會七年級下冊 6.3.3向西開放的重要門戶-烏魯木齊 說課稿
- 綜合材料繪畫課程設(shè)計
- 數(shù)學(xué)史簡介課件
- 八年級 下冊《黃河兩岸的歌(1)》課件
評論
0/150
提交評論