This Library Management System project demonstrates how a real-world library can manage books, members, and borrow transactions efficiently using SQL. Itβs designed for students, beginners, and professionals who want to strengthen their database design and query skills with practical, Indian-context data. The project simulates the everyday operations of a library β including book lending, member management, and fine calculation β through a relational database model.
- To design a normalized database schema for a library system.
- To practice SQL DDL and DML commands.
- To write analytical and complex SQL queries using joins, aggregates, and subqueries.
- To simulate real-world data management tasks using structured datasets.
| File Name | Description |
|---|---|
schema.sql |
Contains all table creation statements (DDL). Defines tables like Publishers, Library_Branch, Books, Members, and Borrow_Records. |
data.sql |
Includes all INSERT statements with Indian-context sample data (authors, publishers, branch locations, etc.). |
queries.sql |
Holds 10β12 SQL queries for data analysis and management. |
ER_Diagram_Library.png |
Entity Relationship Diagram showing table relationships. |
README.md |
Project description and setup guide (this file). |
- Publishers β Details of book publishers.
- Library_Branch β Branches of the library across India (Delhi, Mumbai, etc.).
- Books β Contains book titles, authors, and publisher references.
- Members β Registered library members with contact details.
- One publisher can publish many books.
- One branch can manage many borrow records.
- One member can borrow multiple books.
The ER diagram (included as PDF) shows:
- Entities: Books, Members, Publishers, Branches, Borrow Records
- Relationships: One-to-Many and Many-to-Many (via borrow records)
- How to normalize data and create relationships between entities.
- How to write SQL JOINs, GROUP BY, and aggregate queries.
- How to represent a database schema visually using ERD.