In this sentence
Es gibt eine Brücke über den Fluss.
den is used after the preposition über. Why is it in accusative case and not dative case? In other words, why don't we say über dem Fluss?
In this sentence
Es gibt eine Brücke über den Fluss.
den is used after the preposition über. Why is it in accusative case and not dative case? In other words, why don't we say über dem Fluss?
The preposition über is a so-called Wechselpräposition. That is, depending on context, it can be used with dative case (to indicate a location) or with accusative case (to indicate a direction). Often, the verb already implies which case is to be used.
Dative case is used typically to express where something is located (in German sich befinden):
Die Brücke befindet sich über dem Fluss.
⇆ The bridge is located above the river.
Accusative case is used typically to express a direction:
Die Brücke führt über den Fluss.
⇆ The bridge leads over the river.
In the original sentence, the verb gibt does not indicate location or direction. Still, the case that the writer chose tells you what he had in mind [I will indicate this with square brackets]:
Es gibt eine Brücke [und die führt] über den Fluss.
⇆ There is a bridge [and it leads] over the river.
In German, it's always important to tell apart locations and directions.
E.g. with über die Brücke you give a direction rather than a location, as the two-way preposition über indicates a direction when used with accusative case.
Die Straße führt über die Brücke.
The road runs from here to the other side across the bridge. That's a direction. You can make this out easily even when describing the situation in English: as soon there's a to in your description, it's likely a direction in the German sense as well. Compare:
Der Mond steht über der Brücke.
The moon is visible above the bridge. That's a location.
Now your example:
Es gibt eine Brücke über den Fluss.
That verb phrase es gibt does not imply location nor direction. It just states there is and it takes a lone accusative object. But this accusative object isn't eine Brücke.
But eine Brücke über den Fluss.
That's a complex object that includes an adverbial über den Fluss. And same as with my road example, the bridge runs from one bank to the other across the river. That's what bridges do.
You may find this complicated as now you have to understand what bridges do. Or other things. If it connects two ends, you can be pretty sure that its relations are given as directions. Or you drill it for classes of things. Sorry about that.