Database Management System: Questions (1 - 20) Are Based On The Following 3 Tables
Database Management System: Questions (1 - 20) Are Based On The Following 3 Tables
Database Management System: Questions (1 - 20) Are Based On The Following 3 Tables
1
1. Which of the following could be a primary key of the Order_Info table?
3. If someone talks about the order header information, probably he/ she is referring to the table:
Prints:
(a) 101 (b) An unpredictable value
(c) 1139 (d) None of these
5. To answer the Question “Whose bill is the highest” we need to write SQL query that joins the
table:
2
(a) 10 (b) 24
(c) 100 (d) 240
7. Fill in the blanks in the following query that finds the number of orders that ordered for either
pencil or pen.
(a) COUNT, OrderNum, OR, ‘Pencil’ (b) COUNT, OrderNum, ‘OR’, ‘Pencil’
(c) UNIQUE, OrderNum, OR, ‘Pencil' (d) None of these
8. Fill in the blanks in the following query that finds the number of customers who ordered for
either pen or pencil:
9. Which of the following CustNum will not be displayed by the following SQL query?
10. How many rows will be displayed by the following SQL query?
3
UNION ALL
SELECT A. CustNum FROM Cust_Info A, Order_Info B
WHERE A.OrderNum= B.OrderNum AND B.OrderedItem=’Pencil’;
(a) 7 (b) 8
(c) 9 (d) 10
11. Which CustNum will not be displayed by the following SQL query?
12. How many CustNum will be displayed be the following SQL query?
(a) 4 (b) 5
(c) 6 (d) 7
13. How many CustNum will be displayed by the following SQL query?
(a) 0 (b) 1
(c) 4 (d) 5
4
14. How many CustNum will be displayed in the following SQL query?
15. How many CustNum will be displayed by the following SQL query?
(a) 0 (b) 1
(c) 2 (d) 3
16. Which of the following remarks about the following query are True?
17. Which of the listed options can fill the blank if the following query displayed exactly 6 rows?
5
(a) 2 (b) 8
(c) 20 (d) 30
18. What is the CustNum that will be displayed by the following query?
(a) 4 (b) 5
(c) 6 (d) 7
(a) 1 (b) 2
(c) 3 (d) 4