G
G
GF2021-01-07 14:53:15
MongoDB
GF, 2021-01-07 14:53:15

How to design entities?

one movie theater has many movies
one movie has many movie theaters
to calculate an array of sessions i need cinema + movie values.

those.

cinemas <--- many to many ---> movies
(cinema + movie) ---> sessions array

Where and how to store sessions array?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Andrey Ezhgurov, 2021-01-07
@eandr_67

Option 1. In a separate table containing a link to the table of cinemas, a link to the table of films, and information about the session. In this case, this table itself will be an extended (with duplicates) version of the many-to-many relationship table.
Option 2. In a separate table containing a link to the cinema-film many-to-many table and information about the session.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question