In this practical project, you will learn how to create a Library Management System using Microsoft Access. The database will manage books, members, book issues, returns, and fines. You will use tables, relationships, forms, queries, reports, and macros to build a simple library application.
The Library Management System will help you:
LibraryManagement.accdb
LibraryManagement.accdb.Use clear and consistent names for tables, forms, queries, and reports.
Create a table named Books to store
information about library books.
| Field Name | Data Type | Purpose |
|---|---|---|
| BookID | AutoNumber | Primary key |
| BookTitle | Short Text | Book title |
| Author | Short Text | Author's name |
| Category | Short Text | Book category |
| ISBN | Short Text | ISBN identifier |
| Publisher | Short Text | Publisher's name |
| PublishedYear | Number | Year of publication |
| TotalCopies | Number | Total copies owned |
Books.
Create a table named Members to store
library member details.
| Field Name | Data Type | Purpose |
|---|---|---|
| MemberID | AutoNumber | Primary key |
| MemberName | Short Text | Member's full name |
| Mobile | Short Text | Contact number |
| Short Text | Email address | |
| Address | Long Text | Residential address |
| JoinDate | Date/Time | Membership date |
Set MemberID as the primary key and save the table
as Members.
Create a table named IssueRecords to track
each book issue and return transaction.
| Field Name | Data Type | Purpose |
|---|---|---|
| IssueID | AutoNumber | Primary key |
| BookID | Number (Long Integer) | Foreign key to Books |
| MemberID | Number (Long Integer) | Foreign key to Members |
| IssueDate | Date/Time | Date the book was issued |
| DueDate | Date/Time | Expected return date |
| ReturnDate | Date/Time | Actual return date; may be blank |
Set IssueID as the primary key. BookID and MemberID will connect each transaction to its book and member.
Create a table named Fines to record
overdue fines associated with issue transactions.
| Field Name | Data Type | Purpose |
|---|---|---|
| FineID | AutoNumber | Primary key |
| IssueID | Number (Long Integer) | Related issue transaction |
| FineAmount | Currency | Calculated or assessed fine |
| FinePaid | Yes/No | Whether the fine has been paid |
| FineDate | Date/Time | Date the fine was recorded |
Save the table as Fines. You can record
fines only when applicable, rather than creating a
fine record for every issue.
Use the Relationships window to connect the tables.
Books.BookID
|
| One-to-Many
v
IssueRecords.BookID
Members.MemberID
|
| One-to-Many
v
IssueRecords.MemberID
IssueRecords.IssueID
|
| One-to-Many
v
Fines.IssueID
A book can appear in many issue transactions over time. A member can also have many issue transactions.
The Book Entry form allows library staff to add and edit book information.
frmBooks.frmBooks — book details.frmMembers — member registration.frmIssueRecords — issue and return details.frmFines — fine management.Create a form based on the IssueRecords table. Use combo boxes so staff can select a book and a member by name rather than entering numeric IDs manually.
frmIssueRecords in Design View.Create a query to display the books that have not yet been recorded as returned.
SELECT
IssueRecords.IssueID,
Books.BookTitle,
Members.MemberName,
IssueRecords.IssueDate,
IssueRecords.DueDate
FROM
(Books
INNER JOIN IssueRecords
ON Books.BookID = IssueRecords.BookID)
INNER JOIN Members
ON IssueRecords.MemberID = Members.MemberID
WHERE
IssueRecords.ReturnDate Is Null
ORDER BY
IssueRecords.DueDate;
qryIssuedBooks.The query lists issue transactions with a blank ReturnDate. It does not by itself determine whether a book is overdue.
An overdue book is one that has not been returned and whose due date is earlier than the current date.
SELECT
IssueRecords.IssueID,
Books.BookTitle,
Members.MemberName,
IssueRecords.DueDate,
DateDiff("d", IssueRecords.DueDate, Date()) AS DaysOverdue
FROM
(Books
INNER JOIN IssueRecords
ON Books.BookID = IssueRecords.BookID)
INNER JOIN Members
ON IssueRecords.MemberID = Members.MemberID
WHERE
IssueRecords.ReturnDate Is Null
AND IssueRecords.DueDate < Date()
ORDER BY
IssueRecords.DueDate;
Save the query as qryOverdueBooks.
It displays overdue transactions and the number
of days past the due date.
For this example, assume the library charges ₹5 per overdue day. You can change the rate to match your library policy.
Fine Rate = ₹5 per day
Days Overdue = 4
Fine = Days Overdue × Fine Rate
Fine = 4 × ₹5
Fine = ₹20
Add this calculated expression to an appropriate query based on the IssueRecords table:
FineAmount: IIf(
[ReturnDate] Is Null,
IIf([DueDate]<Date(),
DateDiff("d",[DueDate],Date())*5,
0
),
IIf([ReturnDate]>[DueDate],
DateDiff("d",[DueDate],[ReturnDate])*5,
0
)
)
This expression estimates the fine for an unreturned book using today's date, or for a returned book using its recorded return date. It assumes a ₹5 daily rate and no grace period.
The number of available copies can be calculated by subtracting the currently issued copies from the total number of copies.
AvailableCopies =
TotalCopies - CurrentlyIssuedCopies
For a simple example, suppose the library owns 10 copies of a book and 3 copies are currently issued.
Total Copies: 10
Issued Copies: 3
Available Copies: 7
To calculate this accurately, count IssueRecords rows for each BookID where ReturnDate Is Null. Ensure your issuing process prevents more copies from being issued than the library owns.
Reports present library information in a structured format for viewing and printing.
rptBookList — all library books.rptMemberList — registered members.rptIssuedBooks — books not yet returned.rptOverdueBooks — overdue issue transactions.rptFineSummary — assessed fines and payment status.A main menu provides a central point for opening forms and reports.
LIBRARY MANAGEMENT SYSTEM
--------------------------------
[ Manage Books ]
[ Manage Members ]
[ Issue / Return ]
[ Issued Books ]
[ Overdue Books ]
[ Fine Management ]
[ Library Reports ]
[ Exit ]
frmMainMenu.frmMainMenu as the startup form if desired.| Problem | Possible Solution |
|---|---|
| A book issue record cannot be saved. | Verify the BookID and MemberID values and their relationships. |
| The same book is issued beyond available stock. | Add availability validation before saving an issue. |
| A returned book still appears in the issued-books query. | Enter the ReturnDate and check the query criteria. |
| The overdue query shows no records. | Check due dates, ReturnDate values, and the computer date. |
| The fine amount is incorrect. | Review the daily rate, due date, return date, and grace-period policy. |
| A report displays duplicate-looking rows. | Check the query joins and whether the source has multiple issue transactions. |
LibraryManagement.accdb.1. Which table stores book details?
2. What does a blank ReturnDate normally indicate in this project?
3. Which query identifies books that are past their due date and not yet returned?