{"id":16587264,"url":"https://github.com/diogo364/db-from-scratch","last_synced_at":"2026-04-07T16:31:12.059Z","repository":{"id":106514481,"uuid":"508854377","full_name":"Diogo364/DB-from-scratch","owner":"Diogo364","description":null,"archived":false,"fork":false,"pushed_at":"2022-07-05T17:56:10.000Z","size":5,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-12-07T23:42:28.631Z","etag":null,"topics":["docker","docker-compose","postgresql","shell-script"],"latest_commit_sha":null,"homepage":"","language":"Shell","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/Diogo364.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":"2022-06-29T21:44:48.000Z","updated_at":"2022-07-28T12:57:55.000Z","dependencies_parsed_at":"2023-07-18T16:00:56.399Z","dependency_job_id":null,"html_url":"https://github.com/Diogo364/DB-from-scratch","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Diogo364/DB-from-scratch","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Diogo364%2FDB-from-scratch","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Diogo364%2FDB-from-scratch/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Diogo364%2FDB-from-scratch/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Diogo364%2FDB-from-scratch/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Diogo364","download_url":"https://codeload.github.com/Diogo364/DB-from-scratch/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Diogo364%2FDB-from-scratch/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31520397,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-07T16:28:08.000Z","status":"ssl_error","status_checked_at":"2026-04-07T16:28:06.951Z","response_time":105,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: 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":["docker","docker-compose","postgresql","shell-script"],"created_at":"2024-10-11T22:53:41.762Z","updated_at":"2026-04-07T16:31:12.032Z","avatar_url":"https://github.com/Diogo364.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Data Base from Scratch\n\n- [Data Base from Scratch](#data-base-from-scratch)\n  - [About](#about)\n  - [Requirements](#requirements)\n  - [Quickstart](#quickstart)\n  - [split_data.sh](#split_datash)\n  - [setup.sql](#setupsql)\n\n\n## About\nIt creates a Relational Data Base to store [Historical Series of fuel prices by resale](https://www.kaggle.com/upadorprofzs/historical-series-of-fuel-prices-by-resale) data. It uses PostgreSQL Relational Data Base, Docker, Shellscript and a CSV file.\n\n## Requirements\n- Docker\n- Docker-compose\n- Download the CSV file from [this link](https://www.kaggle.com/upadorprofzs/historical-series-of-fuel-prices-by-resale)\n\n## Quickstart\nThese are the steps to run the application:\n1. Download the CSV data file;\n2. Update the Environment Variables within the `.env` file with:\n   - DB deployment port;\n   - Name of the csv data file;\n   - DB password;\n3. Build the Docker image:\n   ```\n   docker-compose build\n   ```\n4. Start the container in detached mode:\n    ```\n    docker-compose up -d\n    ```\n5. Connect to the `AA Database` using [Postgresql](https://www.postgresql.org/download/), [Sqlectron](https://sqlectron.github.io/) or similar and enjoy!\n\n## split_data.sh\nThis Shellscript was prepared to split the `Historical Series of fuel prices by resale` structured data into two smaller entities tables: `revenda.csv` and `produtos.csv`. It also removes the duplicated `CNPJ` from `revenda.csv`, since it is considered Primary Key.\n\n## setup.sql\nIt creates both DB Schemas, Revenda and Produtos, and copies the data within the splitted tables into the DB.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdiogo364%2Fdb-from-scratch","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdiogo364%2Fdb-from-scratch","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdiogo364%2Fdb-from-scratch/lists"}