Skip to content

Latest commit

 

History

History
32 lines (26 loc) · 1.32 KB

README.md

File metadata and controls

32 lines (26 loc) · 1.32 KB

Advanced Library Management System

A console-based Library Management System built in Java. This project demonstrates a clean 3-layer architecture (Model-DAO-Service) suitable for learning and interviews.

Features

  • Authentication: Admin and Student login/registration.
  • Admin: Add books to the library.
  • Student: Issue and Return books.
  • Persistence: Uses SQLite (or MySQL) to store data.

Directory Structure

  • src/model: Data Carriers. Plain Java objects (POJOs) representing DB tables (User, Book).
  • src/dao: Data Access. Direct database operations (SELECT, INSERT).
  • src/service: Business Logic. Decisions and rules (e.g., "Can this user borrow this book?").
  • src/util: Helpers. Database connection and Password hashing.
  • src/main: Entry Point. The starting point of the app.

Setup & Run

  1. Database: The application is configured to use SQLite in library.db by default. No external server setup is needed for the demo.

  2. Compile:

    javac -d bin -sourcepath src src/Main.java

    (Note: You need the SQLite JDBC driver jar in your classpath)

  3. Run:

    java -cp "bin;sqlite-jdbc-3.42.0.0.jar" Main

Interview Preparation

Check docs/CodeWalkthrough.md for a detailed, beginner-friendly explanation of the code flow!