Page 218 - Informatics_Practices_Fliipbook_Class12
P. 218
Table: PAYLEVEL
P_Level Pay Allowance
P001 45000 14000
P002 39000 10000
P003 35000 8000
4. What will be the degree and cardinality of the table produced on the execution of the following query?
SELECT * FROM WORKER NATURAL JOIN PAYLEVEL;
a. Degree: 8 Cardinality: 5
b. Degree: 8 Cardinality: 15
c. Degree: 9 Cardinality: 5
d. Degree: 9 Cardinality:15
5. Which attribute will enforce referential integrity between the two tables- WORKER and PAYLEVEL?
a. WCode b. Name c. P_Level d. Pay
6. Which of the following queries is an example of an equi-join?
a. SELECT Name, Pay FROM WORKER, PAYLEVEL;
b. SELECT Name, Pay FROM WORKER, PAYLEVEL WHERE Pay=40000;
c. SELECT Name, Pay FROM WORKER, PAYLEVEL WHERE WORKER.P_Level = PAYLEVEL.P_Level;
d. SELECT Name, Pay FROM WORKER, PAYLEVEL WHERE P_Level=P_Level;
7. What will be the output produced on execution of the following query?
SELECT COUNT(*) FROM WORKER W, PAYLEVEL P WHERE W.P_Level=P.P_Level;
a. 5 b. 15 c. 6 d. 9
8. What will be the output produced on execution of the following query?
SELECT MAX(Allowance) FROM WORKER W , PAYLEVEL P
WHERE W.P_Level=P.P_Level;
a. 10000 b. 8000 c. 14000 d. 24000
9. What will be the degree and cardinality of the table produced on the execution of the following query?
SELECT * FROM WORKER,PAYLEVEL;
a. Degree: 15 Cardinality: 9
b. Degree: 8 Cardinality: 9
c. Degree: 9 Cardinality: 8
d. Degree: 9 Cardinality:15
10. Tables T1 and T2 have 6 and 3 tuples, respectively. What will be the cardinality of the natural join of T1 and T2?
a. 18
b. 3
c. 6
d. Information is not sufficient to determine the cardinality of the join of T1 and T2.
B. State whether the following statements are True or False:
1. It is not compulsory to have a common attribute to perform an equi-join operation. ____________
2. DBMS uses alternate keys to enforce the integrity of the database. ____________
3. To distinguish between the attributes of different tables having the same name, the table's name
is followed by a period and the attribute name. ____________
4. In the case of Natural join, the attributes that join the two tables should have the same domain. ____________
5. While inserting data into related tables, the foreign key constraints can be violated. ____________
204 Touchpad Informatics Practices-XII

