


下载本文档
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
1、精选优质文档-倾情为你奉上1. Consider the following three database schemas: Employee (person_name, street, city) Work (person_name, company_name, salary) Company (company_name, city)1) please write the queries in relational algebra(关系代数) according to the description:a. find out the name of all employees in city
2、cq;b. Find out the name and salary of all employees in corporation A;c. Find out the name and city of all employees in corporation B;2) Optimize the relational algebra expression C in 1), draw the optimized relational algebra expression tree.2. Consider the following three database schemas: Customer
3、s (cust_id, cust_name, cust_address,cust_phone ) Products (prod_id, prod_name, prod_type, prod_price, prod_number) Orders (order_id, cust_id, prod_id, number)1) Please write the following queries in SQL:a. Find out the name of products whose price is higher than ¥100.b. Find out the order numbe
4、r of customer Tom.2) Create a view to complete the following function: statistics the quantity of each type (prod type) inventory(库存) Products.3) Create a product table which defines the primary key, and make sure that Prod_type must be one of “television”, ”refrigerator” and ”washing machine”.3. De
5、sign an E/R diagram for Bar. Both red wine and beer are supplied in Bar. Customers drink in the Bar. And the translate the E/R mode into relational model. Bar has name and address ,customers has name and birthday and all wines have manufacturer and brand.4. The functional dependency set F from relat
6、ion R(A,B,C,D,E,F) is shown as follows: F = A->E, B->D, CE->F, F->BCCalculate the closure(闭包) for attribute set AF.5. A B+ tree structure is shown in Fogure 1. G J E J K G E A B Figure 11) Write the modes from querying path between the root and the key value ”K”;2) Draw B+ tree after ins
7、ert key value “H” based on Figure 1;3) Draw B+ tree after insert key value “D” based on Figure 1.6. Describe explicitly the ACID properties of Transactions.7. You can select one of the following questions to answer.1) Set fire transactions, T1, T2, T3, T4, T5 whose timestamps are 1, 2, 3, 4, 5 respe
8、ctively .Fill in the blank of table 1 according to Timestamp-Based Protocols. “abort” is filled when operation is rejected. (Initial R-timestamp and W-timestamp is set too) Table 1A partial scheduleR-timestamp,W-timestamp Or abort T1 T2 T3 T4 T5 Read(y)R-timestamp(y)=1 Write(y)W-timestamp(y)=2 Read(
9、y)(_) Write(z)W-timestamp(z)=4 Read(x)R-timestamp(x)=1 Read(z)(_) Write(z)(_)Read(z)(_) Write(x)(_)2) Please answer the following query two question:(1) Consider the following query on the relation R(A, B, C, D)SELECT FROM RGROUP BY A, B Assume A, B, C, D take integer values Which can appear in the position marked as in following . MIN(C +
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 【南京】2025年江苏南京体育学院长期公开招聘专业技术人员20人笔试历年典型考题及考点剖析附带答案详解
- 2025年广西来宾市合山市事业单位公开招聘工作人员笔试历年典型考题及考点剖析附带答案详解
- 安全专员考试题及答案
- 高铁站彩钢房拆除作业安全责任书
- 仓储运输安全责任保险合同范本
- 江西省上饶市六校2024-2025学年高一下学期第一次联合考试(5月)语文试卷(PDF版含答案)
- 2025年财务软件项目立项申请报告
- 草场承包与草原生态补偿基金管理合同范本
- 车辆租赁合同终止与保险理赔协议
- 生物医药企业厂长聘任与科研成果转化合同
- 【课件】跨学科实践:探索厨房中的物态变化问题(教学课件)初中物理人教版(2024)八年级上册
- PHPstorm激活码2025年5月13日亲测有效
- 区块链与供应链管理的完美结合实现高效项目融资
- 胆石症中西医结合诊疗专家共识(2025年)解读课件
- 环水保考试试题及答案
- 管理学原理第十章控制
- 《中国传统节庆文化》课件
- 2025佛山市顺德区辅警考试试卷真题
- 学历提升合同协议书范本
- 2025年郑州铁路职业技术学院单招职业倾向性测试题库必考题
- 对标一流-2025年国央企风控合规案例白皮书-启信慧眼
评论
0/150
提交评论