{"id":22965611,"url":"https://github.com/ninja1375/library-management-system-sql","last_synced_at":"2026-02-23T07:42:57.458Z","repository":{"id":268036625,"uuid":"901985134","full_name":"Ninja1375/library-management-system-sql","owner":"Ninja1375","description":"library-management-system-sql","archived":false,"fork":false,"pushed_at":"2024-12-13T23:26:43.000Z","size":62,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-28T00:36:56.508Z","etag":null,"topics":["library","scripts","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/Ninja1375.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","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},"funding":{"github":"Ninja1375","patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"lfx_crowdfunding":null,"polar":null,"buy_me_a_coffee":null,"thanks_dev":null,"custom":null}},"created_at":"2024-12-11T17:22:38.000Z","updated_at":"2024-12-25T21:34:52.000Z","dependencies_parsed_at":"2024-12-14T00:25:35.267Z","dependency_job_id":"18759f7b-9d8c-4454-bf93-9eac8be007b6","html_url":"https://github.com/Ninja1375/library-management-system-sql","commit_stats":null,"previous_names":["ninja1375/library-management-system-sql"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Ninja1375/library-management-system-sql","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ninja1375%2Flibrary-management-system-sql","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ninja1375%2Flibrary-management-system-sql/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ninja1375%2Flibrary-management-system-sql/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ninja1375%2Flibrary-management-system-sql/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Ninja1375","download_url":"https://codeload.github.com/Ninja1375/library-management-system-sql/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ninja1375%2Flibrary-management-system-sql/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29739427,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-23T07:21:16.360Z","status":"ssl_error","status_checked_at":"2026-02-23T07:21:16.007Z","response_time":90,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["library","scripts","sql"],"created_at":"2024-12-14T20:15:54.829Z","updated_at":"2026-02-23T07:42:57.440Z","avatar_url":"https://github.com/Ninja1375.png","language":null,"readme":"# Sistema de Gerenciamento de Biblioteca (SQL)\n\nEste projeto é um sistema simples de gerenciamento de biblioteca utilizando SQL. Ele foi desenvolvido para praticar a criação de tabelas, inserção de dados e consultas em bancos de dados relacionais.\n\n## 📂 Estrutura do Banco de Dados\n\nO banco de dados possui as seguintes tabelas:\n\n### **1. Livros**\n- `id_livro` (PK, int, auto increment)  \n- `titulo` (varchar, 150)  \n- `autor` (varchar, 100)  \n- `categoria` (varchar, 50)  \n- `ano_publicacao` (int)  \n- `disponibilidade` (boolean)\n\n### **2. Membros**\n- `id_membro` (PK, int, auto increment)  \n- `nome` (varchar, 100)  \n- `email` (varchar, 150, único)  \n- `telefone` (varchar, 15)  \n- `data_cadastro` (date)\n\n### **3. Empréstimos**\n- `id_emprestimo` (PK, int, auto increment)  \n- `id_livro` (FK, int)  \n- `id_membro` (FK, int)  \n- `data_emprestimo` (date)  \n- `data_devolucao` (date, opcional)\n\n## 📜 Scripts Disponíveis\n\n- **create_tables.sql**: Cria as tabelas no banco de dados.  \n- **insert_data.sql**: Insere dados iniciais nas tabelas.  \n- **queries.sql**: Contém consultas úteis para análise de dados.\n\n## 🛠️ Consultas de Exemplo\n\n1. **Livros mais emprestados:**  \n   ```sql\n   SELECT l.titulo, COUNT(e.id_emprestimo) AS total_emprestimos\n   FROM Livros l\n   JOIN Emprestimos e ON l.id_livro = e.id_livro\n   GROUP BY l.titulo\n   ORDER BY total_emprestimos DESC;\n\n2. **Membros com mais empréstimos:**\n\n   ```sql\n   SELECT m.nome, COUNT(e.id_emprestimo) AS total_emprestimos\n   FROM Membros m\n   JOIN Emprestimos e ON m.id_membro = e.id_membro\n   GROUP BY m.nome\n   ORDER BY total_emprestimos DESC;\n\n3. **Livros disponíveis na biblioteca:**\n\n   ```sql\n   SELECT * FROM Livros WHERE disponibilidade = 1; \n\n4. **Livros emprestados atualmente:**\n\n   ```sql\n   SELECT l.titulo, m.nome, e.data_emprestimo\n   FROM Emprestimos e\n   JOIN Livros l ON e.id_livro = l.id_livro\n   JOIN Membros m ON e.id_membro = m.id_membro\n   WHERE e.data_devolucao IS NULL; \n\n## 🚀 Como Usar\n\n1.  Crie o banco de dados no seu sistema de gerenciamento de banco de dados (MySQL, PostgreSQL, etc.).\n\n2. Execute o script `create_tables.sql` para criar as tabelas.\n\n3. Execute o script `insert_data.sql` para adicionar dados iniciais.\n\n4. Use as consultas em `queries.sql` para explorar os dados.\n\n## 📚 Sobre o Projeto\n\nEste projeto é ideal para quem está aprendendo SQL e deseja praticar suas habilidades.\nSinta-se à vontade para sugerir melhorias ou contribuir com novos recursos!\n\n## linguagem Utilizada ##\n\n\u003ca href=\"https://programartudo.blogspot.com/2024/11/sql-manipulacao-e-gerenciamento-de-dados.html\" target=\"_blank\"\u003e\u003cimg loading=\"lazy\" src=\"https://cdn.jsdelivr.net/gh/devicons/devicon/icons/sqlite/sqlite-original.svg\" width=\"70\" height=\"70\"/\u003e\u003c/a\u003e\n\n## Apoie-me:\n\n\u003ca href=\"https://buymeacoffee.com/antonio13\" target=\"_blank\"\u003e\u003cimg loading=\"lazy\" src=\"https://img.buymeacoffee.com/button-api/?text=Buy%20me%20a%20coffee\u0026emoji=\u0026slug=seu_nome_de_usuario\u0026button_colour=FFDD00\u0026font_colour=000000\u0026font_family=Cookie\u0026outline_colour=000000\u0026coffee_colour=ffffff\" width=\"130\" height=\"30\"\u003e\u003c/a\u003e\n\n\u003ca href=\"https://www.paypal.com/donate/?hosted_button_id=DN574F28FYUNG\" target=\"_blank\"\u003e\u003cimg loading=\"lazy\" src=\"https://upload.wikimedia.org/wikipedia/commons/b/b5/PayPal.svg\" width=\"130\" height=\"30\"\u003e\u003c/a\u003e\n\n\u003ca href=\"https://github.com/sponsors/Ninja1375\" target=\"_blank\"\u003e\u003cimg loading=\"lazy\" src=\"https://img.shields.io/badge/-Sponsor-ea4aaa?style=for-the-badge\u0026logo=github\u0026logoColor=white\" width=\"130\" height=\"30\"\u003e\u003c/a\u003e\n","funding_links":["https://github.com/sponsors/Ninja1375","https://buymeacoffee.com/antonio13","https://img.buymeacoffee.com/button-api/?text=Buy%20me%20a%20coffee\u0026emoji=\u0026slug=seu_nome_de_usuario\u0026button_colour=FFDD00\u0026font_colour=000000\u0026font_family=Cookie\u0026outline_colour=000000\u0026coffee_colour=ffffff","https://www.paypal.com/donate/?hosted_button_id=DN574F28FYUNG"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fninja1375%2Flibrary-management-system-sql","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fninja1375%2Flibrary-management-system-sql","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fninja1375%2Flibrary-management-system-sql/lists"}