The Soda Pop
HomeBlogAbout Me

Movie Database 1 1



Schema description

  1. Movie Database 1 1 Full
  2. Movie Database 1 1 0

The Movie Database (TMDb). updated 3 years ago (Version 2) Data Tasks (2) Notebooks (1,552) Discussion (54) Activity Metadata. Download (44 MB) New Notebook. Limitations: 1) automatically uploads movies that you enter to our database whenever you search our database 2) stats form disabled. 3) limited to 15 movies being viewed (but can enter more than that).

1 Relational schema

2 Entity relationship schema

1 Relational schema

Let us consider a database on movies and informations about (actors, directors and so on). This database is inspired from the movie database.The relational schema of this database is described as follow :

  • MOVIES (id, title, yr, score, votes, director)
  • ACTORS (id, name)
  • CASTINGS (movieid, actorid, ord)
  • DIRECTORS(id, name)
A movie is described by an identifier (integer, key of the table), a title, a year (first release of the movie), a score (average of all votes cast for the movie), a number of votes and a director (integer, foreign key to id in DIRECTORS).

Movie Database 1 1 Full

An actor is described by an identifier (integer, key of the table) and a name.

An actor may play a role in zero to several movies and in a movie we have one to several actors who play in. https://liblast619.weebly.com/free-siberian-storm-slots.html. The ord attribute precise the rank of the actor in the movie. The couple (actorid, movieid) is a key for the table. actorid is a foreign key on ACTORS and movie id is a foreign key on MOVIES.

A director is identified by an id (integer, key of the table) and a name.

2 Entity relationship schema

https://downmload132.weebly.com/free-fun-slots-with-bonus-games.html. The entity relationship schema contains three entities, MOVIES, ACTORS and DIRECTORS, and two relationships, CASTING and ISDIRECTEDBY.

Vuescan 9 linux crack. The entity MOVIES represents the set of movies. Twixl publisher pro 10 6. The key attribute is 'id'.

The entity ACTORS represents the set of actors. The key attribute is 'id'. Gimp 2 10 4.

The entity DIRECTORS represents the set of directors. The key attribute is 'id'.

The relationship 'CASTINGS' represents the set of actors' participations on movies. Is is a many-to-many relationships between MOVIES and ACTORS.

Graphicriver book mock up 7148762 download free. The relationship 'IDDIRECTEDBY' represents the director of a movie. It is a one-to-one relationship beteween MOVIES and DIRECTORS.

The cardinalities define precisely the semantic of the links between MOVIES, ACTORS, ISDIRECTEDBY, DIRECTORS and CASTINGS.
The cardinality 1,n between MOVIES and ACTORS can be read as ' a movie may have from 1 to n actors playing in'.
The cardinality 1,n between ACTORS and CASTINGS may be read as 'an actor may have played in 1 to n movies'.
The cardinality 1,1 between MOVIES and DIRECTORS may be read as 'a movie is directed by one and only one director'.
The cardinality 1,n between DIRECTORS and MOVIES may be read as 'a director may have directed 1 to n movies'.

Movie

Movie Database 1 1 0

The principle of the translation between the entity relationship schema and the relational schema is the following :
The entity MOVIES is translated to a relation MOVIES, with the key 'id' and with the attributes 'title', 'yr', 'score', 'votes' and 'director'.
The entity ACTORS is translated to a relation ACTORS, with key 'id' and attribute 'name'.
The entity DIRECTORS is translated to a relation DIRECTORS, with key 'id' and attribute 'name'.
The relationship CASTINGS is translated to a relation CASTINGS with the attributes 'actorid', 'movieid' and 'ord'. 'actorid' references an actor in the relation ACTORS. 'movieid' references a movie in the relation MOVIES. actorid and movieidare foreign keys respectively to ACTORS.id and MOVIES.id, defining referencial integrity constraints ACTORS and MOVIES.The key of the relation CASTINGS is the couple .
The relationship ISDIRECTEDBY is translated by the inclusion of a foreign key (director) to DIRECTORS into the MOVIE table.





Movie Database 1 1
Back to posts
This post has no comments - be the first one!

UNDER MAINTENANCE