I am designing a database for the film industry (personal exercise).
- Each film was made by a company.
- A company produces one or more movies.
- Each movie has one or more genres (action, horror, etc...)
- Every movie has one or more actors.
- Each film is directed by one or more directors (it is possible for a director to act in a film, including the one he is directing).
- Every movie has zero or more lines said by an actor.
- Each actor has a role in the film.
I still can't correctly identify the Dependencias Funcionales
and the Dependencias Transitivas
.
--EDITED--
I wear this so far...
ER model:
Diagram in SQL Server:
My questions are:
- How do I identify which would be intermediate tables?
- Trying to follow the rules that I indicated above, how can I take my scheme to the Third Normal Form?
I am very confused, I hope you can help me, thanks in advance.
I think it could be an example like this:
1.- Each movie can have several genres:
tabla_pelicula
------->tabla genero-pelicula
<--------tabla genero
genero-pelicula
id_pelicula
id_genero
In this way you can assign several genres to the same movie, which would only be related by the movie id and genre.
You have to think in which table there can be, you go from an element of the same table
tabla actor
----->tabla película
<--------tabla director
.Here yes, each table has its own primary id and they are related in the movie table.
It is the same case for sentences.
tabla actor
---->tabla frases
<-------tabla pelicula
the phrases table should have a
id principal
since you will be adding data there unlike the tablegenero-película
because that will only allow you to be relating a movie with its genre.