GEAD is a Flask full-stack web app to manage a MySQL/MariaDB database tracking the relationships between energy providers and municipal consumers in different countries.
-
In a Python virtual environment, execute
pip install -r requirements.txt
-
In your database management tool of choice
- Create a new database
- Execute
database/GEAD_DDL.sql
to create the tables - Optionally, execute
database/SAMPLE_DATA.sql
to insert sample entries
-
Create a
site/.env
file containing the following parametersDBHOST
- host of MySQL/MariaDB databaseDBUSER
- database usernameDBPW
- user passwordDB
- name of databasePORT
- port number to run app on
-
Execute
app.py
Records the present operation of a specific provider in a specific country.
Countries
can contain multipleProviders
Providers
can operate in multipleCountries
Records a type of energy generated by the provider.
Providers
can offer multipleEnergy_Types
Energy_Types
can be offered by multipleProviders
Records the ongoing provision of an energy type from a provider to a consumers.
Providers
can provide multipleEnergy_Types
to multipleConsumers
Consumers
can receive multipleEnergy_Types
from multipleProviders
Each table has an HTML interface featuring CRUD operations to Read the table, Create new entries, and Update and Delete entries inline.
- Where null values are allowed, they may be entered by inputting "null" (case-insensitive), or leaving the field blank.
- Deletion of rows from any of these tables deletes all M:N entries which reference them, save for the
Countries
table delete operation, which updatesNational_Operations
references to deleted countries to NULL.