数据库系统基础教程第五章答案 下载本文

内容发布更新时间 : 2024/11/14 14:34:07星期一 下面是文章的全部内容请认真阅读。

Answer(x,y,z) ← R(x,y,z) AND x ≥ y AND x ≥ z Answer(x,y,z) ← R(x,y,z) AND y ≥ z

Exercise 5.4.3a

Answer(a,b,c,d) ← R(a,b,c) AND S(b,c,d)

Exercise 5.4.3b

Answer(b,c,d,e) ← S(b,c,d) AND T(d,e)

Exercise 5.4.3c

Answer(a,b,c,d,e) ← R(a,b,c) AND S(b,c,d) AND T(d,e)

Exercise 5.4.4

a) Answer(rx,ry,rz,sx,sy,sz) ← R(rx,ry,rz) AND S(sx,sy,sz) AND rx = sy

b) Answer(rx,ry,rz,sx,sy,sz) ← R(rx,ry,rz) AND S(sx,sy,sz) AND rx < sy AND ry < sz

c) Answer(rx,ry,rz,sx,sy,sz) ← R(rx,ry,rz) AND S(sx,sy,sz) AND rx < sy Answer(rx,ry,rz,sx,sy,sz) ← R(rx,ry,rz) AND S(sx,sy,sz) AND ry < sz

d) Answer(rx,ry,rz,sx,sy,sz) ← R(rx,ry,rz) AND S(sx,sy,sz) AND rx = sy

e) Answer(rx,ry,rz,sx,sy,sz) ← R(rx,ry,rz) AND S(sx,sy,sz) AND rx = sy Answer(rx,ry,rz,sx,sy,sz) ← R(rx,ry,rz) AND S(sx,sy,sz) AND ry ≥ sz

f) Answer(rx,ry,rz,sx,sy,sz) ← R(rx,ry,rz) AND S(sx,sy,sz) AND rx ≥ sy AND rx ≥ sz Answer(rx,ry,rz,sx,sy,sz) ← R(rx,ry,rz) AND S(sx,sy,sz) AND ry ≥ sz

Exercise 5.4.5a

R1 := πx,y(Q R)

Exercise 5.4.5b

R1 := ρR1(x,z)(Q) R2 := ρR2(z,y)(Q)

R3 := πx,y(R1 (R1.z = R2.z) R2)

Exercise 5.4.5c

R1 := πx,y(Q R) R2 := σx < y(R1)