This is the report for
- Filip Cederquist,
mat13fce
- Nellie Duhs,
tpi14ndu
We solved this project on our own, except for:
- The Peer-review meeting
The model is in the file er-model.png
:
The image above describes our suggested ER-model.
The ER-model above gives the following relations (neither Markdown nor HTML5 handles underlining withtout resorting to CSS, so we use bold face for primary keys, italicized face for foreign keys, and bold italicized face for attributes which are both primary keys and foreign keys):
- cookies(cookie_name)
- recipes(amount,cookie_name, ingredient_name)
- ingredients(ingredient_name, unit)
- ingredient_transitions(transfer_date, quantity, ingredient_name)
- orders(order_id, order_date, wanted_date)
- order_specifications(order_id, cookie_name, quantity)
- pallet(bar_code, prod_date, prod_time, state, blocked, delivery_date, delivery_time, order_id, customer_name)
- customer(customer_name, address)
The script used to set up and populate the database is in:
database.sql
(defines the tables and inserts data)
So, to create and initialize the database, we run:
sqlite3 db.sqlite < database.sql
To compile and run the program from the command line type:
python3 api.py