(a) SELECT A=c (R(A, B, C)):
(b) PROJECT <A, B> (R(A, B, C)):
(c) R(A, B, C) NATURAL JOIN S(C, D, E):
(d) R(A, B, C) UNION S(A, B, C):
(e) R(A, B, C) INTERSECT S(A, B, C):
(f) R(A, B, C) MINUS S(A, B, C):
(g) R(A, B, C) CARTESIAN PRODUCT S(D, E, F):
(h) R(A, B) DIVIDE S(A):
Answer:
For each operation, we give the tuple calculus expression followed by the domain calculus
expression.
(a) { t | R(t) AND t.A=c}, { xyz | R(xyz) AND x=c }
(b) { t.A, t.B | R(t) }, { xy | R(xyz) }
(f) { t | R(t) AND NOT(S(t)) },
{ xyz | R(xyz) AND NOT(S(xyz)) }
(g) { t.A, t.B, t.C, q.D, q.E, q.F | R(t) AND S(q) },
( xyzuvw | R(xyz) AND S(uvw) }
8.31 – No solution provided.
8.32 – A nested query is query within a query. More specifically, a nested query is a
parenthesized query that can be used as a value in a number of places, such as instead of a
relation or a selection condition. Specify the following queries on the database specified in
Figure 3.5 using the concept of nested queries and the relational operators discussed in this
chapter. Also show the result of each query as it would apply to the database state of Figure