Sie sind auf Seite 1von 2

UNIVERSITY OF THE EAST MANILA

COLLEGE OF ENGINEERING
COMPUTER ENGINEERING DEPARTMENT
MIDTERM QUIZ NO. 1
DIRECTIONS: Perform the given relational operation to the given tables. All answers should be
handwritten.
GIVEN:
Table A
Product_ID

Selling_Price

23411

$ 100.00

23412

$ 145.00

23413

$ 200.00

12314

$ 1500.00

12345

$ 1700.00

Table B
Product_ID

Selling_Price

23416

$ 120.00

23417

$ 1450.00

23418

$ 210.00

12314

$ 1500.00

12345

$ 1700.00

OPERATIONS:
1. Select all products from both tables with unit price that is greater than $500.00
Table A
Product_ID

Selling_Price

12314

$ 1500.00

12345

$ 1700.00
Table B
Product_ID

Selling_Price

23417

$ 1450.00

12314

$ 1500.00

12345

$ 1700.00

2. What is the result when you perform the INTERSECT OPERATION


Product_ID

Selling_Price

12314

$ 1500.00

12345

$ 1700.00

3. What is the result when A is subtracted from B


Product_ID

Selling_Price

23411

$ 100.00

23412

$ 145.00

23413

$ 200.00

4. What is the result when B is subtracted from A


Product_ID

Selling_Price

23416

$ 120.00

23417

$ 1450.00

23418

$ 210.00

5. What is the result if UNION is performed


Product_ID

Selling_Price

23411

$ 100.00

23412

$ 145.00

23413

$ 200.00

12314

$ 1500.00

12345

$ 1700.00

23416

$ 120.00

23417

$ 1450.00

23418

$ 210.00

Das könnte Ihnen auch gefallen