Database Prog
Database Prog
)(LMS
2. Catalog Management:
The LMS maintains a database of all available books, materials, and
resources in the library. Each item is categorized and tagged with relevant
metadata such as title, author, ISBN, publication date, and genre.
6. Loan Management:
The LMS tracks the loan history and status of each item, including
check-out and check-in dates, overdue notifications, and fines for late
returns. It automatically updates the availability status of items based on
loan transactions.
Member
Member ID (Primary Key)
Name
Contact Information
Address
Membership Status
2. Book:
▪ Represents individual books available in the library's collection. Contains
information about each book's title, author, genre, and availability status. It allows
members to search for and borrow books.
Book
Book ID (Primary Key)
Title
Author
ISBN
Genre
Publication Date
Availability Status
3. Loan:
▪ Tracks the borrowing history of books by members. Contains information about
loans, including the member who borrowed the book, the book borrowed, loan
date, due date, and return date.
Loan
Loan ID (Primary Key)
Member ID (FK)
Book ID(FK)
Loan Date
Due Date
Return Date
4. Reservation:
▪ Manages reservations placed by members for books that are currently
unavailable. Tracks reservation details such as the member who placed the
reservation, the book reserved, reservation date, and pickup date.
Reservation
Reservation ID (Primary Key)
Member ID (FK)
Book ID(FK)
Reservation Date
Pickup Date
5. Notification:
▪ Stores notifications sent to members regarding due dates, overdue items,
reservation pickups, and other important events. Contains information about the
recipient member, message content, and timestamp of the notification.
Notification
Notification ID (Primary Key)
Member ID (FK)
Message
Timestamp
6. Administrator:
▪ Represents administrators who have access to system management functions
such as adding new books, managing member accounts, generating reports, and
configuring system settings.
Administrator
Admin ID (Primary Key)
Username
Password
7. Fine:
▪ Represents fines imposed on members for overdue items or other violations of
library policies. Contains information about the loan associated with the fine, the
amount of the fine, and the reason for the fine..
Fine
Fine ID (Primary Key)
Loan ID (FK)
Amount
Reason
8. Author:
▪ Represents authors of books available in the library's collection. Contains
information about the author's name, biography, and nationality. It is associated
with the Book entity to identify the authors of each book.
Author
Author ID (Primary Key)
Name
Biography
Nationality
9. Genre:
▪ Represents categories or genres of books available in the library's collection.
Contains information about each genre's name and description. It is associated
with the Book entity to classify books based on their genre.
Genre
Genre ID (Primary Key)
Name
Description
Library Branch
Branch ID (Primary Key)
Name
Address
Contact Information
❑ ERD
❑ Implement DataBase by SQL
SELECT Genre
FROM Book
UNION
SELECT Name
FROM Genre;
3. Group books by genre and count the number of books in each
genre: