


版權說明:本文檔由用戶提供并上傳,收益歸屬內容提供方,若內容存在侵權,請進行舉報或認領
文檔簡介
1、 C. BCNFc 3NFC1NF D. 1NF(=BCNF c3NFChoose tlie proper choice to make the following query to realize:Find the names of all customers whose street includes the substring “Main”, select ctistomernarnefrom customerwhere customer_stiet A likeB like MainJC. like MainD. like %MainSVSuppose tlie relation R(
2、A,B,C) has the following four tuples:ABC312412314414Which of the following functional dependencies does not hold iii R?A A-BB BC-AC. C-BD AB-AThe main purpose of transaction 直 nan a gement is to deal witli problem(s).A. Concurrency B. FailureC. Memory crash D both A and BIf and has appeared in the l
3、og after the nearest checkpoint to system crash, then transaction Timust be when system recoveiy.A. undone B. redone C. deleted D. Neither A or BIf a transaction Tx has obtain an shared lock on data item A, then transition Tj cannot A obtam an exclusive lock on data item A B. obtaui a shared lock on
4、 data item B C. obtain an exclusive lock on data item B D obtain an shared lock on data item Ain 2PL protocol, at stage, A transaction may not obtain locks, but can release locks.A. Growing phase B Shrinking phase C. Committed D. AbortedQuestion 3 (13 points) Consider the following database requirem
5、ent A laboratory has properties like ID, name, location, rank A researcher has properties like ID, name, ageB skill A research project has properties like ID,得分name, budget, and year The above three entities must satisfy some constraints Each researcher can be unemployed or employed by one laboratoi
6、y One laboratory can employ many researchers And a researcher can only work at a laboratoiy at a time. If a researcher is employed, his salaiy needs to be recorded in the database A laboratory can participate many projects and a project can be shared by many laboratories得分1) Draw ER diagram to illus
7、trate the requirements. And you can make and state necessary assumptions if any 6 pointsTranslate your ER diagram into relational database schemas, underline primaiy keys of each relation, and label foreign keys if it has. Be sure using different way to mark prunaiy keys and foreign keys 4 pointsv/r
8、ite an sql sentence to create table to store infonnation about which project has been sharedby which labs.【3 pointsQuestion 4. (16 points) Consider the relational database of a banking eiiterpnse with thefollowing relation schemas, where the pnmaiy keys are underlined得分branch (branch_namel branch ci
9、ty, assets)customei* (customer name, customerstreet,customer_city)loan (loan number, branchjiame, amount)boirower (customer name、loan number)account (account number, branch一name, balance) depositor (custonierjiaine、account number)Give an expression in SQL or in relational algebra expression for each
10、 of the following quenes.To find all loan number for loans made at the Penyridge branch (that is the name of a ceitain branch) with loan amounts greater than $1000 in SQL and relational algebra 4 pointsFind all customers v/ho have both a loan and an account using relational algebra expression 3 poin
11、tsFind name of all customers who have at least one loan that the values for amount is null In SQL 3 pointsFind the names of all branches v/here the average account balance is more than $1000 in SQL 3 pointsFind all customers that live in the same city with branches they open accounts in SQL. 3 point
12、s得分Question 5 (11 points) Considei a relation R(A, B, C, D, E) with the set of Functional DependenciesF = A BD.BC D.D A 1Give all candidate keys of R 4 points12)3)Give a canonical cover ofF. 3 points2)3)Is R in 3NF? explain why if it is or decompose it nito 3NF if not 4 points題號二三四五總分得分評閱人訂 題號二三四五總分
13、得分評閱人訂 Question 1: true-false question (30 points) For each of tlie following statements, indicate wlietlier it is TRUE or FALSE (UsuigT for TRUE得分and F for FALSE). You will get 1 point for each correct answer, and 0 point for each wrong or題號123456789101112131415得分TFTTFTTFTFTFFFT題號161718192021222324
14、252627282930得分FTTTFFFTFTFTFTTblank answer. BE SURE TO WRITE YOUR ANSWER IN THE ANSWER SHEET!Question 2 single-choice question (30 points,and 2 for each) BE SURE TO WRITE YOUR ANSWER IN THE ANSWER SHEET!得分題號123456789101112131415得分BCAABDDACDBDBAB華南農業大學期末考試試卷(A卷-Answer Sheets)2015-2016學年第1學期考試科目:Databa
15、se system考試類型:(閉卷)考試時間: 120 分鐘學號 姓名 年級專業 Question 3 (13 points) (ANSWER IN NOT UNIQUE )Draw ER diagram to illustiate the reqiiiiements. And you can make and state necessary assumptions if any. |6 points (next page)Translate your ER diagram into relational database schemas, underline primary keys of
16、each relation, and label foreign keys if it has. Be sure using diffeieut way to mark piimaiy keys and foreign keys. 4 pointsL ab oratory (ID,N am e,Locati on,rank)Research er (ID,Name,birthday, skill,liiretime, salary,lab icf) project (ro, name, budget, year)paiticlpate(proj id. lab id, prqj lab bud
17、get,piqj Jab_year) Here pnmaiy key is underlined, and foreign key is underlined by wavy linewrite an sql sentence to create table to store infonnation about which project has been shared by wliich labs. 3 pointsCreate table paiticipatefproi idiiit,lab id int,proj lab budget real(10,2), prqj_lab_yeai
18、 intprimary key (proj id. lab id), foreign key prqjd reference project(id), foreign key lab id reference laboiatoiy(id)1. ER (Uagram as follows:Question 4. (16 points) Consider the relational database of a banking enterprise with the following relation schemas, where the primary keys are underlined,
19、 branch (blanch name, branch city, assets)customei (customer name,customer street, custonier city) loan (loau number, branch_name,amount)bonower (customer name,1 oaii number) account (accountiiuiibei、branch nanie, balance)depositor (customer name, account nuniber)Give ail expression in SQL oi in rel
20、ational algebra expiessiou for each of the following queries. (ANSWER IN NOT UNIQUE )To find all loan number for loans made at the Penyiidge branch (that is the name of a ceitain branch) with loan amounts gieater than $1000 in SQL and relational algebra. 4 pointsSelect loanjmmber from loan where bra
21、nch_name= Penyridge branch and amount1000II loan_nuinber bxaxKh_ranw=1 Perijiidge branch*andaiuouiit1000 ( loail)g$g$Find all ciistomeis who have both a loan and an account using relational algebra expression. 3 pointsfl customename (borrower XI depositor)Find name of all customers who have at least one loan that the values for amount is null. In SQL 3 pointsSelect distinct customei name fiom loan where amount is nullFind the names of all branches where the average account balance is more than $1000 ill SQL. 3 pointsSe
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯系上傳者。文件的所有權益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網頁內容里面會有圖紙預覽,若沒有圖紙預覽就沒有圖紙。
- 4. 未經權益所有人同意不得將文件中的內容挪作商業或盈利用途。
- 5. 人人文庫網僅提供信息存儲空間,僅對用戶上傳內容的表現方式做保護處理,對用戶上傳分享的文檔內容本身不做任何修改或編輯,并不能對任何下載內容負責。
- 6. 下載文件中如有侵權或不適當內容,請與我們聯系,我們立即糾正。
- 7. 本站不保證下載資源的準確性、安全性和完整性, 同時也不承擔用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 2025年醫用耗材(試劑)采購合同匯編
- 2025深圳租賃合同范文
- 共同買地皮合同標準文本
- 廈門民宿建筑施工方案
- 促進班主任與學生關系的策略計劃
- 急診工作安排方案計劃
- 冷卻塔管道施工合同樣本
- 中介口罩合同標準文本
- 信息通道租賃合同樣本
- ledoem代加工合同樣本
- 口服抗栓藥物相關消化道損傷防治專家共識(2021)解讀
- 2025年華能青海分公司招聘筆試參考題庫含答案解析
- 《健康進課堂》2024年幼兒園家長助教醫療版
- 新能源微電網(光儲柴混)海外市場及經典案例分享-中騰微網
- JCI醫院評審標準(第六版)
- 品管圈PDCA獲獎案例-提高保護性約束使用的規范率醫院品質管理成果匯報
- FOCUS-PDCA品管工具改善案例-手術室與外科病區提高手術患兒交接過程正確率成果匯報
- 勞動力材料投入計劃及保證措施機械設備投入計劃
- 《吸光度與透過率》課件
- 《中國膿毒血癥指南》課件
- 工程信息轉讓合同范例
評論
0/150
提交評論