Skip to content

SQL Module #15

@s2t2

Description

@s2t2

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

#14

#10

DB INTEGRATIONS IN PYTHON

python database integration chapters:

relational:

nosql:

Notebooks

SQLite and BQ:
https://colab.research.google.com/drive/1eXKurkurAIvIHHaFSG4r6xY4bX0IEt-x?usp=sharing

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions