Spring 2025 - CS405 - 1
Spring 2025 - CS405 - 1
01 Total Marks: 20
Instructions
Please read the following instructions carefully before solving & submitting assignment:
It should be clear that your assignment will not get any credit (zero marks) if:
Objective
o To understand the basic concepts of ERD, Relationship types and SQL queries.
Learning Outcomes
o After completing the assignment, the Student will be able to understand and design
ERD and write SQL queries.
Note:
No assignment will be accepted after the due date via email in any case (whether it is the case of
load shedding or internet malfunctioning etc.). Hence refrain from uploading assignment in the
last hour of deadline. It is recommended to upload solution file at least two days before its closing
date.
Question # 01 (20pts)
A local library wants to digitize its system using Oracle Database. You are required to design a
Library Management System with the following functionalities:
Entity Requirements:
Now you are required to create the following tables with appropriate data types, constraints, and
primary/foreign keys (Insert at least 3rows into each table) mentioned below:
1. MEMBERS
o Member_ID (PK)
o Name
o Email (Unique)
o Join_Date
2. BOOKS
o Book_ID (PK)
o Title
o Author
o Genre
o Copies_Available
3. BORROWING
o Borrow_ID (PK)
o Member_ID (FK)
o Book_ID (FK)
o Borrow_Date
o Return_Date
Q2. Show the name and email of members who have borrowed more than 2 books.
Q3. List all genres with the count of books in each genre.
Q4. Display all books and their availability status ("Available" or "Not Available").
Q5. Find members who borrowed books from the genre ‘Science Fiction’.
Note: You are required to submit the screenshots written in oracle (Queries) along with its output
only.