Assignment 1 DB
Assignment 1 DB
Scenario:
Peshawar’s local library manages its book inventory, members, and borrowing records
manually.
They want to digitize their system to improve e iciency. As database consultant, you
are
required to propose an initial database design to handle the library’s core operations.
Determine the main entities (e.g., Books, Members, Borrow Records and others).
List attributes for each entity (e.g., Book_ID, Title, Author, Issue_Date and others).
Define primary keys, foreign keys, and ensure attributes have valid data types.
4. Demonstration
Display member details along with their borrowing history using JOINs.
5. Reflection Questions:
1. Books
o Title
o Author
o Genre
o Publication_Year
o ISBN
2. Members
o First_Name
o Last_Name
o Email
o Phone_Number
o Membership_Start_Date
o Membership_Expiry_Date
3. Borrow_Records
o Issue_Date
o Due_Date
o Return_Date (Nullable)
4. Librarians
o First_Name
o Last_Name
o Email
o Phone_Number
o Employee_ID
5. Reservations (Optional)
o Reservation_Date
One Member can borrow multiple Books, but each Borrow_Record is linked to one
Book.
3. Relational Schema
Books (Book_ID, Title, Author, Genre, Publication_Year, ISBN, Availability_Status)
Members (Member_ID, First_Name, Last_Name, Email, Phone_Number,
Membership_Start_Date, Membership_Expiry_Date)
Borrow_Records (Borrow_ID, Book_ID, Member_ID, Issue_Date, Due_Date,
Return_Date, Status)
Librarians (Librarian_ID, First_Name, Last_Name, Email, Phone_Number,
Employee_ID)
Reservations (Reservation_ID, Book_ID, Member_ID, Reservation_Date, Status)
Foreign Keys:
4. Display member details along with their borrowing history using JOINs:
5. Reflection Questions