{"id":23910912,"url":"https://github.com/aksoni07/bookvault","last_synced_at":"2026-05-31T16:31:21.307Z","repository":{"id":269573730,"uuid":"907828222","full_name":"Aksoni07/BookVault","owner":"Aksoni07","description":"The Library Management System is a database-driven application that manages library operations like book tracking, customer and employee management, and book issuance/returns. It streamlines library tasks and ensures efficient record-keeping.","archived":false,"fork":false,"pushed_at":"2024-12-24T13:52:57.000Z","size":2215,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-23T17:17:16.251Z","etag":null,"topics":["crud-operation","excel","mysql","normalisation","sql"],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Aksoni07.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-12-24T13:44:02.000Z","updated_at":"2024-12-24T14:41:21.000Z","dependencies_parsed_at":"2024-12-24T15:22:07.297Z","dependency_job_id":"f1540166-4779-4f3f-852f-23acf45dff21","html_url":"https://github.com/Aksoni07/BookVault","commit_stats":null,"previous_names":["aksoni07/bookvault"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Aksoni07/BookVault","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Aksoni07%2FBookVault","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Aksoni07%2FBookVault/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Aksoni07%2FBookVault/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Aksoni07%2FBookVault/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Aksoni07","download_url":"https://codeload.github.com/Aksoni07/BookVault/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Aksoni07%2FBookVault/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33739860,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-05-31T02:00:06.040Z","response_time":95,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["crud-operation","excel","mysql","normalisation","sql"],"created_at":"2025-01-05T07:29:08.786Z","updated_at":"2026-05-31T16:31:21.282Z","avatar_url":"https://github.com/Aksoni07.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# Library Management System\n\nThis project is a **Library Management System** built using **SQL** that facilitates the efficient management of library operations. It includes features for tracking books, customers, employees, book issuance, returns, and branch management. The system is designed to streamline library operations and provide insights through SQL queries and data analysis.\n\n## Database Setup\n\nTo get started, create a new database called `Library` to store all the required information:\n\n```sql\nCREATE DATABASE library;\nUSE library;\n```\n\n## Tables and Features\n\n### 1. **Book Management**\n   - Add, update, and remove books from the library's collection.\n   - Track details such as **title**, **category**, **rental price**, **availability status**, **author**, and **publisher**.\n\n### 2. **Customer Management**\n   - Maintain records for each customer including **name**, **address**, **registration date**, and **issuance history**.\n\n### 3. **Employee Management**\n   - Manage employees, including **name**, **position**, **salary**, and **branch assignments**.\n\n### 4. **Book Issuance and Returns**\n   - Track issued books, customers who have borrowed them, and ensure timely returns.\n   - Maintain a record of **issue date**, **return date**, and associated **book titles**.\n\n### 5. **Branch Management**\n   - Track library branches, including **branch numbers**, **manager assignments**, **addresses**, and **contact details**.\n\n## SQL Schema\n\nBelow is the SQL code for creating the necessary tables and relationships:\n\n### `Branch Table`\n```sql\nCREATE TABLE Branch (\n  Branch_no VARCHAR(10) PRIMARY KEY,\n  Manager_id VARCHAR(10),\n  Branch_address VARCHAR(30),\n  Contact_no VARCHAR(15)\n);\n```\n\n### `Employee Table`\n```sql\nCREATE TABLE Employee (\n  Emp_id VARCHAR(10) PRIMARY KEY,\n  Emp_name VARCHAR(30),\n  Position VARCHAR(30),\n  Salary DECIMAL(10,2)\n);\n```\n\n### `Customer Table`\n```sql\nCREATE TABLE Customer (\n  Customer_Id VARCHAR(10) PRIMARY KEY,\n  Customer_name VARCHAR(30),\n  Customer_address VARCHAR(30),\n  Reg_date DATE\n);\n```\n\n### `Books Table`\n```sql\nCREATE TABLE Books (\n  ISBN VARCHAR(10) PRIMARY KEY,\n  Book_title VARCHAR(50),\n  Category VARCHAR(30),\n  Rental_Price DECIMAL(10,2),\n  Status ENUM('Yes', 'No'),\n  Author VARCHAR(30),\n  Publisher VARCHAR(30)\n);\n```\n\n### `IssueStatus Table`\n```sql\nCREATE TABLE IssueStatus (\n  Issue_Id VARCHAR(10) PRIMARY KEY,\n  Issued_cust VARCHAR(30),\n  Issued_book_name VARCHAR(50),\n  Issue_date DATE,\n  Isbn_book VARCHAR(15),\n  FOREIGN KEY (Issued_cust) REFERENCES Customer(Customer_Id) ON DELETE CASCADE,\n  FOREIGN KEY (Isbn_book) REFERENCES Books(ISBN) ON DELETE CASCADE\n);\n```\n\n### `ReturnStatus Table`\n```sql\nCREATE TABLE ReturnStatus (\n  Return_id VARCHAR(10) PRIMARY KEY,\n  Return_cust VARCHAR(30),\n  Return_book_name VARCHAR(50),\n  Return_date DATE,\n  isbn_book2 VARCHAR(15),\n  FOREIGN KEY (isbn_book2) REFERENCES Books(ISBN) ON DELETE CASCADE\n);\n```\n\n## Data Insertions\n\nTo insert sample data into these tables:\n\n```sql\n-- Insert data for Branch, Employee, Customer, Books, IssueStatus, and ReturnStatus tables\nINSERT INTO Branch VALUES ('B001', 'M101', '123 Main St', '+919099988676');\n-- Similarly, insert for other tables (Employee, Customer, etc.)\n```\n\n## Key Queries for Data Analysis\n\n### 1. Retrieve available books' titles, categories, and rental prices:\n```sql\nSELECT Book_title, Category, Rental_Price FROM Books WHERE Status = 'Yes';\n```\n\n### 2. List employees and their salaries in descending order:\n```sql\nSELECT Emp_name, Salary FROM Employee ORDER BY Salary DESC;\n```\n\n### 3. Retrieve books issued to customers:\n```sql\nSELECT IssueStatus.Issued_book_name, Customer.Customer_name \nFROM IssueStatus \nINNER JOIN Customer ON IssueStatus.Issued_cust = Customer.Customer_Id;\n```\n\n### 4. Display the total count of books in each category:\n```sql\nSELECT Category, COUNT(Book_title) FROM Books GROUP BY Category;\n```\n\n### 5. Employees with salaries above Rs. 50,000:\n```sql\nSELECT Emp_name, Position FROM Employee WHERE Salary \u003e 50000;\n```\n\n### 6. Customers who registered before 2022-01-01 and haven’t issued any books:\n```sql\nSELECT Customer_name FROM Customer \nWHERE Reg_date \u003c '2022-01-01' AND Customer_Id NOT IN (SELECT Issued_cust FROM IssueStatus);\n```\n\n### 7. Count employees per branch:\n```sql\nSELECT Branch_no, COUNT(Emp_id) FROM Employee GROUP BY Branch_no;\n```\n\n### 8. Customers who issued books in June 2023:\n```sql\nSELECT Customer.Customer_name \nFROM Customer \nINNER JOIN IssueStatus ON Customer.Customer_Id = IssueStatus.Issued_cust \nWHERE IssueStatus.Issue_date BETWEEN '2023-06-01' AND '2023-06-30';\n```\n\n### 9. Retrieve all book titles in the \"History\" category:\n```sql\nSELECT Book_title FROM Books WHERE Category = 'History';\n```\n\n### 10. Branches with more than 5 employees:\n```sql\nSELECT Branch_no, COUNT(Emp_id) FROM Employee \nGROUP BY Branch_no \nHAVING COUNT(Emp_id) \u003e 5;\n```\n\n---\n\n## Usage\n\n1. Clone the repository or download the project files.\n2. Set up your database using the provided SQL schema and queries.\n3. Use the system to manage books, employees, customers, and more.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faksoni07%2Fbookvault","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faksoni07%2Fbookvault","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faksoni07%2Fbookvault/lists"}