当前位置:高等教育资讯网  >  中国高校课件下载中心  >  大学文库  >  浏览文档

上海交通大学:《数据库系统原理 The principle of Database System》教学资源_第二章习题与答案(第三版)

资源类别:文库,文档格式:DOC,文档页数:2,文件大小:32.5KB,团购合买
点击下载完整版文档(DOC)

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? t Mode (o(speed >=3.00)(PC)) Result: 1005 1006 1013 f)Find those hard-disk sizes that occur in two or more PC's. R1=Ppel (PC) R2=Ppe2(PC) R3=R1 0-JOIN (pe1.hd=pe2.hd and pel.model pe2.model)R2 R4=元pc1hd(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=Tmodel.speed(PC)modelspeed (Laptop) R2=TMakermodel ((speed>=28(R1)natural JOIN Product)) R3=p T(maker2,model2)(R2) R4=R2 theta JOIN maker=maker2 AND modelmodel2(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

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 Gsereen$1000(Laptop)= Or: Gscreen=100OR price<1000 (Laptop) Violation Model speed ram hd screen price 20042.005126013.31150

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 = $1000 (Laptop) =  Or: screen = 100 OR price < &1000 (Laptop) Violation: Model speed ram hd screen price 2004 2.00 512 60 13.3 1150

点击下载完整版文档(DOC)VIP每日下载上限内不扣除下载券和下载次数;
按次数下载不扣除下载券;
24小时内重复下载只扣除一次;
顺序:VIP每日次数-->可用次数-->下载券;
已到末页,全文结束
相关文档

关于我们|帮助中心|下载说明|相关软件|意见反馈|联系我们

Copyright © 2008-现在 cucdc.com 高等教育资讯网 版权所有