ICT704: MongoDB Database System Task-2 Report - October 2018

Verified

Added on  2023/06/03

|8
|1371
|154
Report
AI Summary
This report, submitted by Rajan Shrestha (Student ID: 1113861) for the ICT704 Non-Relational Database Systems course, analyzes a MongoDB database designed for the "Movie Maniacs" website. The report begins with a database description, detailing the structure and fields of the "rajanmovies" database, which includes a "Movies" collection with fields such as "Movie ID", "Movie Name", "Leading Actors", and an array for "Reviews". It explores embedded and normalized data modeling approaches within MongoDB, offering examples and discussing their respective advantages. The report also justifies the selection of indexes on fields like "Directors", "Movie ID", and "Ratings" to optimize search performance. Finally, it provides recommendations for enhancing the database, including improved review capabilities, data constraints, data replication, and the use of GridFS for large data storage, along with sharding for scalability.
tabler-icon-diamond-filled.svg

Contribute Materials

Your contribution can guide someone’s learning journey. Share your documents today.
Document Page
ICT704 NON-RELATIONAL DATABASE SYSTEMS
Task-2 Report MongoDB
OCTOBER 5, 2018
Rajan shrestha
Student ID: 1113861
tabler-icon-diamond-filled.svg

Secure Best Marks with AI Grader

Need help grading? Try our AI Grader for instant feedback on your assignments.
Document Page
ICT704 Non-Relational Database
Contents
Database Description..................................................................................................................................2
Alternative modeling..................................................................................................................................3
Justification of Indexes chosen...................................................................................................................5
Recommendations......................................................................................................................................6
References..................................................................................................................................................7
5 Oct 2018 1 1113861
Document Page
ICT704 Non-Relational Database
Database Description
Movie Maniacs is a website which provides a list of top movies. Since, they have decided to
make a page by using MongoDB database in which their followers can see, rate and give
comment on those movies in the lists. MongoDB is an open source database which is falls under
the NoSQL database. NoSQL database works based on BASE principles whereas relational
databases are based on ACID theorem (Surati & Shah, 2015). Movie Maniacs is using MongoDB
as a NoSQL database here instead of Relational database due to its certain complexity like use
of pre-defined schemas where as in NoSQL database, it has different structured data and
schemas. It also has a flexibility of building documents without pre-defining their structure.
Additionally, we can use indexes in MongoDB to have an efficient search of collections in the
database.
MongoDB is very useful and scalable database which includes the following characteristics:
variety of queries, storage-oriented documents, use of map-reduce, quick updates, facility of
indexes use and replication of data (MongoDB Manual, n.d).
There is a description below of MongoDB database that has been used for Movie Maniacs.
“rajanmovies” is given as the name of the Movie Maniacs database.
It has used only one collection in this database which is called “Movies”.
The database has some different fields such as “Movie ID”, “Movie Name”, “Leading
Actors”, “Release Date”, “Oscar Won”, “Country”.
It also has one array list used in the database which is named “Reviews” and has one
sub-documents.
In “Reviews” documents, it has included Reviewed By, Comments, Date, Ratings.
The document has also used indexes for the database. Indexes has been created on the
following fields such as Directors, Movie ID and Ratings. The main reason of using these
indexes is to help in searching for those three fields easily on the database. These three
fields do not contain any null value in the database.
5 Oct 2018 2 1113861
Document Page
ICT704 Non-Relational Database
In this MongoDB database, the concept of relationship has been used. For instance,
embedded data structure. “Embedded documents can capture relationships between
data by storing related data in the single document format” (Data Modeling
Introduction, n.d).
There is one to many and one to one relationship can be seen in this MongoDB
database. For instance, movie can be directed and reviewed by many directors and
many viewers respectively in one to many relationships.
Alternative modeling
In MongoDB, to achieve an application goal, it is essential to use an effective data structure.
There are given two alternative data models below:
1. Embedded data models
In MongoDB, related data can be embedded in a single document which is also known
as denormalized schema. This data models requires only some queries to operate the
database operations. It uses dot notation to access the embedded data within the
database. In general, the use of embedded data models helps to get better
performances and easily helps in read and retrieval of data. This model work very well
with both one to one relationship and one to many relationships. For instance, the
following queries are the embedded data for the Movie Maniacs database which is
shown below:
5 Oct 2018 3 1113861
tabler-icon-diamond-filled.svg

Secure Best Marks with AI Grader

Need help grading? Try our AI Grader for instant feedback on your assignments.
Document Page
ICT704 Non-Relational Database
In the above query, Reviews is an embedded sub documents consisting of ReviewedBy,
Date, Rating, Comments. Additionally, we can also see that there is one to many
relationships. For example, MovieID 11 has been reviewed by two audiences.
2. Normalized data models
Relationships are structured by using references in the documents which is considered
as normalized data models. When there is a lacking in reading performance due to
duplication of data in embedded data then it is good to use of normalized data models.
This model offers good flexibility, quick consistency, and can handle complex
relationships like many to many relationships. In Movie Maniacs database, one good
example of normalized data model as many to many relationships is given below:
5 Oct 2018 4 1113861
Document Page
ICT704 Non-Relational Database
(Source: MongoDb Many -to-Many Relationship Data (n.d))
Justification of Indexes chosen
Indexes are considered as data sets which hold location information regarding a piece of data.
These data are saved in the database and use of indexes helps to search the related information
easily and quickly. As a result, it helps to run the operation fast. Indexes are created on the
database based on attributes such as MovieID, Rating, Directors in the Movie Maniacs
database. The main purpose of indexes is to locate the location of a piece of data on the
memory or disk which retains the records of the information.
The following attributes: Director, Ratings and MovieID have been created as an index in the
Movie Maniacs database system. The reason for choosing these attributes as an index is that
these attributes can help the user to locate attribute values and assists to see their values which
begins with something other than a key (Sullivan, 2015). Thus, it helps to enhance the reading
capacity of the database.
5 Oct 2018 5 1113861
Document Page
ICT704 Non-Relational Database
The following queries are for creating indexes for the Movie Maniacs database:
Recommendations
As a recommendation, the following things should be considered to make Movie
Maniacs database better in future.
There should be facility for audiences or viewers to review more movie than one movie.
The use of constraints in the database could help to ensure the reliability and accuracy
of the data in the database. Constraints are the rules which are applied on the columns
of the tables to prevent from inconsistencies of the data.
There should be replication of data since the database is used for web sites. Replication
of data on different servers will prevent and recover the data even if there is a loss of
data on the one system.
Another major recommendation is use of GridFS specification in MongoDB which helps
to store and retrieve big and large data such as videos, images, audios, etc (MongoDB
GridFS, n.d).
They might need more memory to store large data in the future, so they can use
Shrading scaling process (What is Sharding, n.d). This method separates large database
into small database and then manage easily.
5 Oct 2018 6 1113861
tabler-icon-diamond-filled.svg

Paraphrase This Document

Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser
Document Page
ICT704 Non-Relational Database
References
Journal Articles:
Neha D. Surati & Bhavin I. Shah (2015). NOSQL – New Wave for Big Data Storage and Retrieval
Solution and Its Comparison: A Survey - International Journal of Science Technology &
Engineering. Volume 2 Issue 4. p.3 Retrieved from
http://www.ijste.org/articles/IJSTEV2I4055.pdf Retrieved on 2 Oct 2018
Books:
(Dan Sullivan, 2015). NoSQL for Mere Mortals.
Websites:
MongoDB Manual (n.d). Retrieved from https://docs.mongodb.com/manual/core/data-
modeling-introduction/
What is Sharding? (n.d). Retrieved from
https://searchcloudcomputing.techtarget.com/definition/sharding
MongoDB GridFS- Tutorials Point (n.d) Retrieved from
https://www.tutorialspoint.com/mongodb/mongodb_gridfs.htm
MongoDb Many -to-Many Relationship Data (n.d) Retrieved from
http://blog.markstarkman.com/blog/2011/09/15/mongodb-many-to-many-relationship-data-modeling/
5 Oct 2018 7 1113861
chevron_up_icon
1 out of 8
circle_padding
hide_on_mobile
zoom_out_icon
logo.png

Your All-in-One AI-Powered Toolkit for Academic Success.

Available 24*7 on WhatsApp / Email

[object Object]