der Frau = indirect object and dative
der Frau = direct object and accusative
den Apfel = indirect object and dative
I give the apple to the woman. Ich gebe den Apfel der Frau.
Emphasis is on the last word of the sentence.
Ich gebe den Apfel der Frau
not to the kid
Ich gebe der Frau den Apfel
not the bread