设R和S都是三元关系(A,B,C),试把下列关系代数表达式转换成等价的SELECT
语句:
(1)π1(R)
(2)π1,3(σA>2=´17´(R))
(3)R∪S
(4)R∩S
(5)R-S
(6)π1,2((R)⋈π2,3(S)
【正确答案】:(1) SELECT A FROM R: (2) SELECT A,C FROM R WHERE B=17: (3) (SELECT*FROM R) UNION (SELECT*FROM S); (4) (SELECT*FROM R) INTERSECT (SELECT*FROM S); (5) (SELECT*FROM R) EXPECT (SELECT*FROM S); (6) SELECT R.A,R.B,S.C FROM R,S WHERE R.B=S.B;