Abstract database operations in load_census_data