Adding data to a database

Now that we have created a database (exampledb) and added an entity (person) to this database it is time to add some data to the database.

There are two ways of accomplishing this:

  1. Writing each individual SQL INSERT statement and sending them to the MySQL server via a Python script
  2. Creating a form which will allow us to enter the data and then processing the form with another Python script

We will investigate both methods but we shall look at writing a few sample SQL insert statements first.

Inserting data into the person entity

The video below demonstrates how to insert data into the person entity using the INSERT statement:

Task 8

Using the information above, add some records to the person entity.