Updated example to show how to insert data into database