{"id":26658835,"url":"https://github.com/denisecase/datafun-05-spec","last_synced_at":"2025-03-25T10:17:03.650Z","repository":{"id":212754711,"uuid":"732228359","full_name":"denisecase/datafun-05-spec","owner":"denisecase","description":"Specification for Project 5: SQL","archived":false,"fork":false,"pushed_at":"2025-02-10T16:28:30.000Z","size":62,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-10T17:33:37.704Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","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/denisecase.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":"2023-12-16T01:36:20.000Z","updated_at":"2025-02-10T16:29:42.000Z","dependencies_parsed_at":"2025-02-10T17:26:06.310Z","dependency_job_id":"70a47a26-04f0-4afc-9619-8555caadb201","html_url":"https://github.com/denisecase/datafun-05-spec","commit_stats":null,"previous_names":["denisecase/datafun-05-spec"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/denisecase%2Fdatafun-05-spec","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/denisecase%2Fdatafun-05-spec/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/denisecase%2Fdatafun-05-spec/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/denisecase%2Fdatafun-05-spec/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/denisecase","download_url":"https://codeload.github.com/denisecase/datafun-05-spec/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245440565,"owners_count":20615633,"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-03-25T10:17:03.047Z","updated_at":"2025-03-25T10:17:03.637Z","avatar_url":"https://github.com/denisecase.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Specification for Project 5 SQL Module\n\n## Overview\n\nProject 5 integrates Python and SQL,\nfocusing on database interactions using SQLite.\nThe project involves creating and managing a database, building a schema, and performing various SQL operations,\nincluding queries with joins, filters, and aggregations.\n\n---\n\n## Step 1: Start Project, Open in VS Code\n\nStart a project as usual. \n1. Create a repo in GitHub with a default README.md. Name the repo **datafun-05-sql**. \n2. Clone your new repo down to the Projects folder on your machine. \n3. Open your new project repository folder in VS Code.\n\n---\n\n## Step 2: Add/Update Critical Files\n\nWith your new project repo folder open in VS Code, add/update critical project files at the start of every project. \n\n### Add/Add .gitignore\n\n- The .gitignore file tells Git files to ignore when committing changes.\n- Review/copy the example .gitignore file, you might be able to use it without modification.\n\n### Add/Update requirements.txt\n\n- The requirements.txt file lists the packages used in the project.\n- Review/copy the example requirements.txt file, you might be able to use it without modification.\n- You may not need all the listed packages - and may want to add others. Modify the requirements.txt as needed.\n\n### Update README.md\n\n- Edit and customize your README.md to provide an overview of the project and instructions for running it.\n \n### Git add-commit-push\n\nAfter adding .gitignore (or any other key file), run git add, commit, and push to commit your changes to GitHub. \n\n```shell\ngit add .\ngit commit -m \"Add .gitignore and requirements.txt\"\ngit push -u origin main\n```\n\n---\n\n## Step 3: Set up Virtual Environment\n\nNext, create and activate a virtual environment for this project. \nAlso install additional dependencies required for this project.\nSee [requirements.txt](requirements.txt) for detailed instructions. \n\nA. Create .venv\nB. Activate .venv\nC. Install dependencies into .venv\nD. Select VS Code interpreter to use .venv\n\n## Step 4: Schema Design and Database Initialization\n\nDesign a schema with at least two related tables, including foreign key constraints.\nDocument the schema design in your README.md.\n\nsql_create folder:\n\n- 01_drop_tables.sql - drop tables to restart\n- 02_create_tables.sql - create your database schema using sql \n- 03_insert_records.sql - insert at least 10 additional records into each table.\n\ndb01_setup.py:\n\nCreate a Python script that demonstrates the ability to create a database, define a schema, and insert records. \nMake it easy to re-run by dropping the tables first.\n\n\n\n\n## Step 5. Cleaning and Feature Engineering\n\nImplement SQL statements and queries to perform additional operations and use Python to execute your SQL statements.\nYou might create an additional table, insert new records,\nand perform data querying (with filters, sorting, and joining tables),\ndata aggregation, and record update and deletion.\n\nsql_features folder:\n\n1. update_records.sql - update 1 or more records in a table.\n2. delete_records.sql - delete 1 or more records from a table.\n\ndb02_features.py\n\nCreate a Python script that demonstrates the ability to run sql scripts \nto interact with fields, update records, delete records, and maybe add additional columns. \n\n\n\n## Step 6. Perform Aggregations and queries\n\nImplement SQL statements and queries to perform aggregations and queries.\n\nsql_queries folder: \n\n1. query_aggregation.sql - use aggregation functions including COUNT, AVG, SUM.\n2. query_filter.sql - use WHERE to filter data based on conditions.\n3. query_sorting.sql - use ORDER BY to sort data.\n4. query_group_by.sql - use GROUP BY clause (and optionally with aggregation)\n5. query_join.sql - use INNER JOIN operation and optionally include LEFT JOIN, RIGHT JOIN, etc.\n\nUse Python to execute the SQL queries and maybe chart, illustrate, and/or summarize your findings:\n\ndb03_queries.py\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdenisecase%2Fdatafun-05-spec","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdenisecase%2Fdatafun-05-spec","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdenisecase%2Fdatafun-05-spec/lists"}