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

CS DBMS1

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)
11 views8 pages

CS DBMS1

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/ 8

GRANBY COLLEGES OF SCIENCE & TECHNOLOGY

College of Information and Communication Technology


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

Page | 1 INDIVIDUAL CASE STUDY


DATABASE MANAGEMENT SYSTEMS 1

GENERAL INSTRUCTION:
The case study consists of 39 questions and is divided into three parts. All parts of the questions covered
midterm and final term topics. The databases and tables need to be recognized by making sure to follow the exact
names of the databases, tables, and records. Make sure to read and analyze the given questions. Deadline: May 27,
2024, by 12NN. No more EXTENSION.

Submit the printed copy of your case study (ANSWER) on bond paper in A4 size and include the following:

1. The name of the databases.


2. The descriptions in the tables.
3. The records.
4. The question(s) are followed by the answer (a SQL query) and output.

I affirm that:
(1) My answers on this case study are my own original work, without assistance from other students.
(2) I have not given, nor will I give, assistance to other students for this case study.
(3) I will not look at nor copy from other students’ case study.

_____________________________________
(Sign here to agree to the above statement. Unsigned case study will not be graded.)
*** Good luck! ***

“There are no secrets to success. It is the result of preparation, hard work, and learning from failure” – Gen. Colin
Powell
GRANBY COLLEGES OF SCIENCE & TECHNOLOGY
College of Information and Communication Technology
Naic, Cavite, Philippines
Tel: (046) 412-0437

Page | 2

Database Name: CS_Surname_1


Machine Problem 1:

Table 1: Warehouses

Table 2: Boxes

1. Display all warehouses.


2. Select all boxes with a value larger than $150.
3. Select all distinct contents in all the boxes.
4. Select the average value of all the boxes.
GRANBY COLLEGES OF SCIENCE & TECHNOLOGY
College of Information and Communication Technology
Naic, Cavite, Philippines
Tel: (046) 412-0437

Page 5.
| 3 Select the warehouse code and the average value of the boxes in each warehouse.
6. Select the code of each box, along with the name of the city the box is located in.
7. Select the codes of all the boxes located in Chicago.
8. Create a new warehouse in New York with a capacity for 3 boxes.
9. Create a new box, with code "H5RT", containing "Papers" with a value of $200, and located in warehouse 2.
10. Reduce the value of all boxes by 15%.

Machine Problem 2:

Table 3: Pieces

Table 4: Providers

Table 5: Provides
GRANBY COLLEGES OF SCIENCE & TECHNOLOGY
College of Information and Communication Technology
Naic, Cavite, Philippines
Tel: (046) 412-0437

Page | 4

1. Select all the providers' data.


2. Select the average price of each piece (show only the piece code and the average price).
3. Select the names of all providers who supply piece 1.
4. Select the name of pieces provided by provider with code "HAL".
5. For each piece, find the most expensive offering of that piece and include the piece name, provider name, and
price (note that there could be two providers who supply the same piece at the most expensive price). Example
Output below.

6. Add an entry to the database to indicate that "Skellington Supplies" (code "TNBC") will provide sprockets (code
"1") for 7 cents each.
7. Increase all prices by 10.

Machine Problem 3:
Create new database – CS_Surname

Table: Student
GRANBY COLLEGES OF SCIENCE & TECHNOLOGY
College of Information and Communication Technology
Naic, Cavite, Philippines
Tel: (046) 412-0437

Page | 5

Table: Faculty

Table: Class

Table: Enrolled
GRANBY COLLEGES OF SCIENCE & TECHNOLOGY
College of Information and Communication Technology
Naic, Cavite, Philippines
Tel: (046) 412-0437

Page | 6
GRANBY COLLEGES OF SCIENCE & TECHNOLOGY
College of Information and Communication Technology
Naic, Cavite, Philippines
Tel: (046) 412-0437

Page | 7

1. Display all the information in the tables STUDENTS and Enrolled.


2. Display the first name and last name of Computer Science students.
3. Display the first name and last name of Computer Engineering students
4. Display all the information of the faculty with department ID 68.
GRANBY COLLEGES OF SCIENCE & TECHNOLOGY
College of Information and Communication Technology
Naic, Cavite, Philippines
Tel: (046) 412-0437

Page 5.
| 8 Display the first name and last name of all SENIOR Computer Science students.
6. Display all the information of all JUNIOR Computer Science students.
7. Display the total count of all FRESHMEN students.
8. Display all the subject handled by a faculty named Rommel Dorin.
9. Display all the subject handled by a faculty named Alex Ramos.
10. Display all the information using inner join (It’s up to you what table you want to use and display)
11. Display all the rooms occupied every 12:30-1:45 time slots.
12. Display all the subjects which has a single day schedule.
13. Display the count of students enrolled in Database Management Systems 1.
14. Display all the students enrolled in Computer Programming 1.
15. Display all the information using left join (It’s up to you what table you want to use and display)
16. Display all subjects which have single enrolled students.
17. Display all students who are Junior standing.
18. Display all students who are Freshmen Standing and taking up Electrical Engineering.
19. Display all the subjects assigned to room AVW.
20. Display all the subjects with schedules from 7:00-1:00pm time slots.
21. Display all the subjects with schedules from 1:00-9:00pm time slots
22. Display the records of snum, sname, age, standing of the student table and cname. Display the age is 17 and
standing is freshmen.

You might also like