Skip to content

Latest commit

 

History

History
107 lines (68 loc) · 1.45 KB

README.md

File metadata and controls

107 lines (68 loc) · 1.45 KB

postgres-dse201


Introduction

Project in postgres for the DSE 201 course

Local Enviroment Setup with Docker


To setup app local enviroment install docker and run the following command on the root directory of the project, this will create containers for mysql and phpmyadmin:

docker-compose -f app.yaml up

Local Installation


Clone the repository or download the .zip file and extract it on the desired directory

Create a virtual environment with the command:

python -m venv venv

Activate the created enviroment:

source venv/bin/activate

Install the requirements for the project

pip install -r requirements.txt

Creating dbs

 python db/build.py settings.json build_schemas

Populating db

Create csv files

 python db/csv_data/generate_data.py

Insert with alchemy

 python db/build.py settings.json insert_alchemy

Insert query one by one

 python db/build.py settings.json insert_data

M2

 python db/m2/cats.py settings.json
 python db/m2/sales_cube.py settings.json

M3

 python db/m3/cats.py settings.json
 python db/m3/sales_cube.py settings.json

M4

 python db/m4/cats.py settings.json
 python db/m4/sales_cube.py settings.json

Tip


For database modeling use sqldbm