0% found this document useful (0 votes)
11 views2 pages

MySQL Final Exam Questions and Tasks

This document outlines the final exam for the Certificate in Web Design and Development focusing on MySQL, scheduled for January 2026. It includes theoretical questions about MySQL concepts, database design, and practical tasks involving database creation and manipulation. The exam assesses both knowledge of SQL commands and the ability to implement them in practical scenarios.

Uploaded by

amos
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views2 pages

MySQL Final Exam Questions and Tasks

This document outlines the final exam for the Certificate in Web Design and Development focusing on MySQL, scheduled for January 2026. It includes theoretical questions about MySQL concepts, database design, and practical tasks involving database creation and manipulation. The exam assesses both knowledge of SQL commands and the ability to implement them in practical scenarios.

Uploaded by

amos
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

UNITY COLLEGE OF PROFESSIONAL STUDIES

IT DEPARTMENT
CERTIFICATE IN WEB DESIGN AND DEVELOMENT
MYSQL FINAL EXAMS
JANUARY 2026 SERIES

ANSWERE ALL QUESITIONS

1. What is MySQL? (1 Mark)


2. What is a database? (1 Mark)
3. Define SQL. (1 Mark)
4. What is a table? (1 Mark)
5. What is a primary key? (1 Mark)
6. What is a foreign key? (1 Mark)
7. What is NULL value? (1 Mark)
8. What is a schema? (1 Mark)
9. What is an index? (1 Mark)
10. What is a view? (1 Mark)

11. What is the difference between DBMS and RDBMS? (2 Marks)


12. Define constraints in MySQL. (2 Marks)
13. What is normalization? (2 Marks)
14. What is the use of the SELECT statement? (2 Marks)
15. Explain CHAR and VARCHAR. (2 Marks)
16. What is auto_increment? (2 Marks)
17. What is DISTINCT keyword? (2 Marks)
18. What is GROUP BY clause? (2 Marks)
19. What is ORDER BY clause? (2 Marks)
20. What is LIMIT clause? (2 Marks)

21. Explain different types of keys in MySQL. (5 Marks)


22. What are DDL, DML, DCL, and TCL commands? (5 Marks)
23. Explain DELETE, DROP, and TRUNCATE with differences. (5 Marks)
24. What is a join? Explain types of joins. (5 Marks)
25. What is a subquery? Give an example. (3 Marks)
26. What is indexing? Explain its advantages. (5 Marks)
27. Explain WHERE and HAVING clause. (3 Marks)
PRACTICAL
21. Create a new database named school_db.
22. Create a table teachers with fields: id, full_name, subject, email.
23. Insert at least 3 records into the teachers table.
24. Display all teachers who teach "Mathematics".
25. Modify the teachers table to add a new column phone_number.
26. Create a second table classes with fields: class_id, class_name, and a foreign
key referencing [Link].
1. Create a new database called company_db.
2. In company_db, create a table named employees with the following fields:
o emp_id INT PRIMARY KEY AUTO_INCREMENT
o first_name VARCHAR(50)
o last_name VARCHAR(50)
o position VARCHAR(100)
o salary DECIMAL(10,2)
o hire_date DATE
3. Insert five employee records into the employees table.
4. Create a second table named departments with fields:
o dept_id INT PRIMARY KEY AUTO_INCREMENT
o dept_name VARCHAR(100)
5. Add a column dept_id to the employees table to link it to departments.
6. Add FOREIGN KEY constraint from employees.dept_id to departments.dept_id.
7. Populate the departments table with 3 departments (e.g., HR, Finance, IT).

PART B
8. Create a new word document to and save it as SQL. Screenshot all the SQL commands
from questions 8 to 16 and save them in the word document
8. Update the salary of one employee to a new amount .
9. Delete the employee with the highest salary.
10. Retrieve a list of all employees who earn more than 100,000
11. Display employees hired in the year 2023.
12. Count the number of employees in each department.
13. Display all employees along with their department names using a JOIN.
14. List employees in alphabetical order by last name.
15. Add a new column called email to the employees table.
16. Set a default value of CURRENT_DATE for the hire date column.
21. Create a table called projects with the following:
 proj_id INT PRIMARY KEY
 proj_name VARCHAR(100)
 start_date DATE
 end_date DATE
 manager_id INT (references employees.emp_id)

You might also like