0% found this document useful (0 votes)
6 views1 page

CSE2306 Final Assignment

Uploaded by

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

CSE2306 Final Assignment

Uploaded by

mislam.zidan05
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

Final Assignment

Fall 2022
CSE2306: Database Management System Sessional
1. Write a query to obtain the total number of employees who are in department 30?
2. Analyze the results of a query to calculate the average salary of employees in department 30?
3. What is the syntax to create a table with specific columns and their data types in MySQL?
4. What steps are required to manipulate data in a relational database using MySQL?
5. Describe the process to create a view using the SELECT statement in MySQL?
6. Write a query to delete the column ‘DOJ’ from a table ‘employee’ using MySQL?
7. How would you create a stored procedure in MySQL to obtain the average salary of employees?
8. Design a query to determine the total salary paid to employees from the June 2020 pay run?
9. Explain the use of the WHERE clause in MySQL to specify conditions in a query?
10. Explain the difference between a Primary Key and a Foreign Key in MySQL?
11. Develop a query to retrieve all the salary information of the employees who were hired in the year
2021?
12. When do you use the ‘ON DELETE CASCADE’ in MySQL?
13. How can you optimize a query in MySQL to reduce the processing time?
14. What is the purpose of creating Indexes in MySQL and how do they help improve the query
performance?
15. What is the syntax to modify the data type of a column in MySQL?
16. Describe how you can use the ‘INSERT’ statement in MySQL to add new records to a table?
17. Discuss the use of the DATE function in MySQL to perform date calculations?
18. Write a query to list the employee records sorted by department and salary in descending order?
19. Explain the role of aggregate functions such as MIN(), MAX(), AVG() in MySQL queries?
20. Design a query to retrieve employee records where the date of joining (DOJ) is a month prior to the
current date?
21. Analyze the output of a query in MySQL to calculate the total amount of salary given to all the
employees?
22. What must be done if two tables have columns with the same name but different datatypes?
23. Describe how you can alter the table structure in MySQL to add a new column?
24. What is the syntax to drop a table in MySQL?
25. Describe the role of the ‘LIKE’ operator in MySQL queries?
26. Write a query to retrieve records with a salary range of 25000 to 40000?
27. What is the difference between the ‘NOT NULL’ and ‘NULL’ constraints in MySQL?
28. Design a query to find the second-highest salary paid to an employee?
29. How does the ‘UNION’ in MySQL work to combine multiple queries in one?
30. Develop a query to retrieve employees whose designation is either manager or assistant manager?
31. Describe the syntax used to create a database in MySQL?
32. How do you execute a stored procedure in MySQL?
33. What measures can be taken to prevent SQL injection in MySQL?
34. What is the purpose of using the ‘HAVING’ clause in MySQL?
35. Describe the importance of Data Definition Language (DDL) statements in MySQL?
36. Write a query in MySQL to identify duplicate records in a table?
37. Design a query to delete all the records from a table having the name ‘Employee’?
38. Analyze the output of a query to calculate the total number of employees who were hired between two
specific dates?
39. How would you ensure data integrity in a MySQL database?
40. Describe the process of creating relationships between tables in MySQL?

You might also like