https://github.com/douglasdrake/sakila
SQL queries also performed in SQLAlchemy and pandas
https://github.com/douglasdrake/sakila
pandas python sql sqlalchemy
Last synced: about 4 hours ago
JSON representation
SQL queries also performed in SQLAlchemy and pandas
- Host: GitHub
- URL: https://github.com/douglasdrake/sakila
- Owner: douglasdrake
- Created: 2019-04-26T23:58:43.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2019-09-27T19:47:31.000Z (almost 7 years ago)
- Last Synced: 2025-05-19T19:55:55.354Z (about 1 year ago)
- Topics: pandas, python, sql, sqlalchemy
- Language: Jupyter Notebook
- Homepage:
- Size: 56.6 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Sakila
# Description
The Sakila sample database ships with MySQL. We show three ways to query the database:
1. With MySQL. Several queries in MySQL are given in `sakila-sample-queries.sql`.
2. With Pandas. While one could always pass the SQL statements in 1 with, `pandas.read_sql`, we choose to
use the functionality of the Pandas DataFrame to perform the same queries and joins as in 1. The
requests and results are given in the notebook `python-sakila.ipynb`.
3. With SQLAlchemy in Python. The queries in 1 are performed using SQLAlchemy's Object Relational Mapper and CORE language. Again, these queries could have been performed using the 'pass-through' option of directly passing
SQL statements; however, we choose to demonstrate the use of SQLAlchemy for these tasks.
These queries are given in `sqlalchemy-sakila.ipynb`.