Parses, formats data and inserts into a database.