SlideShare a Scribd company logo
1 of 3
Download to read offline
IJSRD - International Journal for Scientific Research & Development| Vol. 3, Issue 10, 2015 | ISSN (online): 2321-0613
All rights reserved by www.ijsrd.com 832
A Study on Mongodb Database
Kavya. S
M Tech. Student
Department of Computer Science
Mount Zion College of Engineering, A. P. J. Abdul Kalam Technological University, Kadammanitta
P.O, Pathanamthitta, Kerala, India
Abstract— This paper trying to focus on main features,
advantages and applications of non-relational database
namely Mongo DB and thus justifying why MongoDB is
more suitable than relational databases in big data
applications. The database used here for comparison with
MongoDB is MySQL. The main features of MongoDB are
flexibility, scalability, auto sharding and replication.
MongoDB is used in big data and real time web applications
since it is a leading database technology.
Key words: NoSQL, MongoDB, auto sharding, aggregation
I. INTRODUCTION
Relational database management systems came into
existence since 1980’s.They are a common choice of storage
of information in new databases used for financial records,
manufacturing and logistical information personnel data and
other applications. They work efficiently when they handle a
limited amount of data. Due to the emergence of
applications that support millions of users simultaneously an
appropriate database is required. To handle huge volume of
data traditional relational database is inefficient. To
overcome the difficulty in handling huge volume of data ,the
term NoSQL was introduced by Crlo Strozzi in 1998.It
refers to non-relational databases. More recently,the term
has received another meaning namely Not Only SQL.The
main advantage of NoSQL database is that it can handle
both unstructured(e-mail,multimedia,social media) and semi
structured data very efficiently. Mainly there are four
categories of databases namely Key –value store, document
store, column oriented and graph database. MongoDB is a
cross platform document oriented database, first developed
by the software company MongoDB Inc., in October 2007
as a component of planned platform as a service product.
The company shifted to an open source development model
in 2009.Since, then MongoDB has been adopted as a
backend software by a number of major websites and
services. These include Craigslist, eBay, Foursquare and
Newyork Times. MongoDB is written in c++ and provides
high availability, easy scalability and better performance.
MongoDB works on the concept of collection and
document. A database is a physical container for collections.
Collection is a group of MongoDB documents. It is
equivalent to RDBMS table. MongoDB database contain
multiple collections. A document is a set of key-value pairs.
Documents have dynamic schema. That means, documents
in the same collection do not need to have the same structure
and common fields. MongoDB supports dynamic queries on
documents using a document based query language that is
nearly as powerful as SQL.It stores the data in the form of
JSON documents. Auto sharding, replication and high
availability are the main features of MongoDB.It is
commonly used in big data, content management and
delivery, mobile and social infrastructure, user data
management and data hub. MongoDB supports different
data types such as String, Integer, Boolean,
Double,Min/Max keys, Arrays, Timestamp, Oject, Null,
Symbol, date, Object ID, Binary data, code and regular
expressions.
II. MONGODB DATA MODEL
MongoDB stores data as documents which are in the BSON
format. BSON is binary representation of JSON document.
Documents having similar structure are organized as
collections. Collection is analogous to a table in relational
database. Documents and fields in MongoDB are
represented using the terms row and columns respectively in
MySQL. The difference between the relational database,
MySQL and non-relational database ,MongoDB is that in
relational database information for a given record is usually
spread across many tables, whereas in MongoDB the
documents tend to have all data for a given record in a
single document.
MySQL MongoDB
Table Collection
Row BSON document
Column BSON field
JOIN Embedded documents and Linking
GROUP BY Aggregation
Primary key Primary key
Table 1:
III. FEATURES OF MONGODB
MongoDB has a flexible data model. That means data can
be stored in any structure. This feature also allows
modification of data in an easy way. Another main feature is
elastic scalability. All NoSQL databases contain some form
of sharding or partitioning.This allows the database to scale
out on hardware. Thereby allowing almost unlimited
growth. MongoDB provides high performance than
traditional relational databases. The performance of
MongoDB is measured in terms of both throughput and
latency at any scale. MongoDB does not use join operation,
instead they use embedding of documents and linking.
Because the data in MongoDB is more localized.This
localization dramatically reduces the need to join separate
tables. Each document structure in MongoDB database can
vary from one another. If there is a need to create a new
field in any one of the document, then the field can be
created without affecting a central system catalog and
without taking the system offline. In MongoDB, field
updates can be done easily. It provides rich data model. Data
locality and dynamic schema are other main features of
MongoDB. The main feature of MongoDB includes
querying, aggregation, indexing and auto sharding.
Indexes play a major role in providing efficient
access to data,for both read and write operations,which are
A Study on Mongodb Database
(IJSRD/Vol. 3/Issue 10/2015/182)
All rights reserved by www.ijsrd.com 833
supported natively by the database rather than maintained in
application code. MongoDB supports many queries, mainly
for highly scalable operational applications. The result of
query execution can be a document or subset of specific
fields within the document.
Different types of query provided by MongoDB
include key value queries, range queries, geo spatial queries,
search queries, text search queries, aggregation framework
queries and map reduce queries. Replica sets are another
feature of MongoDB which is a fail over mechanism. Only
the primary database allows write operation. Multiple
secondary servers are used for read operation. For a replica
set, minimum three servers is required. Of the three servers,
one is primary server, other is secondary server and the
remaining one is arbiter server. Arbiter server is not used for
storing data. They are used only during failover time to
determine which server will be the next primary server.
Another feature is auto sharding. This feature is used to
overcome the hardware limitations. Hardware limitations
means bottleneck in RAM/disk I/O. This feature of
MongoDB helps to distribute data across physical partitions.
These physical partitions are called as shards. Thus data is
automatically balanced in the clusters as the data grows. In
relational database sharding is not built into the database.
An aggregate is a group of related entities and value object.
Maximum document size in MongoDB is 16 MB and large
documents are handled with Grid FS.MongoDB runs on OSs
such as Windows, Linux, Mac and Solaris.
IV. COMPARISON OF MONGODB VS MYSQL
MongoDB Commands
SELECT * FROM table db.collection.find()
SELECT * FROM table
WHERE user=’Akshay’
db.collection.find({user=”Akshay”})
SELECT * FROM table
ORDER BY Age
Db.collection.find.
DISTINCT .distinct()
GROUP .group()
Table 2: Fig (a) Retrieval of data in MySQL and MongoDB
Modeling of data in MongoDB database differs from
relational database. Different modeling styles can be applied
depending on the requirement of the application. Most
common modeling styles are embedding of documents and
normalization on collections. The embedding feature has a
disadvantage. That is, it may cause the situation that
documents grow in size after creation which may degrade
the performance of database.
Col 1
Col 2
Col 3
Table 3: Fig(b)Data modeling by embedding of documents
Example of Embedded documents having one to
one relationship is shown below.
{_id:1,Name:”Akshay Anand”,Address :{
City”:”Kochi”,Country:”India”}}
Example of Embedded documents having one to many
relationship is shown below
{_id:1,Name: “Akshay Anand”,Children
:[{Name:”Aravind”,Age:2},{Name:”Anupama”,Age:4}]
This shows that array of values can be stored easily in
MongoDB.
MongoDB supports denormalization.It is a process
of reducing number of physical tables which are accessed
more frequently to reduce the query processing time.This
process reduces number of joins required to design the query
to get desired output.
Col-1 Col-2
Table 4: Norm.
Col 1 Col 3
Table 5: Fig(c) Normalization.
Col 1 Col 2 Col 3
Table 6: Fig (d)D normalization.
In MySQL,the concept of normalization is used.
This concept was first introduced by E.F.Codd. The
objectives of normalization process include well
organization of data, minimizing update anomalies and
maximizing data accessibility. In ©,a common key is used
to refer the tables Table1_Norm and Table2_Norm.In the
next figure, the tables are merged together. Embedding is
similar to denormalizationbut still little variation is there.
Embedding of documents give better performance than
normalization on collections.
V. ADVANTAGES OF MONGODB
It is schema less. MongoDB database belongs to document
store category in which one collection holds different
different documents. Number of fields, content and size of
the document can be different in each document. The main
advantage of MongoDB database is that structure of a single
object is clear. It does not contain complex joins.It has deep
query ability. Easy of scale out is another major advantage.
In this type of database, conversion/mapping of application
objects to database objects not needed. MongoDB uses the
internal memory for storing the work set there by enabling
faster access of data. It provides index on any attribute. The
secondary indexes supported by the MongoDB database
make them transparent to developers.
VI. APPLICATIONS OF MONGODB
They are widely used in big data and real time web
applications such as Facebook, Yahoo, Google and Amazon.
It is also used in content management and delivery. It can be
used in mobile and social infrastructure. For user data
A Study on Mongodb Database
(IJSRD/Vol. 3/Issue 10/2015/182)
All rights reserved by www.ijsrd.com 834
management the best choice among NoSQL database is
MongoDB. It finds application in data hub also.It is the best
choice for a small or medium sized non –critical sensor
applications, especially when write performance is
important.
VII. CONCLUSION
As NoSQL trend is relatively new, many researchers are
attracted to this category of databases. NoSQL databases
such as MongoDB and its key-value stores provide an
efficient framework to aggregate large volumes of data.
MongoDB can store complex data like array,object or
reference into one field. Mapping of objects is very easy in
this type of database. The features of MongoDB like auto
sharding and replication of data make the development
faster than MySQL. MongoDB provides flexibility,
horizontal scalability, auto sharding and replication.
MongoDB is a better choice for big data applications than
MySQL database. It gives better performance than relational
database. Depending on the requirements of application, we
can choose the suitable NoSQL database.
REFERENCES
[1] Mrs.Anuradha Kanade, Dr.Arpita Gopal,Mr.Shanthanu
Kanade“A Study of Normalization and Embedding in
MongoDB”Advance Computing Conference (IACC),
2014 IEEE International
[2] Cornelia GYORODI,Robert GYORODI,George
PECHERLE,Andrada OLAH “A comparative
study:MongoDB vs MySQL”Engineering of Modern
Electric Systems (EMES), 2015 13th International
Conference on11-12 June 2015.
[3] K.Sanobar,M.Vanita,”SQL Support over MongoDB
using Metadata”

More Related Content

Similar to MongoDB Database Study

MongoDB presentation
MongoDB presentationMongoDB presentation
MongoDB presentationHyphen Call
 
Introduction to MongoDB and its best practices
Introduction to MongoDB and its best practicesIntroduction to MongoDB and its best practices
Introduction to MongoDB and its best practicesAshishRathore72
 
MongoDB - An Introduction
MongoDB - An IntroductionMongoDB - An Introduction
MongoDB - An Introductiondinkar thakur
 
Hands on Big Data Analysis with MongoDB - Cloud Expo Bootcamp NYC
Hands on Big Data Analysis with MongoDB - Cloud Expo Bootcamp NYCHands on Big Data Analysis with MongoDB - Cloud Expo Bootcamp NYC
Hands on Big Data Analysis with MongoDB - Cloud Expo Bootcamp NYCLaura Ventura
 
Analysis on NoSQL: MongoDB Tool
Analysis on NoSQL: MongoDB ToolAnalysis on NoSQL: MongoDB Tool
Analysis on NoSQL: MongoDB Toolijtsrd
 
MongoDB Lab Manual (1).pdf used in data science
MongoDB Lab Manual (1).pdf used in data scienceMongoDB Lab Manual (1).pdf used in data science
MongoDB Lab Manual (1).pdf used in data sciencebitragowthamkumar1
 
Introduction to MongoDB How is it Different from RDBMS
Introduction to MongoDB How is it Different from RDBMSIntroduction to MongoDB How is it Different from RDBMS
Introduction to MongoDB How is it Different from RDBMSRavendra Singh
 
Top MongoDB interview Questions and Answers
Top MongoDB interview Questions and AnswersTop MongoDB interview Questions and Answers
Top MongoDB interview Questions and Answersjeetendra mandal
 
MongoDB NoSQL database a deep dive -MyWhitePaper
MongoDB  NoSQL database a deep dive -MyWhitePaperMongoDB  NoSQL database a deep dive -MyWhitePaper
MongoDB NoSQL database a deep dive -MyWhitePaperRajesh Kumar
 
What are the major components of MongoDB and the major tools used in it.docx
What are the major components of MongoDB and the major tools used in it.docxWhat are the major components of MongoDB and the major tools used in it.docx
What are the major components of MongoDB and the major tools used in it.docxTechnogeeks
 
Introduction to MongoDB.pptx
Introduction to MongoDB.pptxIntroduction to MongoDB.pptx
Introduction to MongoDB.pptxSurya937648
 
nosql [Autosaved].pptx
nosql [Autosaved].pptxnosql [Autosaved].pptx
nosql [Autosaved].pptxIndrani Sen
 
MongoDB - An Introduction
MongoDB - An IntroductionMongoDB - An Introduction
MongoDB - An Introductionsethfloydjr
 
Performance analysis of MongoDB and HBase
Performance analysis of MongoDB and HBasePerformance analysis of MongoDB and HBase
Performance analysis of MongoDB and HBaseSindhujanDhayalan
 
Node Js, AngularJs and Express Js Tutorial
Node Js, AngularJs and Express Js TutorialNode Js, AngularJs and Express Js Tutorial
Node Js, AngularJs and Express Js TutorialPHP Support
 

Similar to MongoDB Database Study (20)

MongoDB presentation
MongoDB presentationMongoDB presentation
MongoDB presentation
 
Introduction to MongoDB and its best practices
Introduction to MongoDB and its best practicesIntroduction to MongoDB and its best practices
Introduction to MongoDB and its best practices
 
Mongodb
MongodbMongodb
Mongodb
 
MongoDB - An Introduction
MongoDB - An IntroductionMongoDB - An Introduction
MongoDB - An Introduction
 
Mongo db
Mongo dbMongo db
Mongo db
 
Hands on Big Data Analysis with MongoDB - Cloud Expo Bootcamp NYC
Hands on Big Data Analysis with MongoDB - Cloud Expo Bootcamp NYCHands on Big Data Analysis with MongoDB - Cloud Expo Bootcamp NYC
Hands on Big Data Analysis with MongoDB - Cloud Expo Bootcamp NYC
 
Analysis on NoSQL: MongoDB Tool
Analysis on NoSQL: MongoDB ToolAnalysis on NoSQL: MongoDB Tool
Analysis on NoSQL: MongoDB Tool
 
MongoDB Lab Manual (1).pdf used in data science
MongoDB Lab Manual (1).pdf used in data scienceMongoDB Lab Manual (1).pdf used in data science
MongoDB Lab Manual (1).pdf used in data science
 
Introduction to MongoDB How is it Different from RDBMS
Introduction to MongoDB How is it Different from RDBMSIntroduction to MongoDB How is it Different from RDBMS
Introduction to MongoDB How is it Different from RDBMS
 
Top MongoDB interview Questions and Answers
Top MongoDB interview Questions and AnswersTop MongoDB interview Questions and Answers
Top MongoDB interview Questions and Answers
 
MongoDB NoSQL database a deep dive -MyWhitePaper
MongoDB  NoSQL database a deep dive -MyWhitePaperMongoDB  NoSQL database a deep dive -MyWhitePaper
MongoDB NoSQL database a deep dive -MyWhitePaper
 
CMS Mongo DB
CMS Mongo DBCMS Mongo DB
CMS Mongo DB
 
MongoDB.pptx
MongoDB.pptxMongoDB.pptx
MongoDB.pptx
 
What are the major components of MongoDB and the major tools used in it.docx
What are the major components of MongoDB and the major tools used in it.docxWhat are the major components of MongoDB and the major tools used in it.docx
What are the major components of MongoDB and the major tools used in it.docx
 
Introduction to MongoDB.pptx
Introduction to MongoDB.pptxIntroduction to MongoDB.pptx
Introduction to MongoDB.pptx
 
nosql [Autosaved].pptx
nosql [Autosaved].pptxnosql [Autosaved].pptx
nosql [Autosaved].pptx
 
express.pptx
express.pptxexpress.pptx
express.pptx
 
MongoDB - An Introduction
MongoDB - An IntroductionMongoDB - An Introduction
MongoDB - An Introduction
 
Performance analysis of MongoDB and HBase
Performance analysis of MongoDB and HBasePerformance analysis of MongoDB and HBase
Performance analysis of MongoDB and HBase
 
Node Js, AngularJs and Express Js Tutorial
Node Js, AngularJs and Express Js TutorialNode Js, AngularJs and Express Js Tutorial
Node Js, AngularJs and Express Js Tutorial
 

More from Jessica Navarro

Example Discussion Essay
Example Discussion EssayExample Discussion Essay
Example Discussion EssayJessica Navarro
 
Example Essay Argumentative
Example Essay ArgumentativeExample Essay Argumentative
Example Essay ArgumentativeJessica Navarro
 
Argumentative Essay Prompts
Argumentative Essay PromptsArgumentative Essay Prompts
Argumentative Essay PromptsJessica Navarro
 
Essay Websites How To Start A College Admission Essay 12
Essay Websites How To Start A College Admission Essay 12Essay Websites How To Start A College Admission Essay 12
Essay Websites How To Start A College Admission Essay 12Jessica Navarro
 
Printable Pig Stationery PaperCute PigWriting Pape
Printable Pig Stationery PaperCute PigWriting PapePrintable Pig Stationery PaperCute PigWriting Pape
Printable Pig Stationery PaperCute PigWriting PapeJessica Navarro
 
Website That Writes Essays For You Love You - There Is A Website That
Website That Writes Essays For You Love You - There Is A Website ThatWebsite That Writes Essays For You Love You - There Is A Website That
Website That Writes Essays For You Love You - There Is A Website ThatJessica Navarro
 
Critical Analysis Of An Article - Critical Analysis Essay -
Critical Analysis Of An Article - Critical Analysis Essay -Critical Analysis Of An Article - Critical Analysis Essay -
Critical Analysis Of An Article - Critical Analysis Essay -Jessica Navarro
 
How To Write An Effective Narrative Essay
How To Write An Effective Narrative EssayHow To Write An Effective Narrative Essay
How To Write An Effective Narrative EssayJessica Navarro
 
Use Custom Essay Writing Services And Know The Di
Use Custom Essay Writing Services And Know The DiUse Custom Essay Writing Services And Know The Di
Use Custom Essay Writing Services And Know The DiJessica Navarro
 
IB Extended Essay Topics For The Highest Grades
IB Extended Essay Topics For The Highest GradesIB Extended Essay Topics For The Highest Grades
IB Extended Essay Topics For The Highest GradesJessica Navarro
 
Home - Research - LibGuides At Uni
Home - Research - LibGuides At UniHome - Research - LibGuides At Uni
Home - Research - LibGuides At UniJessica Navarro
 
10 Tips For Writing Effective Essay LiveWebTutors
10 Tips For Writing Effective Essay LiveWebTutors10 Tips For Writing Effective Essay LiveWebTutors
10 Tips For Writing Effective Essay LiveWebTutorsJessica Navarro
 
Printable Sentence Strips - Printable Word Searches
Printable Sentence Strips - Printable Word SearchesPrintable Sentence Strips - Printable Word Searches
Printable Sentence Strips - Printable Word SearchesJessica Navarro
 
Website That Does Essays For You
Website That Does Essays For YouWebsite That Does Essays For You
Website That Does Essays For YouJessica Navarro
 

More from Jessica Navarro (20)

Essay About Ecotourism
Essay About EcotourismEssay About Ecotourism
Essay About Ecotourism
 
Example Discussion Essay
Example Discussion EssayExample Discussion Essay
Example Discussion Essay
 
Bonnie And Clyde Essay
Bonnie And Clyde EssayBonnie And Clyde Essay
Bonnie And Clyde Essay
 
Example Essay Argumentative
Example Essay ArgumentativeExample Essay Argumentative
Example Essay Argumentative
 
Racism Today Essay
Racism Today EssayRacism Today Essay
Racism Today Essay
 
Argumentative Essay Prompts
Argumentative Essay PromptsArgumentative Essay Prompts
Argumentative Essay Prompts
 
Writing Border
Writing BorderWriting Border
Writing Border
 
Essay Websites How To Start A College Admission Essay 12
Essay Websites How To Start A College Admission Essay 12Essay Websites How To Start A College Admission Essay 12
Essay Websites How To Start A College Admission Essay 12
 
Printable Pig Stationery PaperCute PigWriting Pape
Printable Pig Stationery PaperCute PigWriting PapePrintable Pig Stationery PaperCute PigWriting Pape
Printable Pig Stationery PaperCute PigWriting Pape
 
Terrorism Essay. Long A
Terrorism Essay. Long ATerrorism Essay. Long A
Terrorism Essay. Long A
 
Website That Writes Essays For You Love You - There Is A Website That
Website That Writes Essays For You Love You - There Is A Website ThatWebsite That Writes Essays For You Love You - There Is A Website That
Website That Writes Essays For You Love You - There Is A Website That
 
Pin On For The Boys
Pin On For The BoysPin On For The Boys
Pin On For The Boys
 
Critical Analysis Of An Article - Critical Analysis Essay -
Critical Analysis Of An Article - Critical Analysis Essay -Critical Analysis Of An Article - Critical Analysis Essay -
Critical Analysis Of An Article - Critical Analysis Essay -
 
How To Write An Effective Narrative Essay
How To Write An Effective Narrative EssayHow To Write An Effective Narrative Essay
How To Write An Effective Narrative Essay
 
Use Custom Essay Writing Services And Know The Di
Use Custom Essay Writing Services And Know The DiUse Custom Essay Writing Services And Know The Di
Use Custom Essay Writing Services And Know The Di
 
IB Extended Essay Topics For The Highest Grades
IB Extended Essay Topics For The Highest GradesIB Extended Essay Topics For The Highest Grades
IB Extended Essay Topics For The Highest Grades
 
Home - Research - LibGuides At Uni
Home - Research - LibGuides At UniHome - Research - LibGuides At Uni
Home - Research - LibGuides At Uni
 
10 Tips For Writing Effective Essay LiveWebTutors
10 Tips For Writing Effective Essay LiveWebTutors10 Tips For Writing Effective Essay LiveWebTutors
10 Tips For Writing Effective Essay LiveWebTutors
 
Printable Sentence Strips - Printable Word Searches
Printable Sentence Strips - Printable Word SearchesPrintable Sentence Strips - Printable Word Searches
Printable Sentence Strips - Printable Word Searches
 
Website That Does Essays For You
Website That Does Essays For YouWebsite That Does Essays For You
Website That Does Essays For You
 

Recently uploaded

Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxthorishapillay1
 
Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application ) Sakshi Ghasle
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Educationpboyjonauth
 
History Class XII Ch. 3 Kinship, Caste and Class (1).pptx
History Class XII Ch. 3 Kinship, Caste and Class (1).pptxHistory Class XII Ch. 3 Kinship, Caste and Class (1).pptx
History Class XII Ch. 3 Kinship, Caste and Class (1).pptxsocialsciencegdgrohi
 
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxEPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxRaymartEstabillo3
 
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfEnzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfSumit Tiwari
 
Pharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdfPharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdfMahmoud M. Sallam
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionSafetyChain Software
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxOH TEIK BIN
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxSayali Powar
 
Class 11 Legal Studies Ch-1 Concept of State .pdf
Class 11 Legal Studies Ch-1 Concept of State .pdfClass 11 Legal Studies Ch-1 Concept of State .pdf
Class 11 Legal Studies Ch-1 Concept of State .pdfakmcokerachita
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdfSoniaTolstoy
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Sapana Sha
 
internship ppt on smartinternz platform as salesforce developer
internship ppt on smartinternz platform as salesforce developerinternship ppt on smartinternz platform as salesforce developer
internship ppt on smartinternz platform as salesforce developerunnathinaik
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13Steve Thomason
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Krashi Coaching
 
Science lesson Moon for 4th quarter lesson
Science lesson Moon for 4th quarter lessonScience lesson Moon for 4th quarter lesson
Science lesson Moon for 4th quarter lessonJericReyAuditor
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentInMediaRes1
 

Recently uploaded (20)

Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptx
 
Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application )
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Education
 
History Class XII Ch. 3 Kinship, Caste and Class (1).pptx
History Class XII Ch. 3 Kinship, Caste and Class (1).pptxHistory Class XII Ch. 3 Kinship, Caste and Class (1).pptx
History Class XII Ch. 3 Kinship, Caste and Class (1).pptx
 
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdfTataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
 
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxEPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
 
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfEnzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
 
Pharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdfPharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdf
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory Inspection
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptx
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
 
Class 11 Legal Studies Ch-1 Concept of State .pdf
Class 11 Legal Studies Ch-1 Concept of State .pdfClass 11 Legal Studies Ch-1 Concept of State .pdf
Class 11 Legal Studies Ch-1 Concept of State .pdf
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
 
internship ppt on smartinternz platform as salesforce developer
internship ppt on smartinternz platform as salesforce developerinternship ppt on smartinternz platform as salesforce developer
internship ppt on smartinternz platform as salesforce developer
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
 
Science lesson Moon for 4th quarter lesson
Science lesson Moon for 4th quarter lessonScience lesson Moon for 4th quarter lesson
Science lesson Moon for 4th quarter lesson
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media Component
 

MongoDB Database Study

  • 1. IJSRD - International Journal for Scientific Research & Development| Vol. 3, Issue 10, 2015 | ISSN (online): 2321-0613 All rights reserved by www.ijsrd.com 832 A Study on Mongodb Database Kavya. S M Tech. Student Department of Computer Science Mount Zion College of Engineering, A. P. J. Abdul Kalam Technological University, Kadammanitta P.O, Pathanamthitta, Kerala, India Abstract— This paper trying to focus on main features, advantages and applications of non-relational database namely Mongo DB and thus justifying why MongoDB is more suitable than relational databases in big data applications. The database used here for comparison with MongoDB is MySQL. The main features of MongoDB are flexibility, scalability, auto sharding and replication. MongoDB is used in big data and real time web applications since it is a leading database technology. Key words: NoSQL, MongoDB, auto sharding, aggregation I. INTRODUCTION Relational database management systems came into existence since 1980’s.They are a common choice of storage of information in new databases used for financial records, manufacturing and logistical information personnel data and other applications. They work efficiently when they handle a limited amount of data. Due to the emergence of applications that support millions of users simultaneously an appropriate database is required. To handle huge volume of data traditional relational database is inefficient. To overcome the difficulty in handling huge volume of data ,the term NoSQL was introduced by Crlo Strozzi in 1998.It refers to non-relational databases. More recently,the term has received another meaning namely Not Only SQL.The main advantage of NoSQL database is that it can handle both unstructured(e-mail,multimedia,social media) and semi structured data very efficiently. Mainly there are four categories of databases namely Key –value store, document store, column oriented and graph database. MongoDB is a cross platform document oriented database, first developed by the software company MongoDB Inc., in October 2007 as a component of planned platform as a service product. The company shifted to an open source development model in 2009.Since, then MongoDB has been adopted as a backend software by a number of major websites and services. These include Craigslist, eBay, Foursquare and Newyork Times. MongoDB is written in c++ and provides high availability, easy scalability and better performance. MongoDB works on the concept of collection and document. A database is a physical container for collections. Collection is a group of MongoDB documents. It is equivalent to RDBMS table. MongoDB database contain multiple collections. A document is a set of key-value pairs. Documents have dynamic schema. That means, documents in the same collection do not need to have the same structure and common fields. MongoDB supports dynamic queries on documents using a document based query language that is nearly as powerful as SQL.It stores the data in the form of JSON documents. Auto sharding, replication and high availability are the main features of MongoDB.It is commonly used in big data, content management and delivery, mobile and social infrastructure, user data management and data hub. MongoDB supports different data types such as String, Integer, Boolean, Double,Min/Max keys, Arrays, Timestamp, Oject, Null, Symbol, date, Object ID, Binary data, code and regular expressions. II. MONGODB DATA MODEL MongoDB stores data as documents which are in the BSON format. BSON is binary representation of JSON document. Documents having similar structure are organized as collections. Collection is analogous to a table in relational database. Documents and fields in MongoDB are represented using the terms row and columns respectively in MySQL. The difference between the relational database, MySQL and non-relational database ,MongoDB is that in relational database information for a given record is usually spread across many tables, whereas in MongoDB the documents tend to have all data for a given record in a single document. MySQL MongoDB Table Collection Row BSON document Column BSON field JOIN Embedded documents and Linking GROUP BY Aggregation Primary key Primary key Table 1: III. FEATURES OF MONGODB MongoDB has a flexible data model. That means data can be stored in any structure. This feature also allows modification of data in an easy way. Another main feature is elastic scalability. All NoSQL databases contain some form of sharding or partitioning.This allows the database to scale out on hardware. Thereby allowing almost unlimited growth. MongoDB provides high performance than traditional relational databases. The performance of MongoDB is measured in terms of both throughput and latency at any scale. MongoDB does not use join operation, instead they use embedding of documents and linking. Because the data in MongoDB is more localized.This localization dramatically reduces the need to join separate tables. Each document structure in MongoDB database can vary from one another. If there is a need to create a new field in any one of the document, then the field can be created without affecting a central system catalog and without taking the system offline. In MongoDB, field updates can be done easily. It provides rich data model. Data locality and dynamic schema are other main features of MongoDB. The main feature of MongoDB includes querying, aggregation, indexing and auto sharding. Indexes play a major role in providing efficient access to data,for both read and write operations,which are
  • 2. A Study on Mongodb Database (IJSRD/Vol. 3/Issue 10/2015/182) All rights reserved by www.ijsrd.com 833 supported natively by the database rather than maintained in application code. MongoDB supports many queries, mainly for highly scalable operational applications. The result of query execution can be a document or subset of specific fields within the document. Different types of query provided by MongoDB include key value queries, range queries, geo spatial queries, search queries, text search queries, aggregation framework queries and map reduce queries. Replica sets are another feature of MongoDB which is a fail over mechanism. Only the primary database allows write operation. Multiple secondary servers are used for read operation. For a replica set, minimum three servers is required. Of the three servers, one is primary server, other is secondary server and the remaining one is arbiter server. Arbiter server is not used for storing data. They are used only during failover time to determine which server will be the next primary server. Another feature is auto sharding. This feature is used to overcome the hardware limitations. Hardware limitations means bottleneck in RAM/disk I/O. This feature of MongoDB helps to distribute data across physical partitions. These physical partitions are called as shards. Thus data is automatically balanced in the clusters as the data grows. In relational database sharding is not built into the database. An aggregate is a group of related entities and value object. Maximum document size in MongoDB is 16 MB and large documents are handled with Grid FS.MongoDB runs on OSs such as Windows, Linux, Mac and Solaris. IV. COMPARISON OF MONGODB VS MYSQL MongoDB Commands SELECT * FROM table db.collection.find() SELECT * FROM table WHERE user=’Akshay’ db.collection.find({user=”Akshay”}) SELECT * FROM table ORDER BY Age Db.collection.find. DISTINCT .distinct() GROUP .group() Table 2: Fig (a) Retrieval of data in MySQL and MongoDB Modeling of data in MongoDB database differs from relational database. Different modeling styles can be applied depending on the requirement of the application. Most common modeling styles are embedding of documents and normalization on collections. The embedding feature has a disadvantage. That is, it may cause the situation that documents grow in size after creation which may degrade the performance of database. Col 1 Col 2 Col 3 Table 3: Fig(b)Data modeling by embedding of documents Example of Embedded documents having one to one relationship is shown below. {_id:1,Name:”Akshay Anand”,Address :{ City”:”Kochi”,Country:”India”}} Example of Embedded documents having one to many relationship is shown below {_id:1,Name: “Akshay Anand”,Children :[{Name:”Aravind”,Age:2},{Name:”Anupama”,Age:4}] This shows that array of values can be stored easily in MongoDB. MongoDB supports denormalization.It is a process of reducing number of physical tables which are accessed more frequently to reduce the query processing time.This process reduces number of joins required to design the query to get desired output. Col-1 Col-2 Table 4: Norm. Col 1 Col 3 Table 5: Fig(c) Normalization. Col 1 Col 2 Col 3 Table 6: Fig (d)D normalization. In MySQL,the concept of normalization is used. This concept was first introduced by E.F.Codd. The objectives of normalization process include well organization of data, minimizing update anomalies and maximizing data accessibility. In ©,a common key is used to refer the tables Table1_Norm and Table2_Norm.In the next figure, the tables are merged together. Embedding is similar to denormalizationbut still little variation is there. Embedding of documents give better performance than normalization on collections. V. ADVANTAGES OF MONGODB It is schema less. MongoDB database belongs to document store category in which one collection holds different different documents. Number of fields, content and size of the document can be different in each document. The main advantage of MongoDB database is that structure of a single object is clear. It does not contain complex joins.It has deep query ability. Easy of scale out is another major advantage. In this type of database, conversion/mapping of application objects to database objects not needed. MongoDB uses the internal memory for storing the work set there by enabling faster access of data. It provides index on any attribute. The secondary indexes supported by the MongoDB database make them transparent to developers. VI. APPLICATIONS OF MONGODB They are widely used in big data and real time web applications such as Facebook, Yahoo, Google and Amazon. It is also used in content management and delivery. It can be used in mobile and social infrastructure. For user data
  • 3. A Study on Mongodb Database (IJSRD/Vol. 3/Issue 10/2015/182) All rights reserved by www.ijsrd.com 834 management the best choice among NoSQL database is MongoDB. It finds application in data hub also.It is the best choice for a small or medium sized non –critical sensor applications, especially when write performance is important. VII. CONCLUSION As NoSQL trend is relatively new, many researchers are attracted to this category of databases. NoSQL databases such as MongoDB and its key-value stores provide an efficient framework to aggregate large volumes of data. MongoDB can store complex data like array,object or reference into one field. Mapping of objects is very easy in this type of database. The features of MongoDB like auto sharding and replication of data make the development faster than MySQL. MongoDB provides flexibility, horizontal scalability, auto sharding and replication. MongoDB is a better choice for big data applications than MySQL database. It gives better performance than relational database. Depending on the requirements of application, we can choose the suitable NoSQL database. REFERENCES [1] Mrs.Anuradha Kanade, Dr.Arpita Gopal,Mr.Shanthanu Kanade“A Study of Normalization and Embedding in MongoDB”Advance Computing Conference (IACC), 2014 IEEE International [2] Cornelia GYORODI,Robert GYORODI,George PECHERLE,Andrada OLAH “A comparative study:MongoDB vs MySQL”Engineering of Modern Electric Systems (EMES), 2015 13th International Conference on11-12 June 2015. [3] K.Sanobar,M.Vanita,”SQL Support over MongoDB using Metadata”