数据库复习题
更新时间:2023-12-20 13:36:01 阅读量: 教育文库 文档下载
- 数据库复试笔记推荐度:
- 相关推荐
8.11 Consider the following relations:
Emp(eid: integer, ename: varchar, sal: integer, age: integer, did: integer) Dept(did: integer, budget: integer, floor: integer, mgreid: integer)
Salaries range from $10,000 to $100,000, ages vary from 20 to 80, each
department has about five employees on average, there are 10 floors, and budgets vary from $10,000 to $1 million. You can assume uniform distributions of values. For each of the following queries, which of the listed index choices would you choose to speed up the query? If your database system does not consider index-only plans (i.e., data records are always retrieved even if enough
information is available in the index entry), how would your answer change? Explain briefly.
1. Query: Print ename, age, and sal for all employees.
(a) Clustered hash index on ?ename, age, sal? fields of Emp. (b) Unclustered hash index on ?ename, age, sal? fields of Emp. (c) Clustered B+ tree index on ?ename, age, sal? fields of Emp. (d) Unclustered hash index on ?eid, did? fields of Emp. (e) No index
2. Query: Find the dids of departments that are on the 10th floor and have a budgetof less than $15,000.
(a) Clustered hash index on the floor field of Dept. (b) Unclustered hash index on the floor field of Dept.
(c) Clustered B+ tree index on ?floor,budget? fields of Dept. (d) Clustered B+ tree index on the budget field of Dept. (e) No index.
Exercise 9.12 What is sequential flooding of the buffer pool?
Exercise 9.13 Name an important capability of a DBMS buffer manager that is notsupported by a typical operating system’s buffer manager. Exercise 10.3 Answer the following questions:
1. What is the minimum space utilization for a B+ tree index? 2. What is the minimum space utilization for an ISAM index?
3. If your database system supported both a static and a dynamic tree index (say,
ISAM and B+ trees), would you ever consider using the static index in preference to the dynamic index? Exercise 10.1
Consider the B+ tree index of order d = 2 shown in the following figure. 1. Show the tree that would result from inserting a data entry with key 9 into this tree. 2. Show the B+ tree that would result from inserting a data entry with key 3 into
the original tree. How many page reads and page writes does the insertion require? 3. Show the B+ tree that would result from deleting the data entry with key 8 from
the original tree, assuming that the left sibling is checked for possible redistribu- tion. 4. Show the B+ tree that would result from deleting the data entry with key 8 from
the original tree, assuming that the right sibling is checked for possible redistribution. 5. Show the B+ tree that would result from starting with the original tree, inserting
a data entry with key 46 and then deleting the data entry with key 52. 6. Show the B+ tree that would result from deleting the data entry with key 91
from the original tree. Root
2、一个处于初始状态的linear hash文件当前只有一个bucket。当前的hash函数对是(h0, h1)。这里,hi(key) = h(key) mod (2i); h是一个hash函数。hi可看成是先对key应用h,然后再只看最后的i位来确定hash后的地址。假设每个页面可以放2个entry。当前的hash文件含有一个entry:21* (101012)。
0 21* ← next
每当产生一个溢出页(overflow page)时,分割操作(split)就应该被触发。请画出如下每个插入操作之后linear hash文件的状态。 ? 14* (11102), ? 7* (1112),
? 35* (1000112), and ? 28* (111002).
请注意:以上插入操作是累积的,因此最终的hash文件应该包含21*, 14*, 7*, 35*和28*。
正在阅读:
数据库复习题12-20
第二章化学反应与能量知识点总结03-20
北航2011年博士招生简章06-25
2014-2015学年云南省黔西南州兴仁县鲁础营民族中学七年级(下)期末11-10
高中政治必修4知识点总结05-02
学生行为规范建设活动实施方案06-18
上海市高级人民法院民一庭关于审理劳动争议案件若干问题的解答10-05
感动中国人物苏炳添先进事迹观后感参考例文07-30
我学会了下军棋作文600字07-10
长大后我明白了助人为乐作文400字07-16
- exercise2
- 铅锌矿详查地质设计 - 图文
- 厨余垃圾、餐厨垃圾堆肥系统设计方案
- 陈明珠开题报告
- 化工原理精选例题
- 政府形象宣传册营销案例
- 小学一至三年级语文阅读专项练习题
- 2014.民诉 期末考试 复习题
- 巅峰智业 - 做好顶层设计对建设城市的重要意义
- (三起)冀教版三年级英语上册Unit4 Lesson24练习题及答案
- 2017年实心轮胎现状及发展趋势分析(目录)
- 基于GIS的农用地定级技术研究定稿
- 2017-2022年中国医疗保健市场调查与市场前景预测报告(目录) - 图文
- 作业
- OFDM技术仿真(MATLAB代码) - 图文
- Android工程师笔试题及答案
- 生命密码联合密码
- 空间地上权若干法律问题探究
- 江苏学业水平测试《机械基础》模拟试题
- 选课走班实施方案
- 复习题
- 数据库
- 重庆市涪陵中心医院门急诊大楼工程
- 商业计划书书范文(完整版) - 图文
- 中药鉴别歌诀
- 丽江古城解说词(详)
- 张姓女孩起名字
- 花溪区教育管理赴上海高级研修班个人学习心得
- 真核生物三类启动子
- 电力企业管理复习题库及参考答案
- 谈在美术教学中学生创造性的培养(一)
- 电工电子学实验410
- 关于玉泉新村项目的前期市场调查报告
- 控规说明书
- 曼昆《经济学原理(微观经济学分册)》(第6版)课后习题详解(第6章 供给、需求与政府政策)
- 2019年整理--软件开发大学毕业生自我鉴定范文
- 中国企业需要怎样的法律风险管理服务
- 2019最新中考语文模拟试题及答案
- 小学未成年人思想道德建设工作总结
- 单兵队列训练教案
- 播音主持专业-即兴评述常犯的错误盘点
- 为海关特殊监管区创新发展