Designing the Python GUI database
Before we start creating tables and inserting data into them, we have to design the database. Unlike changing local Python variable names, changing a database schema once it has been created and loaded with data is not that easy.
We would have to DROP
the table, which means we would lose all the data that was in the table. So, before dropping a table, we would have to extract the data, then DROP
the table, recreate it, and finally reimport the original data.
You get the picture...
Designing our GUI MySQL database means first thinking about what we want our Python application to do with it and then choosing names for our tables that match the intended purpose.
Getting ready
We are working with the MySQL database we created in the previous recipe, Configuring the MySQL database connection. A running instance of MySQL is necessary and the two previous recipes show how to install MySQL, all necessary additional drivers, as well as how to create the database we are...