This project focuses on designing and analyzing a Library Management Database using MySQL.
The goal is to efficiently manage data related to books, borrowers, authors, and branches, and perform analytical queries to generate valuable business insights.
- Simplify tracking of books and their locations.
- Identify which books are most borrowed and from which branches.
- Monitor library usage and borrowing patterns.
- Support better decision-making for library management and resource allocation.
The project includes an ER Diagram and a corresponding schema representing:
BookLibrary_BranchBorrowerBook_LoansBook_CopiesAuthor
1️ How many copies of the book titled "The Lost Tribe" are owned by the library branch "Sharpstown"?
2️ How many copies of "The Lost Tribe" are owned by each branch?
3️ Retrieve the names of all borrowers who do not have any books checked out.
4️ For each book loaned out from "Sharpstown" branch due on 2/3/18, get the book title, borrower’s name, and address.
5️ Retrieve the branch name and total number of books loaned out from each branch.
6️ Retrieve names, addresses, and number of books checked out for borrowers with more than five books checked out.
7️ For each book authored by "Stephen King", retrieve the title and number of copies owned by the "Central" branch.
- DDL: Creating tables and defining constraints.
- DML: Inserting and updating records.
- Joins: INNER, LEFT, RIGHT joins to link multiple tables.
- GROUP BY, HAVING, ORDER BY for summarizing data.
- Subqueries and Nested Queries for complex data retrieval.
- Identified stock distribution of books across branches for better inventory control.
- Determined branch activity based on loan frequency.
- Highlighted inactive members for re-engagement.
- Detected frequent borrowers for loyalty or membership programs.
- Analyzed popular authors and borrow trends to support data-driven purchase decisions.
This SQL project provided hands-on experience in:
- Database design and management.
- Writing optimized SQL queries.
- Extracting insights for real-world library operations.
- Improved understanding of data modeling.
- Strengthened SQL query-writing and debugging skills.
- Gained exposure to business-oriented analysis using structured data.