Design SQL queries that return each of the following expressions, assuming that R and S are tables representing the relations R and S, respectively: (i) R [ S, (ii) R \ S (iii) R ???? S, (iv) R / S.

For (i) to (iii), you may also assume that R and S are union compatible. For (iv), you may
assume that S has attributes b1, ..., bm, and R has in addition attributes a1, ...,
an.


i. SELECT * FROM R UNION SELECT * FROM S
ii. SELECT * FROM R INTERSECT SELECT * FROM S
iii. SELECT * FROM R EXCEPT SELECT * FROM S
iv. SELECT a1,...,an
FROM R R1
WHERE NOT EXISTS(
SELECT * FROM S
EXCEPT
SELECT R2.b1,...,R2.bm
FROM R R2
WHERE R1.a1=R2.a1 AND ... AND R1.an=R2.an)

Computer Science & Information Technology

You might also like to view...

A WPF style is a set of that can be reused for any number of controls.

a) property-value definitions b) event-handler definitions c) background images d) a and b.

Computer Science & Information Technology

A private attribute on a class diagram:

A) does not change its value for different object instances. B) is hidden from all classes except immediate subclasses. C) is only available in the object. D) is available to the class and all classes that have relationships with the attribute's class.

Computer Science & Information Technology

EULA represents which of the following?

A) Agreement between the user and the store where the software was purchased B) System requirements needed for downloading the software C) Agreement between the user and the software publisher D) Hardware specifications for the computer

Computer Science & Information Technology

If team members lack experience with certain aspects of the required technology, temporary help might be obtained from IT consultants or part-time staff.?

Answer the following statement true (T) or false (F)

Computer Science & Information Technology