getDataFromDatabaseForKeys supports ordering