Skip to the content.

Webinar 2 — Structure

Webinar recording:

webinar-2

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:

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