Académique Documents
Professionnel Documents
Culture Documents
A Project Report
on
Submitted by:
Aashirwad Bhattarai (8)
aashirwad.bhattarai1@gmail.com
Pratik Khadka (24)
Bishal Shah (39)
Joshan Shrestha (42)
joshans92@gmail.com
Submitted to:
Mr. Santosh Khanal
Department of Computer Science and Engineering
Submission Date: July 20, 2019
PROJECT REPORT
ON
“Movie Database System”
Approved By:
Mr. Santosh Khanal
Assistant Professor
_______________
(Signature)
Abstract
We would like to submit our proposal on “Movie Database System” as our mini
project on Database Management System to meet the requirement of course COMP
232.
Movie is something we all watch and enjoy as it is one of our favorite time pass.
We often like to see information about the movie we like. Gathering such
information can be tedious and time consuming so we have to develop a web
application named as “Movie Database”. It is an online system where the user can
view information about various movies stored in the system.
We intended to use Python and MySQL to build this project and the database
required to do so. This project will be made with the main idea of making it
practical in the real-world scenario.
We hope by doing this project, we will have a better understanding of how
database work and how they can be used in a practical and time-saving manner.
We also hope to improve our programming skills and gain necessary experience to
benefit us in our future project.
Project Members:
Aashirwad Bhattarai
Bishal Shah
Pratik Khadka
List of Entities and Attributes
An entity is any object represented in the database system that we want to model
and store information about. Entities are usually recognizable concepts, either
concrete or abstract, such as person, places, things, or events which have relevance
to the database .The entities used in Movie Database System are listed below:
1. Movie: - This entity keeps track of all the information about the movies that is
stored in the database. The attributes of assignments are:-
a. movie_id:- It is a primary key which is a unique value given to a movie.
b. movie_name: - This attribute defines the name of the movie which is
stored in the database.
c. country:- This attribute defines the name of the place where movie was
made.
d. rating:- This attribute defines the rating of a movie.
e. length:- This attribute defines the length of a movie.
f. plot:- This attribute defines the plot of the movie.
g. releasedate:-This attribute defines the release date for a movie.
h. movie_image:- This attribute keeps link of the image of a movie.
2. Director: - This entity helps to store all the information related to the director
for each movie. The attributes of director are:-
a. movie_id:- It is a foreign key.
b. director_id:- It is a primary key which is a unique value given to a director.
c. director_fname:- This attribute keeps record of first name of the directors.
d. director_lname:- This attribute keeps record of last name of the directors.
e. director_address:- This attribute keeps record of addresses of the directors.
f. director_dob:- This attribute keeps record of date of birth of the directors.
g. director_accolades:- This attribute keeps record of achievement and
awards, the director has achieved.
h. director_image:- This attribute keeps the link of image of the director.
3. Actor: - This entity helps to store all the information about the actors/actress
involved in the movie. The attributes of users are:-
a. actor_id:- It is a primary key which is a unique value given to an
actor.
b. actor_fname:- This attribute keeps record of first name of the actors.
c. actor_lname:- This attribute keeps record of last name of the actors.
d. actor_address:- This attribute keeps record of addresses of the actors.
e. actor_accolades:- This attribute keeps record of awards, the actor has
received.
f. actor_dob:- This attribute keeps record of date of birth of the actors.
g. actor_image: This attribute keeps the link of image of the actor.
4. Genre:- This entity helps to define the category i.e. Drama, Sci-Fi, Action, etc.
the movie is related to. There is a single attribute for genre given below.
a. genre_id:- :- It is a primary key which is a unique value given to a
genre.
b. genre_name:- This attribute keeps record about the category of the
movie.
5. Writer: - This entity includes all of the information and details about the writer
involved in the movie. The attributes of the writers are listed below:
a. writer_id:- It is a primary key which is a unique value to a writer.
b. writer_fname:- This attribute keeps record of first name of the writers.
c. writer_lname:- This attribute keeps record of last name of the writers.
d. writer_address:- This attribute keeps record of addresses of the
writers.
e. writer_accolades:- This attribute keeps record of awards the writer has
received.
f. writer_dob:- This attribute keeps record of date of birth of the writers.
g. Writer_image:- This attribute keeps the link of image of the writer.
7. Composer: - This entity includes all of the details about the composition of
the movies. The attributes of composer are:
a. composer_id:- It is a primary key which is a unique value given to a
composer.
b. composer_fname:- This attribute keeps record of first name of the
composers.
c. composer_lname:- This attribute keeps record of last name of the
composers.
d. composer_address:- This attribute keeps record of addresses of the
composers.
e. composer_accolades:- This attribute keeps record of the awards the
composer has received.
f. composer_dob:- This attribute keeps record of date of birth of the
composers.
g. composer_image:- This attribute keeps the link of the image of the
composer.
8. ActorMovie: This entity includes information about id of actor and movie:
a. actormovie_id: It is a primary key that gives a unique value.
b. actor_id: It is a foreign key.
c. movie_id: It is a foreign key.
11. GenreMovie: This entity includes information about id of genre and movie:
a. genremovie_id: It is a primary key that gives a unique value.
b. genre_id: It is a foreign key.
c. movie_id: It is a foreign key.
Candidate keys
A candidate key is a column, or set of columns, in a table that can uniquely
identify any database record without referring to any other data. Each table may
have one or more candidate keys, but one candidate key is unique, and it is called
the primary key. The candidate keys used in Movie Database System are listed
below:
Genre genre_id
Composer composer_id
Writer writer_id
Primary key
A primary key is a special relational database table column (or combination of
columns) designated to uniquely identify all table records. A primary key's main
features are:
It must contain a unique value for each row of data. It cannot contain null values.
The primary key used in classroom management system is:
Entity Primary Key
Movie movie_id
Director director_id
Actor actor_id
Genre genre_id
Composer composer_id
Writer writer_id
Foreign Key
A Foreign Key is a field (or collection of fields) in one table that refers to the
Primary Key in another table.
Fig : ER Diagram
Indexing
Indexing is a way to optimize performance of a database by minimizing the
number of disk accesses required when a query is processed. An index or database
index is a data structure which is used to quickly locate and access the data in a
database table. Indexes are created using some database columns.
1. The first column is the Search key that contains a copy of the primary key or
candidate key of the table. These values are stored in sorted order so that the
corresponding data can be accessed quickly (Note that the data may or may
not be stored in sorted order).
2. The second column is the Data Reference which contains a set of pointers
holding the address of the disk block where that particular key value can be
found.
4. Writer
writer_id - writer_fname
writer_id - writer_lname
writer_id - writer_address
writer_id - writer_dob
writer_id - writer_accolades
writer_id - writer_image
5. Composer
composer_id - composer_fname
composer _id - composer _lname
composer _id - composer _address
composer _id - composer _dob
composer _id - composer _accolades
composer _id - composer _image
6. Genre
genre_id - genre_name
Front-End design
Database Script