A full-stack Library Management System built with PHP and MySQL. It provides a complete back-office for a library — managing books, authors, publishers, members, staff and periodicals, along with the full book-circulation workflow (issue, return, renew) and automatic fine calculation for overdue items.
Built as my Semester 4 DBMS project, the application is organised around a relational schema of 15+ tables and a clean, Bootstrap-based admin interface. An admin signs in, lands on a statistics dashboard, and manages the entire catalogue and membership from a single sidebar-driven UI. Every data table supports search, sorting and pagination, and book stock is tracked down to individual physical copies.
At-a-glance statistics (total / available / borrowed / overdue books), recent activity, quick actions and live notifications.
Session-based authentication with hashed passwords.
Full catalogue with authors, publishers, ISBN, genre, and per-title copy/availability counts.
Issue, return and renew workflow with live status badges and automatic overdue fine calculation.
Circulation, user-activity, fine, inventory and request reports with summary cards and an activity chart.
| Authors | Publishers |
|---|---|
![]() |
![]() |
| Periodicals | Book Requests |
|---|---|
![]() |
![]() |
| Members | Staff |
|---|---|
![]() |
![]() |
erDiagram
BOOKS ||--o{ BOOK_AUTHORS : has
AUTHORS ||--o{ BOOK_AUTHORS : writes
BOOKS ||--o{ BOOK_PUBLISHERS : has
PUBLISHERS ||--o{ BOOK_PUBLISHERS : publishes
PUBLISHERS ||--o{ PERIODICALS : publishes
PERIODICALS ||--o{ PERIODICAL_ISSUES : has
BOOKS ||--o{ BOOK_COPIES : "tracked as"
BOOK_COPIES ||--o{ BOOK_LENDING : "issued in"
USERS ||--o{ BOOK_LENDING : borrows
USERS ||--o{ BOOK_REQUESTS : submits
USERS ||--o{ BOOK_RESERVATIONS : places
BOOKS ||--o{ BOOK_RESERVATIONS : "reserved via"
USERS ||--o{ BOOK_REVIEWS : writes
BOOKS ||--o{ BOOK_REVIEWS : receives
USERS ||--o| STAFF : "may be"
Physical stock is tracked per copy (not just per title), and circulation
(issue / return / renew, overdue fines) is recorded in book_lending.
- Authentication & roles — secure login with
password_hash()and admin / staff / member access levels. - Dashboard — totals for books, availability, active loans and overdue items, plus recent activity and notifications.
- Book management — add, edit, delete and search books; track individual physical copies (condition, location, status).
- Authors & publishers — full CRUD and many-to-many association with books.
- Member management — students, faculty, staff and admin accounts with status (active / inactive / suspended).
- Circulation — issue, return and renew books with automatic overdue fine calculation.
- Book requests — members request acquisitions; staff approve, reject or mark as acquired.
- Periodicals — manage journals/magazines and their individual issues.
- Reports — circulation statistics, inventory breakdowns and library usage data.
- Backend: PHP (PDO for database access)
- Database: MySQL / MariaDB
- Frontend: HTML, CSS, Bootstrap 5, JavaScript, jQuery, DataTables
- Server: Apache (via XAMPP)
DBMS_Project/
├── index.php # Dashboard / landing page
├── login.php # Authentication
├── logout.php
├── config.php # Database connection & helper functions
├── books.php # Book management
├── authors.php # Author management
├── publishers.php # Publisher management
├── periodicals.php # Periodicals & issues
├── circulation.php # Issue / return / renew
├── book_requests.php # Acquisition requests
├── users.php # Member/user management
├── staff.php # Staff management
├── reports.php # Reports & statistics
├── settings.php
├── setup_admin.php # First-run admin/database setup helper
├── get_*.php # AJAX endpoints (dashboard stats, book lookup, etc.)
├── library_schema.sql # Full database schema
├── css/ # Stylesheets
├── js/ # Client-side scripts
├── includes/ # Shared header & sidebar
└── docs/screenshots/ # UI screenshots used in this README
Full step-by-step instructions are in SETUP_GUIDE.md.
- Install XAMPP and start Apache and MySQL.
- Place this project inside your
htdocsdirectory. - Import
library_schema.sqlthrough phpMyAdmin to create thelibrary_management_systemdatabase. - Adjust the credentials in
config.phpif your MySQL setup differs from the XAMPP defaults. - Visit
setup_admin.phponce to create the database (if needed) and the initial admin user. - Open
login.phpin your browser and sign in.
Default admin credentials
| Password | |
|---|---|
| admin@library.com | admin123 |
The schema (library_schema.sql) defines the core tables: books, authors, publishers, users, staff, book_copies, book_lending, book_requests, book_reservations, periodicals, periodical_issues and supporting tables for reviews and statistics. Relationships between books, authors and publishers are modelled as many-to-many join tables, and circulation links members to individual book copies.
Released under the MIT License.










