Webinar 2 — Structure
Webinar recording:
Here you can find the structure for the second webinar.
| Week (date) | Agenda |
|---|---|
| 2 (31-05) | Recap and Q&A |
| Introduction to Design Theory (part one) | |
| - In-class exercise | |
| Pagila | |
| - Loading | |
| - SQL examples | |
| - Introduction to functions | |
| Psycopg2 | |
| - Basic usage | |
| - Homework solutions |
Please review the pre-recorded material before attending this webinar.
Material
Webinar materials:
- wn_2.ipynb: solutions for the hw_2.md via Psycopg2;
- ws_2.pdf: webinar slide;
- wsc_2.sql: interacting with Pagila.
Loading Pagila
Please, download the pagila-master. Then:
1). Open psql;
2). Create a new database and connect:
CREATE DATABASE pagila;
\c pagila;
3). Use \i to run the SQL script:
\i /PATH/TO/pagila-schema.sql;
\i /PATH/TO/pagila-data.sql;
Python set-up
Create a Python Environment
If you are a Pure-Python user do:
python3 -m venv my_env
Check venv for further reference.
If you are Conda user do:
conda create -n my_env python=3.x
Check conda create for further reference.
Install libraries
The requirements.txt contains Python libraries to install.
If you are a Pure-Python user do:
source my_env/bin/activate
pip install -r requirements.txt
If you are a Conda user do:
conda activate my_env
conda install --file requirements.txt
