These pronouns are to identify and selec a person or thing that is to further be identified in a Relativsatz (=clause connected by a relative pronoun or relative particle) or following attribute. When no ambiguity results, these pronouns are used in their short form der, die, dem. Examples:
Der Laden verkaufte die (=diejenigen) Bücher, die beschädigt waren.
Ah, du bist der (=derjenige), welcher....
Ja, es ist demjenigen (=dem) so ergangen der zu spät da war.