Skip to content

nive-c/Library_Management

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

6 Commits
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ“š Library Management System

A console-based Library Management System built using Python and MySQL.
This project allows users to add books, view books, borrow and return books while tracking availability using a database.

✨ Features

  • Add books
  • View all / available books
  • Borrow and return books
  • MySQL database integration

πŸ›  Tech Stack

  • Python
  • MySQL
  • mysql-connector-python

βš™οΈ How the Code Works

  • The program connects to a MySQL database using mysql.connector.
  • On startup, it creates a database (library) and a table (books) if they don’t already exist.
  • The application runs in a menu-driven loop, allowing the user to choose actions.

Function Breakdown

  • add_book() β†’ Adds a new book to the database.

  • view_books() β†’ Displays all books or only available books.

  • borrow_book() β†’ Marks a book as borrowed if available.

  • return_book() β†’ Marks a borrowed book as available again.

  • main() β†’ Handles database setup and controls the program flow.

  • Book availability is tracked using an available field (yes / no).

  • All changes are committed to the database to ensure data persistence.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages