{"id":28919477,"url":"https://github.com/blopez024/bryanl_us_public_library_database","last_synced_at":"2026-01-31T20:31:20.883Z","repository":{"id":299536659,"uuid":"1003349644","full_name":"blopez024/BryanL_US_Public_Library_Database","owner":"blopez024","description":null,"archived":false,"fork":false,"pushed_at":"2025-06-17T02:50:20.000Z","size":0,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-06-17T03:33:30.344Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/blopez024.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,"zenodo":null}},"created_at":"2025-06-17T02:42:51.000Z","updated_at":"2025-06-17T02:50:23.000Z","dependencies_parsed_at":"2025-06-17T03:33:40.165Z","dependency_job_id":"e1167e39-3132-4943-8582-d78363f0896e","html_url":"https://github.com/blopez024/BryanL_US_Public_Library_Database","commit_stats":null,"previous_names":["blopez024/bryanl_us_public_library_database"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/blopez024/BryanL_US_Public_Library_Database","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blopez024%2FBryanL_US_Public_Library_Database","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blopez024%2FBryanL_US_Public_Library_Database/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blopez024%2FBryanL_US_Public_Library_Database/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blopez024%2FBryanL_US_Public_Library_Database/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/blopez024","download_url":"https://codeload.github.com/blopez024/BryanL_US_Public_Library_Database/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blopez024%2FBryanL_US_Public_Library_Database/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261232844,"owners_count":23128169,"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":[],"created_at":"2025-06-22T03:41:36.551Z","updated_at":"2026-01-31T20:31:20.879Z","avatar_url":"https://github.com/blopez024.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# Books Database Example\n\nThis project demonstrates basic SQL operations on a simple `books` table. The operations include creating and managing the table, inserting data, and performing various queries and updates.\n\n## Table Structure\n\n```sql\nCREATE TABLE books (\n    bookId INT PRIMARY KEY,\n    title VARCHAR(50) NOT NULL,\n    author VARCHAR(50),\n    publishedYear INT,\n    isAvailable BOOLEAN\n);\n```\n\n- bookId: Unique identifier for each book (Primary Key)\n\n- title: Title of the book (required)\n\n- author: Name of the book's author\n\n- publishedYear: Year the book was published\n\n- isAvailable: Indicates availability (1 for available, 0 for not)\n\n## Sample Data\n\nThe table is populated with three example books:\n\n```sql\nINSERT INTO books (bookId, title, author, publishedYear, isAvailable)\nVALUES\n    (1, \"The Great Gatsby\", \"F. Scott Fitzgerald\", 1925, 1),\n    (2, \"To Kill a Mockingbird\", \"Harper Lee\", 1960, 1),\n    (3, \"1984\", \"George Orwell\", 1949, 0);\n```\n\n## SQL Operations\n\n### Retrieve All Books\n\n```sql\nSELECT * FROM books;\n```\n\n### List Only Available Books\n\n```sql\nSELECT * FROM books\nWHERE isAvailable = 1;\n```\n\n### Count Books Published Before 1950\n\n```sql\nSELECT COUNT(*) FROM books\nWHERE publishedYear \u003c 1950;\n```\n\n### Mark a Book as Available\n\n```sql\nUPDATE books\nSET isAvailable = 1\nWHERE bookId = 3; -- \"1984\"\n```\n\n### Update Author Name\n\n```sql\nUPDATE books\nSET author = \"Francis Scott Fitzgerald.\"\nWHERE bookId = 1;\n```\n\n### Delete a Book\n\n```sql\nDELETE FROM books\nWHERE bookId = 2; -- \"To Kill a Mockingbird\"\n```\n\n## Purpose\n\nThis example is useful for practicing:\n\n- SQL table creation and deletion\n- Data insertion and querying\n- Updating and deleting records\n- Using conditional filters\n\n## Notes\n\n- The table is initially dropped and recreated to ensure a clean start.\n\n- The boolean values for isAvailable use 1 (true) and 0 (false), which is common in SQL dialects like MySQL.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblopez024%2Fbryanl_us_public_library_database","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fblopez024%2Fbryanl_us_public_library_database","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblopez024%2Fbryanl_us_public_library_database/lists"}