{"id":19734413,"url":"https://github.com/slott56/unlearning-sql","last_synced_at":"2026-03-06T19:05:55.327Z","repository":{"id":145172047,"uuid":"511281449","full_name":"slott56/unlearning-sql","owner":"slott56","description":"The examples from the Unlearning SQL book","archived":false,"fork":false,"pushed_at":"2025-05-14T23:29:37.000Z","size":20488,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-05-15T00:35:57.773Z","etag":null,"topics":["database","python","sql"],"latest_commit_sha":null,"homepage":"https://www.amazon.com/dp/B0DDMFMXNW","language":"Python","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/slott56.png","metadata":{"files":{"readme":"README.rst","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-07-06T20:23:21.000Z","updated_at":"2025-05-14T23:29:41.000Z","dependencies_parsed_at":null,"dependency_job_id":"abc2eb13-5760-4cfc-bd39-34903ced278e","html_url":"https://github.com/slott56/unlearning-sql","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/slott56/unlearning-sql","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/slott56%2Funlearning-sql","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/slott56%2Funlearning-sql/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/slott56%2Funlearning-sql/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/slott56%2Funlearning-sql/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/slott56","download_url":"https://codeload.github.com/slott56/unlearning-sql/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/slott56%2Funlearning-sql/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30192420,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-06T18:54:55.862Z","status":"ssl_error","status_checked_at":"2026-03-06T18:53:04.013Z","response_time":250,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6: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":["database","python","sql"],"created_at":"2024-11-12T00:36:48.404Z","updated_at":"2026-03-06T19:05:55.308Z","avatar_url":"https://github.com/slott56.png","language":"Python","readme":"################\nunlearning-sql\n################\n\nComponents and examples from the Unlearning SQL book.\n\nInstallation\n=============\n\nThere are several steps to getting this ready for experimentation.\n\n1.  Create a virtual environment with Python 3.12.\n    Use venv or Poetry or hatch or conda.\n\n    Conda example:\n\n    ..  code-block:: bash\n\n        conda create -n unlearning-sql python=3.12\n        conda activate unlearning-sql\n\n2.  Clone or download this https://github.com/slott56/unlearning-sql repository.\n\n3.  Change to the downloaded directory.\n\n    ..  code-block:: bash\n\n        cd unlearning-sql\n\n3.  Install required packages to run the demo applications.\n\n    ..  code-block:: bash\n\n        python -m pip install -r requirements.txt\n\n4.  Install the packages to do unit testing.\n\n    ..  code-block:: bash\n\n        python -m pip install -r requirements-test.txt\n\nUpgrades\n--------\n\nTo get **all** the latest and greatest versions of package, use pip-tools.\n\n..  code-block:: bash\n\n    pip-compile --upgrade\n    pip-compile --upgrade requirements-test.in\n\n    python -m pip install --upgrade -r requirements.txt\n    python -m pip install --upgrade -r requirements-test.txt\n\nGeneral Operation\n=================\n\nIn order to play with the examples, it's helpful\nto have a file named ``activate_source.csv``.\nThis file contains the raw data to be bulk-loaded\ninto the database.\n\nIt's also helpful, of course, to have a database.\nIn this case, it will be ``unlearning_sql.db``. \n\nTo build the file, and the database, execute\nthe following two steps:\n\n..  code-block:: bash\n\n    python src/fake_data.py\n    python src/sql_db_preparation.py\n\nThe ``fake_data.py`` program builds the ``activate_source.data`` file.\nThe ``sql_db_preparation.py`` program loads the database with some (but not all) of the fake data.\nThis omission of data permits some of the data validation rules to spot \nbad data in the input.\n\nMakefile\n=========\n\nThe ``Makefile`` has targets to help create files and databases.\n\n..  code-block:: bash\n\n    make sql_load\n\nThe ``sql_load`` target will build the fake data and populate the database if needed.\nIt will run the SQL-based loader application.\n\n..  code-block:: bash\n\n    make python_load\n\n\nThe ``python_load`` target will build the fake data and populate the database if needed.\nIt will run the Python-based loader application.\n\nDiagrams\n========\n\nThe diagrams were built with PlantUML. See https://plantuml.com for more information.\nThis is not required to run the demonstration applications.\nIt's handy for creating entity-relationship diagrams.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fslott56%2Funlearning-sql","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fslott56%2Funlearning-sql","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fslott56%2Funlearning-sql/lists"}