Description
In the previous stages, you have developed a system for inputting supplier orders, but they get deleted after closing the program. In this stage, you need to implement an SQL database with SQLite that will keep track of the incoming orders.
Objectives
To complete this stage, your program should perform the following two things:
- Store an incoming order in an SQL database after submitting a supplier;
- The data should remain after you reboot the application;
- The interface of the program remains the same as in the previous stage.
The program should parse the name of the database as a parameter from the RootWindow class. For this, you need to arrange three things:
- The SQL Database should have a table named
supplier_orders; - As for columns, they should include
supplier_name,wine_type(Merlot,Sauvignon, orRose),amount_purchased(number of bottles),price_paid, andis_paid; - Optionally, you could have the
order_idcolumn that auto increments after adding a new order.
Tip: If you're new to SQL, you can use DB Browser for SQLite to visualize your database as you build and test your SQL statements.