This recipe presents the entire Python code that shows you how to create and drop MySQL databases and tables, as well as how to display the existing databases, tables, columns, and data of our MySQL instance.
After creating the database and tables, we will insert data into the two tables we will create in this recipe.
We are using a primary key to foreign key relationship to connect the data of the two tables.
We will go into detail about how this works in the following two recipes, where we will modify and delete the data in our MySQL database.