new version of get_database

for checkbox selection