Skip to content
  • Facebook
GeekCer Logo

GeekCer

The geek's Coding education and Review centre

  • Home
  • Tutorials
    • Java
    • Servlet
    • JSP
    • Python
    • C Tutorial
    • Spring
    • Spring Boot
    • MongoDB
    • Hibernate
    • Data Structure
  • General Knowledge
  • Biography
  • Grammar
  • Festival (त्योहार)
  • Interview
  • Differences
  • Important
  • Toggle search form

Home » MongoDB » Learn MongoDB Tutorial, Installation, MongoDB DataTypes

  • Fundamental Rights of Indian Citizens
    Fundamental Rights of Indian Citizens | मौलिक अधिकार क्या हैं? General Knowledge
  • Subhas Chandra Bose Biography in Hindi, Essay, Paragraph
    Subhas Chandra Bose Biography in Hindi, Essay, Paragraph Biography
  • National Doctors Day in India and Other Countries, July 1, 2022
    National Doctors Day in India and Other Countries, July 1, 2022 General Knowledge
  • Aranya Kand with Hindi Meaning | अरण्यकाण्ड | सीता हरण
    Aranya Kand with Hindi Meaning | अरण्यकाण्ड का अर्थ | सीता हरण Spiritual
  • State the Universal law of gravitation | Law of Gravity, Formula
    State the Universal law of gravitation | Law of Gravity, Formula Science
  • Balkand Ramayana story in Hindi | रामायण बाल कांड राम का जन्म
    Balkand Ramayana story in Hindi | रामायण बाल कांड राम का जन्म Spiritual
  • Real life Inspirational Stories in Hindi | Success story in Hindi
    Real life Inspirational Stories in Hindi | Success story in Hindi Biography
  • World Red Cross Day and Red Crescent Day | विश्व रेडक्रॉस दिवस
    World Red Cross Day and Red Crescent Day | विश्व रेडक्रॉस दिवस General Knowledge

Learn MongoDB Tutorial, Installation, MongoDB DataTypes

Posted on November 28, 2021November 28, 2021 By GeekCer Education No Comments on Learn MongoDB Tutorial, Installation, MongoDB DataTypes
Learn MongoDB Tutorial, Installation, MongoDB DataTypes

MongoDB is a database that stores information in the form of documents. The Learn MongoDB tutorial is designed to make learning simple. MongoDB is designed to be easy to set up and scale. MongoDB represents JSON documents in binary format, which is known as a BSON. BSON is a document format that is based on the JSON modal. MongoDB is a cross-platform database that works on any operating system. MongoDB known for NoSQL database.

Other relational databases, such as Oracle, MySQL, and SQL Server, operate with tables and rows, but MongoDB works with collections and documents.

When we need information from a relational database, we use SQL, but with MongoDB, we use BSON to query the database.

MongoDB is the greatest NoSQL database to establish, administer, and operate with if you’re working on a low-budget database project.

In this MongoDB tutorial, you’ll learn the advantages and disadvantages of MongoDB, as well as MongoDB vs RDBMS and RDBMS vs MongoDB terminology, data types in MongoDB and so on.

Table of Contents

  • Learn advantages of using MongoDB
  • Learn disadvantages of using MongoDB
  • Difference Between RDBMS and MongoDB?
  • Learn MongoDB vs RDBMS Terminology
    • Database Server
  • How to Download & Install MongoDB on Windows
    • Create a folder in your drive where you want to store MongoDB data.
    • Open command prompt with MongoDB bin folder path where mongod.exe is present
    • Set the MongoDB database path name where you want to save the data
    • Open MongoDB Terminal
  • Learn DataTypes in MongoDB

Learn advantages of using MongoDB

MongoDB comes with many useful features. So, let’s talk about the advantages of MongoDB vs RDBMS.

  • MongoDB is really simple to install and configure.
  • MongoDB is a schema-free database that eliminates the need for tables and other pre-defined schemas.
  • When using an RDBMS, we should explicitly define the primary key, which is required. In MongoDB, each document has a _id field that is generated by default. There’s no need to bother about defining a primary key.
  • It keeps the majority of its data in RAM. This ensures that queries are executed more quickly.
  • MongoDB is up to 100 times quicker than conventional relational databases and is extremely fast.
  • MongoDB has a straightforward query syntax that is considerably easier to grasp than SQL.
  • Joining two or more tables in an RDBMS is difficult since it necessitates the use of JOINS. MongoDB does not have any complex joins, and it is simple to update the document structure in MongoDB, allowing us to easily add more documents.
  • You may attempt new ideas at a lower cost because to dynamic schema. You are not need to prepare the data before to exploring with it.
  • MongoDB is a horizontally scalable database, which is one of its main features. You can disperse data over numerous machines when you need to manage a huge volume of information.
  • MongoDB has a powerful ad-hoc query feature. It enables a program to anticipate queries in the future.
  • If you want to learn more, there is a lot of information available here. Any problem may be solved in a variety of ways.

Learn disadvantages of using MongoDB

  • MongoDB stores data in a large amount of memory.
  • The size of a document is limited.
  • MongoDB does not allow transactions.

Difference Between RDBMS and MongoDB?

The relational database and the MongoDB database differ in numerous ways. There are a few key differences between MongoDB and RDBMS, which are described here.

#RDBMSMongoDB
1 RDBMS uses SQL.MongoDB uses the JSON language.
2RDBMS is used to store data in tables in row and column format.Mongodb is used to store objects in JSON format.
3We must first construct tables, schemas, and relations in an RDBMSHowever, such tables, structure, and relationships are not required in MongoDB.
4In comparison to NoSQL databases, RDBMS is slow.MongoDB is 100 times quicker than traditional database management systems.
5A relational database is difficult to set up.However MongoDB is simple.
6Each table’s primary key should be established in the RDBMS.The main key in MongoDB is the _id field, which is produced along with each document.
MongoDB Vs RDBMS

Learn MongoDB vs RDBMS Terminology

Let’s have a look at how this table explains key RDBMS terminologies and concepts, as well as associated MongoDB terminology and concepts.

#MongoDB TermsRDBMS Terms
1DatabaseDatabase
2CollectionTable
3DocumentRow/Tuple
4FieldColumn
5Embedded DocumentsTable Join
6_id Primary Key
7$projectSELECT
8$matchWHERE
9$groupGROUP BY
10$matchHAVING
11$sortORDER BY
12$limitLIMIT
13$sumSUM()
14$lookupjoin

Database Server

#MonogDB TermsRDBMS Terms
1mongodmysqld/Oracle/DB2 Server
2mongomysql/sqlplus/DB2 Client

How to Download & Install MongoDB on Windows

  • Download the MongoDB (Download)
  • Install MongoDB by clicking exe file
How to Download & Install MongoDB on Windows
How to Download & Install MongoDB on Windows

Create a folder in your drive where you want to store MongoDB data.

D:\db

Open command prompt with MongoDB bin folder path where mongod.exe is present

C:\Program Files\MongoDB\Server\4.4\bin>
Open command prompt with MongoDB bin folder path where mongod.exe is present
Open command prompt with MongoDB bin folder path where mongod.exe is present

Set the MongoDB database path name where you want to save the data

Type mongod.exe –dbpath path name where you want to save data

C:\Program Files\MongoDB\Server\4.4\bin>mongod.exe --dbpath "D:\\db"
Set the MongoDB database path name where you want to save the data
Set the MongoDB database path name where you want to save the data

Open MongoDB Terminal

C:\Program Files\MongoDB\Server\4.4\bin>mongo
Open Terminal
Open MongoDB Terminal

Learn DataTypes in MongoDB

MongoDB supports a different types of data types. Following are a few of them.

#DataTypesDescription
1StringString data is stored in this variable. The data must be encoded in UTF-8.
2IntegerA numeric value is stored in this variable. The integer might be 32 bit or 64 bit depending on the server.
3DoubleStores floating point values.
4BooleanStores boolean(true/false) values.
5ObjectObject datatype is used for embedded documents.
6ArraysStores a list or multiple values into a single key.
7Min/Max Keys A value is compared to the lowest and highest BSON elements.
8NullStores null values.
9SymbolIt is most commonly used in languages with a symbol type.
10Object IDUsed to store the document’s ID.
11CodeJavaScript code is stored in the document.
12Binary dataUsed to store binary data.
13Regular expression Used to store regular expression.

Hope you liked this tutorial. In the future we will keep updating MongoDB tutorial to make learning as simple as possible for you. If you have any doubt or query you can contact us by clicking here.

Share this:

  • Click to share on Facebook (Opens in new window)
  • Click to share on WhatsApp (Opens in new window)
  • Click to share on Twitter (Opens in new window)
  • More
  • Click to share on LinkedIn (Opens in new window)
  • Click to share on Pinterest (Opens in new window)

Also Read

MongoDB Tags:How many data types in mongodb?, Install MongoDB in windows, Is MongoDB a SQL database?, MongoDB Install, What are different types of data types in MongoDB?, What is BSON data type?, What is MongoDB and why use it?, What is MongoDB known for?, Which is better MongoDB or SQL?, Why BSON is used in MongoDB?

Post navigation

Next Post: CRUD Operations in MongoDB | NoSQL | CRUD Transaction

More Related Articles

How to create Database and Collection in MongoDB How to create Database and Collection in MongoDB? MongoDB
CRUD Operations in MongoDB | NoSQL | CRUD Transaction CRUD Operations in MongoDB | NoSQL | CRUD Transaction MongoDB

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

  • National Farmers Day in Hindi | राष्ट्रीय किसान दिवस पर निबंध | चौधरी चरण सिंह जयंती
  • Human rights day in Hindi: 10 दिसंबर ह्यूमन राइट्स डे
  • Unicef day is celebrated on December 11 | Speech on unicef day
  • Indian Navy Day: जल सेना दिवस कब और क्यों मनाया जाता है?
  • P V Sindhu Biography in Hindi, Badminton, State, Caste पी. वी. सिंधु जीवन परिचय, कहानी, राज्य, जाति
  • Draupadi Murmu Biography In Hindi | द्रौपदी मुर्मू की जीवनी
  • Network kya hai (नेटवर्क क्या है)
    Network kya hai (नेटवर्क क्या है) Networking
  • TCP/IP Model, Full Form, Layers and their Functions
    TCP/IP Model, Full Form, Layers and their Functions Networking
  • IPv4 Vs IPv6 | Difference between IPv4 and IPv6
    IPv4 Vs IPv6 | Difference between IPv4 and IPv6 Differences
  • Difference between Internet and Intranet
    Difference between Internet and Intranet Differences
  • OSI Model | 7 Layers of OSI Model in Computer network
    OSI Model | 7 Layers of OSI Model in Computer network, Functions Networking
  • Difference between TCP and UDP
    Difference between TCP and UDP | TCP vs UDP examples Differences
  • Similarities and difference between OSI and TCP/IP model
    OSI vs TCP/IP Model, Similarities and difference between OSI and TCP/IP model Networking
  • Java Tutorial
  • Servlet Tutorial
  • JSP Tutorial
  • Maven Tutorial
  • HTML Tutorial
  • Programs
  • Hindi/English Grammar
  • Difference Between ... and ...
  • HR Interview
  • Important Articles

Write to Us:
geekcer.code@gmail.com

  • About Us
  • Privacy and Policy
  • Disclaimer
  • Contact Us
  • Sitemap

Copyright © GeekCer 2022 All Rights reserved