Skip to content

Anugupta5102/BookVault

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

25 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ“š BookVault – Organize. Borrow. Read. Repeat.

πŸš€ Overview

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.


πŸ›οΈ Database Schema

πŸ”Ή Users Table

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
);

πŸ”Ή Authors Table

CREATE TABLE authors (
    author_id INT AUTO_INCREMENT PRIMARY KEY,
    name VARCHAR(255) NOT NULL UNIQUE
);

πŸ”Ή Languages Table

CREATE TABLE languages (
    language_id INT AUTO_INCREMENT PRIMARY KEY,
    name VARCHAR(50) NOT NULL UNIQUE
);

πŸ”Ή Books Table

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)
);

πŸ”Ή Borrowed Books Table

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)
);

πŸ› οΈ Technologies Used

  • Java πŸ–₯️
  • JDBC (Java Database Connectivity) πŸ”—
  • MySQL Database πŸ—„οΈ
  • Console-based UI πŸ“œ

πŸ“Œ Features

βœ… 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 πŸ—„οΈ


πŸ”§ Setup Instructions

1️⃣ Clone the Repository

git clone https://github.com/your-repo/library-management.git

2️⃣ Import SQL Database

  • Open MySQL Workbench or any MySQL client.
  • Run the provided SQL script to create tables.

3️⃣ Configure Database Connection

  • Modify ConnectionClass.java with 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";

4️⃣ Compile & Run the Application

javac Main.java
java Main

πŸ† Future Enhancements

πŸš€ 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


πŸ“œ License

This project is licensed under the MIT License. Feel free to use and modify it!

About

A Java-based Library Management System using JDBC and MySQL, designed for managing books, users, authors, and borrowing records efficiently. The system supports admin and user roles, book tracking, and database integration for seamless operations. πŸš€

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors