r/learndatascience • u/Sea-Ad7805 • 5d ago
Resources Learning SQL with Python?
This 👉interactive SQLite demonstration helps student understand relational databases.
The sqlite3 extension of 𝐦𝐞𝐦𝐨𝐫𝐲_𝐠𝐫𝐚𝐩𝐡 makes database content visible alongside Python's data structures. The demo shows how to:
Create tables with primary and foreign keys.
Model relationships between students, courses, and teachers.
Insert data and observe how the database changes.
Combine multiple tables using SQL JOIN operations.
Use parameterized queries.
The final query answers a seemingly simple question: Which teachers teach Alice, and for which courses? Answering this question involves joining five tables!
With 𝐦𝐞𝐦𝐨𝐫𝐲_𝐠𝐫𝐚𝐩𝐡, students can step through the Python program and inspect the database content at every step, directly in their browser, without installing anything.
3
u/Darknessgg 5d ago
Thanks
1
u/Kotaiche_Konda93 3d ago
joining five tables just to connect students to teachers is usually when junction tables finally start making sense
1
u/ownroot 4d ago
Why not with SQL?