-
Notifications
You must be signed in to change notification settings - Fork 0
Description
Maybe we should add a new module about SQL, talk about SQL database integrations in Python, and then talk about duckdb and polars.
The SQL content is relevant by itself, outside of a Python context, so we might want to create a separate website / book for that and reference it here. But perhaps starting with that content in this book would be ok too because if someone is interested in SQL we can always point them at specific chapters in this book and they don't have to consume the rest.
Tools
chinook example db:
https://github.com/s2t2/chinook-database
table plus: https://tableplus.com/
FYI - can also query directly in colab using query cells
SQL
sql content based on previous lessons:
https://github.com/s2t2/lambda-ds-3-2
sql exercise:
https://docs.google.com/document/d/1f2pXNDHnyIGVaONfkvxQAmN-H_Gqv3iN06BkJ_B0vOk/edit?tab=t.0#heading=h.g5bhw0mala0q
sql exercise solutions (let's use a collapsable hint to provide the solutions, so the reader can try on their own first, and then check their work later. see RPS exercise in intro book for example of collapsable hints):
https://docs.google.com/document/d/14PZkeYAZa4gfuRHiEurW8EpQy_SRX4Ag4_WzFJGuiGg/edit?tab=t.0#heading=h.g5bhw0mala0q
QUERYING PANDAS DATAFRAMES USING SQL
DB INTEGRATIONS IN PYTHON
python database integration chapters:
relational:
- https://github.com/prof-rossetti/intro-to-python/blob/main/notes/python/packages/psycopg.md
- https://github.com/prof-rossetti/intro-to-python/blob/main/notes/python/packages/pymysql.md
- https://github.com/prof-rossetti/intro-to-python/blob/main/notes/python/packages/bigquery.md
- https://github.com/prof-rossetti/intro-to-python/blob/main/notes/python/packages/sqlalchemy.md
nosql:
Notebooks
SQLite and BQ:
https://colab.research.google.com/drive/1eXKurkurAIvIHHaFSG4r6xY4bX0IEt-x?usp=sharing