S
S
s1vemod2021-01-09 08:48:06
Database design
s1vemod, 2021-01-09 08:48:06

How to properly design a movie database?

Good afternoon. I think how best to design the database, the problem is that there will be a lot of duplicate data, but they all refer to different films and I can’t know their exact number . I took SQLITE
for the database . There is a film, and it has many cinemas, each cinema also has a lot of time. How to properly design a database?


Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
Dr. Bacon, 2021-01-09
@bacon

This task is for learning, this must be solved independently.
You write the first version, you start working with it, you understand where it is wrong / inconvenient, you write the second version, you start working with it .. and so on until you're blue in the face. The end result is a real experience.
PS When designing a database, one must take into account not only the object, but also what work will be done with it in the future, roughly speaking, the structure of the database for selling tickets and for "what movie, where is it now" can differ significantly.

V
vzKY9P, 2021-01-09
@vzKY9P

I would make tables фильмы, времена, кинотеатры; then the table sessionswould store in it фильм_id-кинотеатр_id-время_id.

offtopic
Есть большой шанс того, что кинотеатры и время у многих фильмов совпадают.

Т. е., в большом количестве кинотеатров два зала?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question