Wrote function to import csv to database tables