This is the report for
- Sofi Flink,
[email protected]
- Simon Tenggren,
[email protected]
We solved this project on our own, except for:
- The Peer-review meeting
- Stackoverflow
- Some code re-used from laboration 3.
The model is in the file Krusty Kookie AB UMLv3.png
:
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):
- recipes(rec_name)
- ingredients(ing_name, unit, amount, date_of_deliv, size_of_deliv)
- rec_ing(rec_name, ing_name, amount)
- customers(c_name, address, phn_nbr)
- orders(order_id, delivered_by, c_name)
- pallets(pallet_id, status, prod_date, rec_name, order_id)
- deliveries(delivery_id, delivery_date)
- delivery_info(delivery_id, order_id, amount_delivered)
- blocked(rec_name, start_date, end_date)
- order_info(rec_ name, order_id, no_pallets)
The scripts used to set up and populate the database are in:
create-schema.sql
(defines the tables), andinitial-data.sql
(inserts data).
So, to create and initialize the database, we run:
sqlite3 krusty-db.sqlite < create-schema.sql
sqlite3 krusty-db.sqlite < initial-data.sql
Before compiling and running the program make sure you have the latest version of openJDK and openJFX installed. To run the program run the following commands after downloading the repositry and navigating to the folder ETAF75-KrustyKookies:
javac -d bin/ -cp src Kookie/src/application/Main.java
java -cp bin:Kookie/sqlite-jdbc-3.21.0.jar application.Main