This is the report for
- Ennio Mara,
en0067ma-s
- Christian Bilevits,
ch8466bi-s
We solved this project on our own, except for:
- The Peer-review meeting
The model is in the file er-model.png
:
- recipes(id, name)
- pallets(id, productionDate, isBlocked, location, deliveryTime, recipeId, orderId)
- orders(orderId, latestDeliveryTime, customerId)
- customers(id, name, address)
- orderRecipeAmount(amount, orderId, recipeId)
- recipeIngredients(recipeId, rawMaterialId, amount)
- rawMaterials(id, name, amount, unit, lastDeliveryAmount, lastDeliveryTime)
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 server/KK-SwedenDB.db < database/create-schema.sql
sqlite3 server/KK-SwedenDB.db < database/initial-data.sql
The program is split into two parts, the server that contains the API and the client that consumes the API.
First of all install the client's required npm packages by running. This only needs to run once.
npm install --prefix ./client
Then start the server and client by running them in different terminal windows:
./server/gradlew bootRun -p server
npm start --prefix ./client