Relative clauses
A relative clause describes a noun and puts the finite verb last. The relative pronoun agrees with the noun’s gender and number, but its case comes from its job inside the relative clause. Nominative: der, die, das, die. Accusative masculine: den. Dative: dem, der, dem, denen.
Understand the idea
A relative clause adds information about a noun or pronoun. The relative pronoun links it to its antecedent, but it also has a grammatical job inside its own clause. That is why its case can differ from the antecedent's case.
Build it step by step
Choose gender and number from the noun being described. Choose case from the pronoun's role inside the relative clause or from a preposition. Place the finite verb at the end and use commas around the relative clause. Masculine nominative der, accusative den and dative dem make the different roles particularly visible.
See it in a sentence
Das ist die Frau, die hier wohnt.
Das ist der Mann, den ich kenne.
A useful memory aid
Temporarily turn the relative clause into a normal sentence. Work out its missing noun phrase's role, then restore the relative pronoun.
A common trap
Do not copy the antecedent's case automatically. The noun may be accusative in the main clause while its relative pronoun is nominative in the relative clause.