callback for db records ids