Inserting data to the database.