Inserting data into database.