new version of get_database

for the checkboxes selection