0% found this document useful (0 votes)
25 views4 pages

Group Assignment Example

Uploaded by

vaductai2905
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
Download as docx, pdf, or txt
0% found this document useful (0 votes)
25 views4 pages

Group Assignment Example

Uploaded by

vaductai2905
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1/ 4

SAMPLE INSTRUCTION FOR GROUP ASSIGNMENTS

1. Library Management System


List of Tasks:
1. Design an ER Diagram for the system.
2. Create the required tables: Books, Members, Borrowing, Fines.
3. Write SQL queries to insert sample data for books and members.
4. Implement the borrowing process with SQL transactions.
5. Write a stored procedure to calculate late fees.
6. Create queries to display:
o Books currently borrowed.
o Overdue books.
o Frequently borrowed books.
7. Create triggers to automatically update the stock of books when a book is
borrowed or returned.
Instructions:
 Design tables with appropriate fields (e.g., Books table includes BookID, Title,
Author, Stock).
 Use foreign keys to link the Borrowing table with Books and Members.
 Implement transactions to ensure that borrowing and returning are processed
together (if either fails, the whole transaction should roll back).
 Use triggers to decrement the stock when a book is borrowed and increment
it when returned.
Questions:
 How would you ensure that no book is borrowed when no stock is left?
 What strategies can you implement to handle long transactions in case
multiple books are borrowed simultaneously?
 How can you optimize queries for listing popular books, and why would
indexing be useful in this case?

2. E-Commerce Platform
List of Tasks:
1. Design the ER Diagram for the e-commerce platform.
2. Create tables for Products, Customers, Orders, and OrderDetails.
3. Write SQL queries for products and customers to manage CRUD operations
(Insert, Update, Delete).
4. Implement SQL queries for:
o Listing products based on categories and prices.
o Customer order history.
o Products that are low in stock.
5. Write a stored procedure to apply discounts to bulk orders (e.g., 10% off for
orders over $500).
6. Implement a trigger to update stock levels after placing an order.
7. Design a query to recommend products based on the most frequent product
combinations purchased by other users.
Instructions:
 Use joins to create relationships between the Orders, OrderDetails, and
Products tables.
 Implement a stored procedure that applies a discount based on total order
value.
 Write efficient queries to display product recommendations based on previous
customer purchases.
Questions:
 How can you ensure the system is capable of handling a large number of
concurrent orders?
 What challenges could arise with the product recommendation system, and
how would you address them using SQL?
 How would you handle an inventory system to prevent overselling a product
during high-traffic times?

3. Hospital Management System


List of Tasks:
1. Design an ER Diagram for the hospital system.
2. Create tables for Patients, Doctors, Appointments, Treatments, Bills.
3. Insert sample data for doctors and patients.
4. Implement SQL queries to:
o Schedule appointments.
o Retrieve patient treatment history.
o Calculate billing for a patient based on treatments received.
5. Write a trigger to check if an appointment conflicts with a doctor's schedule.
6. Write a stored procedure to calculate the total bill for a patient after
treatment automatically.
7. Generate reports for:
o Doctors' availability.
o Monthly revenue from patient treatments.
Instructions:
 Create relationships between tables, such as Appointments linking Doctors
and Patients.
 Use triggers to ensure no double-booking of doctors.
 Write queries to ensure patients' treatments are accurately reflected in their
bills.
Questions:
 How would you handle the situation where a doctor cancels an appointment,
and you need to notify the patients?
 What challenges could arise when generating real-time availability reports for
doctors?
 How would you implement role-based access control so that only authorized
personnel can view sensitive data like patient records?

4. University Management System


List of Tasks:
1. Design the ER Diagram for the university system.
2. Create tables for Students, Courses, Faculty, Enrollment, and Grades.
3. Write SQL queries to manage student enrollment and course registration.
4. Implement a stored procedure to calculate GPA based on the grades in the
Grades table.
5. Write a trigger to ensure students cannot enroll in courses without
completing the prerequisites.
6. Design reports for:
o Students with the highest GPA.
o Faculty performance (courses taught, average grade of students).
7. Generate a report showing the number of students enrolled in each course.
Instructions:
 Use constraints and foreign keys to enforce the relationships between
students, courses, and faculty.
 Write a stored procedure to calculate GPA automatically and store it in a GPA
field in the Students table.
 Write queries to ensure the correct number of seats in a course are
maintained during registration.
Questions:
 How would you implement prerequisite checking to ensure students are not
allowed to register for courses without meeting the necessary conditions?
 What would be the best way to handle data consistency during mass
updates, like semester-end grade entry?
 How would you optimize the queries for generating large student or course
reports?

5. Hotel Reservation System


List of Tasks:
1. Design the ER Diagram for the hotel reservation system.
2. Create tables for Rooms, Customers, Reservations, Payments, Services.
3. Write SQL queries to:
o Reserve a room for a customer.
o Track the services a customer uses (e.g., room service, laundry).
o Generate the total bill for a stay, including services and room rates.
4. Write a trigger to automatically update room availability once a reservation is
made or canceled.
5. Create a stored procedure that automatically applies a seasonal discount to
reservations.
6. Generate reports for:
o Room occupancy by date.
o Services most frequently used by customers.
7. Write a query to suggest available rooms based on the customer’s
preferences (e.g., price range, amenities).
Instructions:
 Use joins to connect reservations, customers, and rooms, ensuring that
availability is checked dynamically.
 Implement triggers to adjust the room availability whenever a reservation is
made or canceled.
 Write reports to track the financial performance of the hotel, broken down by
room and service usage.
Questions:
 How would you handle cases where a customer cancels their reservation at
the last minute?
 What strategies would you use to optimize room availability search,
especially during peak times?
 How would you handle overbooking situations, ensuring the database
maintains integrity?

You might also like