0% found this document useful (0 votes)
22 views3 pages

Laboratory Exam - DBMS

Uploaded by

Marvin
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)
22 views3 pages

Laboratory Exam - DBMS

Uploaded by

Marvin
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
You are on page 1/ 3

GRANBY COLLEGES OF SCIENCE & TECHNOLOGY

College of Informatics
Naic, Cavite, Philippines
Tel: (046) 412-0437

Name: Score:
Year and Section: Date: /

LABORATORY EXAM
FUNDAMENTALS OF DATABASE MANAGEMENT SYSTEMS
SET A

General Instruction: This is an open-note examination; students are able to access their notes and course materials
during the hands-on exam. During the exam, using mobile phone with data and a wifi connection will automatically result
in a zero score. MAKE SURE TO ANSWER INDIVIDUALLY AND DO NOT SKIP THE NUMBER.
Read and analyze the given problem. All successful SQL statements must be screenshotted, and make sure to
save them on your Microsoft Word.
1.
2. Display the current date and time to take this laboratory exam.
3. Insert any record in the products table, make sure that the name is blank.
4. Select the names of all the products in the store.
5. Compute the average price of all products with manufacturer code equal to 2.
6. Compute the number of products with a price larger than or equal to 180.
7. Select the name and price of all products with a price larger than or equal to 180, and sort first by price (in
descending order), and then by name (in ascending order).
8. Select the average price of each manufacturer's products, showing only the manufacturer's code.
9. Select the name and price of the cheapest product.
10. Select the name and price (i.e., the price must be multiplied by 5).
11. Compute the average price of all the products. Using two aggregate function.
12. Update the name of product 8 to "Laser Printer".
13. Apply a 10% discount to all products with a price larger than or equal to 120.
14. Select the name of all products, without duplicates.
15. Select the number of employees in each department (you only need to show the department code and the
number of employees).
16. Add a new product: Memory, 70, manufacturer 2.
17. Select the name and last name of employees working for departments with a budget greater than 60,000.
18. Select the departments with a budget larger than the average budget of all the departments.
19. Add a new department called "Quality Assurance", with a budget of 40,000 and departmental code 11.
20. Select the names and the prices of all the products in the store.
21. Select the name of the products with a price less than or equal to 200.
22. Select all the products with a price between 60 and 120.
23. Add another field name “Reseller” and give the default name of “Granby”.
24. Add an employee called "Mary Moore" in that department, with SSN 847-21-9811.
25. Reduce the budget of all departments by 10%.
26. Add Salary field in the employees table and set to 5000.
27. Display the date and end time of taking this laboratory exam.

Name: Score:
Year and Section: Date: /
GRANBY COLLEGES OF SCIENCE & TECHNOLOGY
College of Informatics
Naic, Cavite, Philippines
Tel: (046) 412-0437

LABORATORY EXAM
FUNDAMENTALS OF DATABASE MANAGEMENT SYSTEMS
SET B

General Instruction: This is an open-note examination; students are able to access their notes and course materials
during the hands-on exam. During the exam, using mobile phone with data and a wifi connection will automatically result
in a zero score. MAKE SURE TO ANSWER INDIVIDUALLY AND DO NOT SKIP THE NUMBER.
Read and analyze the given problem. All successful SQL statements must be screenshotted, and make sure to
save them on your Microsoft Word.
1. Display the current date and time to take this laboratory exam.
2. Insert any record in the manufacturers table, make sure that the name is blank.
3. Select the names of all the employees in the store.
4. Compute the average price of all products with manufacturer code equal to 6.
5. Compute the number of products with a price larger than or equal to 240.
6. Select the name and price of all products with a price larger than or equal to 180, and sort first by price (in
descending order), and then by name (in ascending order).
7. Count all the employees and display sort the name to descending.
8. Select the name and price of the cheapest product.
9. Select the name and price (i.e., the price must be multiplied by 7).
10. Compute the average price of all the products. Using two aggregate function.
11. Update the name of product 8 to "Laser Printer" and price is 180.
12. Apply a 10% discount to all products with a price larger than or equal to 120.
13. Select the name of all products, without duplicates.
14. Select the number of employees in each department (you only need to show the department code and the
number of employees).
15. Add a new product: Memory, 70, manufacturer 2.
16. Select the name and last name of employees working for departments with a budget less than 60,000.
17. Select the departments with a budget larger than the average budget of all the departments.
18. Add a new department called "Quality Assurance", with a budget of 28,000 and departmental code 77.
19. Select the names and the prices of all the products in the store.
20. Select the name of the products with a price less than or equal to 200.
21. Select all the products with a price between 60 and 120.
22. Add another field name “Reseller” and give the default name of “Granby”.
23. Combine all the records of employees table.
24. Reduce the budget of all departments by 5%.
25. Add Salary field in the employees table and set to 5000.
26. Display the date and end time of taking this laboratory exam.

Name: Score:
Year and Section: Date: /

LABORATORY EXAM
FUNDAMENTALS OF DATABASE MANAGEMENT SYSTEMS
GRANBY COLLEGES OF SCIENCE & TECHNOLOGY
College of Informatics
Naic, Cavite, Philippines
Tel: (046) 412-0437

SET C

General Instruction: This is an open-note examination; students are able to access their notes and course materials
during the hands-on exam. During the exam, using mobile phone with data and a wifi connection will automatically result
in a zero score. MAKE SURE TO ANSWER INDIVIDUALLY AND DO NOT SKIP THE NUMBER.
Read and analyze the given problem. All successful SQL statements must be screenshotted, and make sure to
save them on your Microsoft Word.
1. Display the current date and time to take this laboratory exam.
2. Insert any record in the manufacturers table, make sure that the name is blank.
3. Display the name and lastname of the maximum department in the employees table.
4. Count all the employees and display sort the name to descending.
5. Select the name and price of the highest price of the product.
6. Select the name and price (i.e., the price must be multiplied by 7).
7. Compute the average price of all the products. Using two aggregate function.
8. Update the name of product 8 to "Laser Printer" and price is 180.
9. Apply a 30% discount to all products with a price larger than or equal to 120.
10. Select the name of all products, without duplicates.
11. Compute the average price of all products with manufacturer code equal to 6.
12. Compute the number of products with a price larger than or equal to 240.
13. Select the name and price of all products with a price larger than or equal to 180, and sort first by price (in
descending order), and then by name (in ascending order).
14. Select the number of employees in each department (you only need to show the department code and the
number of employees).
15. Add another field name “Reseller” and give the default name of “Granby”.
16. Display the first five records of employees table.
17. Reduce the budget of all departments by 25%.
18. Add a new record in the department table (80, “Research”, 56530)
19. Select the name and last name of employees working for departments with a budget less than 60,000.
20. Select the departments with a budget larger than the average budget of all the departments.
21. Add a new department called "Quality Assurance", with a budget of 28,000 and departmental code 77.
22. Select the names and the prices of all the products in the store.
23. Select the name of the products with a price less than or equal to 200.
24. Select all the products with a price between 60 and 120.
25. Add Salary field in the employees table and set to 5000.
26. Display the date and end time of taking this laboratory exam.

You might also like