{"id":19762674,"url":"https://github.com/parthds02/library-system-management-sql","last_synced_at":"2026-05-14T17:08:02.612Z","repository":{"id":258576503,"uuid":"874196667","full_name":"ParthDS02/Library-System-Management-SQL","owner":"ParthDS02","description":"Library Management System built using PostgreSQL in pgAdmin 4. The system manages book issuing, returns, and tracking with detailed records of books, members, employees, branches, and transactions. It supports CRUD operations on books and members, and helps streamline library workflows efficiently.","archived":false,"fork":false,"pushed_at":"2024-10-17T12:27:21.000Z","size":463,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-10T23:42:29.806Z","etag":null,"topics":["data-modeling","database","database-management","library-management-system","library-systems","pgadmin4","postgresql","sql"],"latest_commit_sha":null,"homepage":"","language":"PLpgSQL","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ParthDS02.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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-10-17T12:17:00.000Z","updated_at":"2024-10-17T12:27:25.000Z","dependencies_parsed_at":"2024-10-19T16:47:21.102Z","dependency_job_id":"c8e61ce1-b6af-4cbd-a5d7-2958d3c96912","html_url":"https://github.com/ParthDS02/Library-System-Management-SQL","commit_stats":null,"previous_names":["parthds02/library-system-management-sql"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ParthDS02%2FLibrary-System-Management-SQL","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ParthDS02%2FLibrary-System-Management-SQL/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ParthDS02%2FLibrary-System-Management-SQL/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ParthDS02%2FLibrary-System-Management-SQL/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ParthDS02","download_url":"https://codeload.github.com/ParthDS02/Library-System-Management-SQL/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241094649,"owners_count":19908675,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["data-modeling","database","database-management","library-management-system","library-systems","pgadmin4","postgresql","sql"],"created_at":"2024-11-12T04:06:14.318Z","updated_at":"2026-05-14T17:07:57.590Z","avatar_url":"https://github.com/ParthDS02.png","language":"PLpgSQL","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Library Management System using SQL\n\n## Project Overview\n\n**Project Title**: Library Management System  \n**Database**: `library_db`\n\nThis project demonstrates the implementation of a Library Management System using SQL. It includes creating and managing tables, performing CRUD operations, and executing advanced SQL queries. The goal is to showcase skills in database design, manipulation, and querying.\n\n![Library-System-Management](https://github.com/user-attachments/assets/a90d6c9c-2040-40b2-aa2b-9f3c3415259b)\n\n\n## Objectives\n\n1. **Set up the Library Management System Database**: Create and populate the database with tables for branches, employees, members, books, issued status, and return status.\n2. **CRUD Operations**: Perform Create, Read, Update, and Delete operations on the data.\n3. **CTAS (Create Table As Select)**: Utilize CTAS to create new tables based on query results.\n4. **Advanced SQL Queries**: Develop complex queries to analyze and retrieve specific data.\n\n## Project Structure\n\n### 1. Data Model \n![Data Model](https://github.com/user-attachments/assets/6fcb2ee6-bf96-4c9f-8f06-441a0940bd30)\n\nThis is a relational data model for a Library Management System created using PostgreSQL. The schema consists of multiple interconnected tables:\n\n- **Branch**: Contains details about library branches including branch_id, address, and manager information.\n\n- **Employees**: Contains employee data like emp_id, name, position, salary, and the branch they work at.\n\n- **Members**: Stores member details such as member_id, name, address, and registration date.\n\n- **Books**: Holds book information including isbn, title, category, rental price, and author details.\n\n- **Issued Status**: Manages information about books issued to members, containing data like issued_id, issued_member_id, issued_book_isbn, issued_emp_id, and dates.\n\n- **Return Status**: Tracks details about book returns, including return_id, return_book_name, return_date, and return_book_isbn.\n\n\n- The tables are connected using foreign keys such as branch_id (in both Branch and Employees), isbn (in Books and Issued Status), and member_id (in Members and Issued Status), enabling data relationships for tracking library operations.\n\n\n- **Database Creation**: Created a database named `library_db`.\n- **Table Creation**: Created tables for branches, employees, members, books, issued status, and return status. Each table includes relevant columns and relationships.\n\n```sql\nCREATE DATABASE library_db;\n\nDROP TABLE IF EXISTS branch;\nCREATE TABLE branch\n(\n            branch_id VARCHAR(10) PRIMARY KEY,\n            manager_id VARCHAR(10),\n            branch_address VARCHAR(30),\n            contact_no VARCHAR(15)\n);\n\n\n-- Create table \"Employee\"\nDROP TABLE IF EXISTS employees;\nCREATE TABLE employees\n(\n            emp_id VARCHAR(10) PRIMARY KEY,\n            emp_name VARCHAR(30),\n            position VARCHAR(30),\n            salary DECIMAL(10,2),\n            branch_id VARCHAR(10),\n            FOREIGN KEY (branch_id) REFERENCES  branch(branch_id)\n);\n\n\n-- Create table \"Members\"\nDROP TABLE IF EXISTS members;\nCREATE TABLE members\n(\n            member_id VARCHAR(10) PRIMARY KEY,\n            member_name VARCHAR(30),\n            member_address VARCHAR(30),\n            reg_date DATE\n);\n\n\n\n-- Create table \"Books\"\nDROP TABLE IF EXISTS books;\nCREATE TABLE books\n(\n            isbn VARCHAR(50) PRIMARY KEY,\n            book_title VARCHAR(80),\n            category VARCHAR(30),\n            rental_price DECIMAL(10,2),\n            status VARCHAR(10),\n            author VARCHAR(30),\n            publisher VARCHAR(30)\n);\n\n\n\n-- Create table \"IssueStatus\"\nDROP TABLE IF EXISTS issued_status;\nCREATE TABLE issued_status\n(\n            issued_id VARCHAR(10) PRIMARY KEY,\n            issued_member_id VARCHAR(30),\n            issued_book_name VARCHAR(80),\n            issued_date DATE,\n            issued_book_isbn VARCHAR(50),\n            issued_emp_id VARCHAR(10),\n            FOREIGN KEY (issued_member_id) REFERENCES members(member_id),\n            FOREIGN KEY (issued_emp_id) REFERENCES employees(emp_id),\n            FOREIGN KEY (issued_book_isbn) REFERENCES books(isbn) \n);\n\n\n\n-- Create table \"ReturnStatus\"\nDROP TABLE IF EXISTS return_status;\nCREATE TABLE return_status\n(\n            return_id VARCHAR(10) PRIMARY KEY,\n            issued_id VARCHAR(30),\n            return_book_name VARCHAR(80),\n            return_date DATE,\n            return_book_isbn VARCHAR(50),\n            FOREIGN KEY (return_book_isbn) REFERENCES books(isbn)\n);\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fparthds02%2Flibrary-system-management-sql","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fparthds02%2Flibrary-system-management-sql","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fparthds02%2Flibrary-system-management-sql/lists"}