refactor Database::makeSelectOptions