- 1、本文档共3页,可阅读全部内容。
- 2、有哪些信誉好的足球投注网站(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
- 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
第二章习题与答案(第三版)
Exercise 2.3.1
着个练习,今年新加的,我这边还没有做,你能帮忙做一下吗?
Exercise 2.4.1 a), f), h)
Product (maker, model, type)
PC(model, speed, ram, hd, price)
Laptop(model,speed,ram,hd,screen,price)
Printer(model,color,type,price)
Write expressions of relational algebra to answer the following queries. For the data of Figs2.20 and 2.21, show the result of your query.
a) what PC models have a speed of at least 3.00?
( Model ( ((speed =3.00) (PC))
Result:
1005
1006
1013
f) Find those hard-disk sizes that occur in two or more PC’s.
R1 = (pc1 (PC)
R2 = (pc2 (PC)
R3 = R1 (-JOIN (pc1.hd = pc2.hd and pc1.model pc2.model) R2
R4 = ( pc1.hd (R3)
Result:
250
80
160
h) Find those manufacturers of at least two different computers (PC’s or laptops) with speeds of at least 2.8
R1 = (model,speed (PC) ( ( model,speed (Laptop)
R2 = (Maker,model ( ((Speed = 2.8 (R1) natural JOIN Product))
R3 = ( T(maker2,model2)(R2)
R4 = R2 theta JOIN maker=maker2 AND model model2 (R3)
Answer(maker) = (Maker (R4)
Result:
B,E
Exercise 2.5.1 b)
Product (maker, model, type)
PC(model, speed,ram,hd,rd,price)
Laptop(model,speed,ram,hd,screen,price)
Printer(model,color,type,price)
Write your constraints either as containments or by equating an expression to the empty set. For the data of exercise 2.4.1, indicate any violations to your constraints.
b) A laptop with a screen size less than 15.4 inches must have at least a 100 gigabyte hard disk or sell for less than $1000
(screen 15.4 AND hd 100 AND price = $1000 (Laptop) = (
Or:
(screen 15.4(Laptop) ( (hd = 100 OR price 1000 (Laptop)
Violation:
Model speed ram hd screen price
2004 2.00 512 60 13.3 1150
No manufacturer of PC’s may also make laptops 需要验证
Pi make (PC natural join Product) intersection Pi maker (Laptop natural join Product) = (
A manufacturer of a PC must also make a laptop with at least as great a processor speed. (没有要求做。)
This complex expression is best seen as a sequence of steps in which we define temporary relations R1 through R4 th
您可能关注的文档
最近下载
- 青岛版四年级上册数学整册单元试卷含答案.docx
- TB_10751-2018_高速铁路路基工程施工质量验收标准.docx
- 2024年山东省学前教育职业技能大赛参考试题库(含答案).pdf VIP
- 第三讲:二方连续纹样.03.ppt VIP
- IPC-6012F 2023 EN,刚性印制板性能要求Qualification and Performance Specification for Rigid Printed Boards.pdf
- 西门子S120变频器调试-说明书.pdf VIP
- 西南大学PPT模板.pptx
- 高二通用技术《容易制作的便携式小板凳》素材.pdf
- (高清版)BT 28450-2020 信息技术 安全技术 信息安全管理体系审核指南.pdf VIP
- 3D打印技术课件.ppt VIP
文档评论(0)