Free

Library Management System

Issue and return books, track members, and calculate fines — Python and MySQL.

  • Python
  • MySQL
  • mysql-connector

About this project

A library counter program: add books and members, issue a book, take a return, and calculate the fine on anything overdue. Search by title, author or accession number, and print a list of what is currently out.

What makes this a better second database project than the usual CRUD exercise is the relationship. A book can be issued many times and a member can borrow many books, so the interesting data lives in neither table but between them. Getting that join table right — and deriving availability from it rather than keeping a separate "is_available" column that drifts out of sync — is the whole point.

Scope, plainly: one counter, one operator, one machine. A learning exercise, not library software.

What you will learn

  • Model a many-to-many relationship properly, with a join table rather than a repeated column
  • Write a JOIN across three tables and understand what it returns
  • Work with dates in SQL — due dates, overdue days, and fine calculation
  • Enforce a rule the database can hold, such as not issuing a book that is already out
  • Explain why availability is derived from the issue table instead of stored twice

Before you start

  • Python basics — variables, loops, functions
  • SQL: SELECT with WHERE and JOIN
  • MySQL installed locally, or access to any MySQL server

New to Python? The free Python course covers everything this project assumes.

Academic integrity notice

These projects are provided for learning, experimentation and reference. Understand the code, modify it for your own requirements, and acknowledge external work according to your institution’s academic policies. Priodemy does not supply work to be submitted as your own.