Updated Code to insert data into database. Reflects changes made on yellowstone projects.