Consider the following sentence:
Die Oper - Die Oper ist eine alte Kunstform, bei der die Schauspieler eine Geschichte mit Gesang erzählen. Begleitet werden sie von einem Orchester.
I managed to translate this as -
The opera is an old type of art, where the actors tell a story with singing. They are accompanied with an orchestra.
My questions concerns the use of "bei der".
I know that relative pronouns must relate to the case and the gender of the previous noun, hence the noun Oper has the gender "die."
I'm just confused about the case of the noun "Die Oper" when using "bei der".
I found that in the dative case, die turns into der, but I can't seem to work out why.
Unless I am incorrect,
Why is this case the dative case?