1.
In MYSQL database, if a table, BOOK has degree 8 and cardinality 7, and another table, SALE
has degree 4 and cardinality 7, what will be the degree and cardinality of the Cartesian
product of BOOK and SALE ?
2. In the relational models , cardinality actually refers to ---------
3. Satheesh has created a database “school” and table “student”. Now he wants to view all the
databases present in his laptop. Help him to write SQL command for that , also to view the
structure of the table he created.
4. Meera got confused with DDL and DML commands. Help her to select only DML command
from the given list of command. UPDATE , DROP TABLE, SELECT , CREATE TABLE , INSERT
INTO, DELETE , USE
5. Which of the following SQL queries is used to retrieve rows from the "customers"
table where the "email" column contains NULL values?
a. SELECT * FROM customers WHERE email = NULL;
b. SELECT * FROM customers WHERE email IS NOT NULL;
c. SELECT * FROM customers WHERE ISNULL(email);
d. SELECT * FROM customers WHERE email IS NULL;
6. Consider the following table DOCTOR given below and write the output of the SQL Queries
that follows :
i) SELECT D_NAME FROM DOCTOR WHERE GENDER=MALE AND EXPERIENCE=12 ;
ii) SELECT DISTINCT(D_DEPT) FROM DOCTOR ;
iii) SELECT D_NAME , EXPERIENCE FROM DOCTOR ORDER BY EXPERIENCE ;
7. Consider the following Table “TEACHER”
Based on the above table, Write SQL command for the following :
i) To show all information about the teacher of maths department
ii) To list name and department whose name starts with letter ‘M’
iii) To display all details of female teacher whose salary in between 35000 and 50000.
8. Write SQL Queries for the following:
i) Display the details of those clients whose city is DELHI
ii) Increase the Price of all Bath soap by 10
iii) Display the details of Products having the highest price
iv) Display the product name, price, client name and city with their corresponding
matching product Id.
9. You have a table called "employees" with columns "department" and "salary."
You want to find the highest salary in each department and display the results in
descending order of salary. Which SQL clauses should you use for this query?
a. GROUP BY, HAVING, ORDER BY b. GROUP BY, ORDER BY
c. HAVING, ORDER BY d. HAVING, GROUP BY
10. Predict the output of the following query:
SELECT ROUND(15.789, 2);
a. 15.79 b. 15.789 c. 16 d. 15.8