Why is sentence in dative? I work in a supermarket - Ich arbeite in einem Supermarkt.
A good rule of thumbs is to see whether the preposition tells you where you are = the place you are. In this case the preposition requires the dative case.
If you get told "where to" = where you go to. Here you need the accusative case.
I work in the supermarket. = Where do I work?
I go to the supermarket. = Where do I go (to)?
I hope that helps.. ;-)
Prepositions tell you a lot about which case the following noun should take. In this sentence, "in" is the preposition. "In" can be followed by either dative OR accusative. How do we know the difference?
Accusative = motion. "Ich gehe in den Supermarkt."
Dative = no motion. "Ich stehe im [in dem] Supermarkt."
Often, the verb can clue us in on whether there is motion or not. Gehen, fahren, laufen - these are some examples of verbs that indicate motion.