Consider the following two sentences, I have shown them to a native German speaker and both make sense to them:
Ich gebe dem Hund den Ball.
Ich gebe den Ball dem Hund.
The cases make it clear that the ball is being given to the dog, regardless of word order ("dem Hund den Ball" or "den Ball dem Hund").
I could write the first sentence in English, just as it is written in German:
I give the dog the ball
The second sentence though, needs the preposition "to" in English, because the direct and indirect object are not clear (the definitive article is the same for the direct and indirect object in English "the"):
I give the ball to the dog
I thought "can/should I add a preposition to my German sentence"? The following doesn't work in German (according to my native speaking test subject):
Ich gebe den Ball zum Hund.
Ich gebe den Ball nach dem Hund.
I tried "zu" and "nach" because they can mean some form of "to", and they are dative prepositions preceding the dative article + noun, but my test subject said this is wrong.
Why isn't a preposition allowed for this second German sentence? The cases in German indicate the subject, object (Akkusativobjekt), and indirect object (Dativobjekt), so I can understand how no preposition is needed in either of my two sentences in German. But this leaves me with the question: when would/should I add a preposition in German?
Searching the Internet for "German prepositions" (and variations thereof) just provides page after page of "these are the prepositions and which case they're in" but no indication of when to use them. My gut feeling is that it's related to the verb, but when I look on the Duden website or PONS, it's not clear if geben (from my example sentences) requires an object in the Akkusativ or Dativ or both:
jdm etw geben which I interpret as "this verb needs a Dativ and Akkusativ object". But Duden gives an example with only Akkusativ
die Kuh gibt Milch.