updated getdatadb to retrieve by id