Skip to content

Akhilanandateja/Library-Management-System

Repository files navigation

📚 Library Management System (Java + JDBC + MySQL)

A console-based Library Management System built using Java, JDBC, and MySQL.
This project automates book management, user handling, and transaction tracking with role-based access control.


🚀 Features

👨‍💼 Admin

  • Add new books
  • Issue books to users
  • View all books

👤 User

  • View available books
  • Search books by title
  • Return books
  • View personal transaction history

🔐 Authentication

  • User Login & Registration
  • Role-based access (Admin/User)

💡 Advanced Features

  • Due date tracking
  • Fine calculation for late returns
  • MySQL database integration
  • Input validation & error handling

🛠️ Tech Stack

  • Java (Core Java, OOP)
  • JDBC
  • MySQL
  • Git & GitHub

🗂️ Project Structure

Library-Management-System/ │ ├── Book.java ├── User.java ├── Library.java ├── DBConnection.java ├── Main.java ├── mysql-connector-j-9.6.0.jar ├── .gitignore └── README.md


⚙️ Setup Instructions

1️⃣ Clone Repository

git clone https://github.com/YOUR_USERNAME/Library-Management-System.git
cd Library-Management-System


2️⃣ Set Environment Variables (IMPORTANT)

DB_URL=jdbc:mysql://localhost:3306/library_db
DB_USER=root
DB_PASSWORD=your_password


3️⃣ Compile

javac -cp ".;mysql-connector-j-9.6.0.jar" *.java


4️⃣ Run

java -cp ".;mysql-connector-j-9.6.0.jar" Main


🗄️ Database Schema

Users Table

  • user_id
  • name
  • password
  • role

Books Table

  • book_id
  • title
  • author
  • is_issued

Transactions Table

  • book_id
  • user_id
  • issue_date
  • due_date
  • return_date

📸 Screenshots

🔹 Welcome Screen

Welcome

🔹 Admin Panel

Admin

🔹 Add Book

Add Book

🔹 Issue Book

Issue

🔹 View Books

View Books

🔹 User Menu

User

🔹 Search Book

Search

🔹 Return Book

Return Book

🔹 Transactions

Transactions

🔹 Logout

Logout

🧠 Concepts Used

  • Object-Oriented Programming (OOP)
  • Encapsulation & Abstraction
  • JDBC Connectivity
  • SQL Queries
  • Role-Based Access Control

💼 Use Case

This system helps libraries automate:

  • Book tracking
  • User management
  • Borrow/return operations
  • Fine calculation

📌 Future Enhancements

  • GUI (Java Swing / JavaFX)
  • Web version (Spring Boot)
  • Password encryption
  • Admin dashboard

👨‍💻 Author

Akhilanandateja Sanga


⭐ If you like this project

Give it a ⭐ on GitHub!

About

A Library Management System built using Java and MySQL that streamlines book management, user records, and issue/return operations. It enables efficient tracking of library resources with secure database handling and a structured OOP-based design.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages