Convert database reference data from CSV to SQL