This project is a Library Management System designed to help libraries efficiently manage books, authors, and library branches. It includes a structured data model and sample SQL queries for common library operations.
The data model consists of three main entities:
- Book: Represents information about books available in the library.
- Attributes: ISBN, Title, Publication Year, Availability, Branch ID, etc.
- Author: Contains details about authors of books.
- Attributes: Author ID, First Name, Last Name, etc.
- LibraryBranch: Represents library branches where books are available.
- Attributes: Branch ID, Branch Name, Location, etc.
Additionally, a junction table named "BookAuthor" is used to handle the many-to-many relationship between books and authors.
Sample SQL queries are provided for common library operations:
- Find Books by Author: Retrieve books written by a specific author.
- List Available Books in a Library Branch: Display books available at a particular library branch.
- Count Books by Author: Count the number of books written by each author.
- Add a New Book: Insert a new book's details into the database.
- Update Book Availability: Update the availability status of a book (e.g., check-out, return).
- Remove an Author's Books: Delete all books by a specific author from the database.
-
Database Setup: Set up a relational database (e.g., MySQL, PostgreSQL) and create tables based on the provided data model.
-
Data Population: Populate the tables with sample data, including books, authors, and library branches.
-
Query Execution: Execute the sample SQL queries to perform library operations and test the system.
Contributions to this project are welcome. If you have suggestions, improvements, or additional features to add, please fork the repository and submit a pull request.
This project is open-source and available under the MIT License. You are free to use, modify, and distribute it as needed.