The BookVault is a robust Java-based application built using JDBC for database connectivity and MySQL for persistent storage. This system is designed to streamline the everyday operations of a library, allowing both administrators and users to manage books, track borrowing activities, and maintain accurate records efficiently.
CREATE TABLE users (
user_id INT AUTO_INCREMENT PRIMARY KEY,
name VARCHAR(255) NOT NULL,
email VARCHAR(255) UNIQUE NOT NULL,
password VARCHAR(255) NOT NULL,
is_admin BOOLEAN DEFAULT FALSE
);CREATE TABLE authors (
author_id INT AUTO_INCREMENT PRIMARY KEY,
name VARCHAR(255) NOT NULL UNIQUE
);CREATE TABLE languages (
language_id INT AUTO_INCREMENT PRIMARY KEY,
name VARCHAR(50) NOT NULL UNIQUE
);CREATE TABLE books (
book_id INT AUTO_INCREMENT PRIMARY KEY,
title VARCHAR(255) NOT NULL,
author_id INT,
language_id INT,
genre VARCHAR(255) NOT NULL,
rating FLOAT DEFAULT 0.0,
available BOOLEAN DEFAULT TRUE,
FOREIGN KEY (author_id) REFERENCES authors(author_id),
FOREIGN KEY (language_id) REFERENCES languages(language_id)
);CREATE TABLE borrowed_books (
borrow_id INT AUTO_INCREMENT PRIMARY KEY,
user_id INT,
book_id INT,
borrow_date DATE NOT NULL,
due_date DATE NOT NULL,
FOREIGN KEY (user_id) REFERENCES users(user_id),
FOREIGN KEY (book_id) REFERENCES books(book_id)
);- Java π₯οΈ
- JDBC (Java Database Connectivity) π
- MySQL Database ποΈ
- Console-based UI π
β
Admin Login & Dashboard π
β
User Registration & Authentication π₯
β
Book Management (Add, View, Delete) π
β
Author & Language Management ποΈ
β
Borrow & Return Books π
β
Due Date Tracking β³
β
Search Books by Title, Author, Genre π
β
Data Persistence with MySQL ποΈ
git clone https://github.com/your-repo/library-management.git- Open MySQL Workbench or any MySQL client.
- Run the provided SQL script to create tables.
- Modify
ConnectionClass.javawith your MySQL credentials:
private static final String URL = "jdbc:mysql://localhost:3306/library_db";
private static final String USER = "your_username";
private static final String PASSWORD = "your_password";javac Main.java
java Mainπ GUI Implementation using JavaFX/Swing
π Advanced Search & Filtering
π Book Reservation System
π Email Notifications for Due Books
π’ Have suggestions? Feel free to contribute!
π§ anugupta5102@gmail.com
π LinkedIn | GitHub
This project is licensed under the MIT License. Feel free to use and modify it!