Atikh's DBA blog
  • Home
  • Oracle
  • MySQL
  • MongoDB
  • PostgreSQL
  • Snowflake
  • About Me
  • Contact Us

Introduction to MongoDB

 Atikh Shaikh     MongoDB     3 comments   

NoSQL

Before starting with the MongoDB introduction, let’s discuss NoSQL
  • NoSQL (Not Only SQL) was started in 2009 and then rapidly started growing.
  • It provides support to the storage and retrieval of data other than tabular relations.
  • Currently there are more than 160 NoSQL databases. MongoDB is the leading NoSQL database

  • NoSQL databases allow storing of data without any predefined schemas
  • Primary goal of NoSQL databases is to provide horizontal scalability i.e. we can add a number of servers to handle large traffic.
  • Relational     database (SQL) database use SQL to define and manipulate data whereas NoSQL uses unstructured query language such as JSON
  • SQL databases: Oracle, MySQL, PostgreSQL etc.
  • NoSQL databases: MongoDB, BigTable, Redis, RavenDb, Cassandra
  • It is easy to store hierarchical data in NoSQL, Let’s discuss more MongoDB

MongoDB

  • MongoDB is an open-source document-oriented NoSQL database that provides high performance, high availability, and automatic scaling
  • This has been written in C++ and its created by 10 gen. The name MongoDB came from the word humongous means huge data.
  • MongoDB works on concepts of collection and document. It stores data as a collection of name-value pairs. And it is a schema-less database
Example 
{“john”:1, “smith”: 2}

techondba-mongodb

MongoDB uses BSON data format which is binary JSON (JavaScript Object Notion) for data storage and data transfer, BSON provides additional DATATypes

JSON is the syntax for storing and exchanging data, an alternative for XML, Language independent, and self-describing. JSON is built based on two structures
  1.  Collection of name-value pair
  2.  An ordered list of values
Example of document
     { rno : 1234
       name : Chris
       aggregate: 75
     }

MongoDBDatatypes

MongoDB supports a number of datatypes likes STRING, NUMBER, BOOLEAN, DATE, NULL, ARRAY, FLOAT,
Mapping of terms with RDBMS DB



techondba-mongodba-mapping of terms-document-collection

Now we will look for more details on Documents and collection

Documents: 


  • Document is a set of name-value pairs which can have dynamic schema
  • MongoDB documents are BSON documents i.e. binary representation of JSON
  • MongoDB instance may have zero or more documents
  • Document is equivalent to RDBMS row 

Collection:


The collection is equivalent to RDBMS tables; one can have zero or more collections
A collection is group of documents
collection is schema-free.

Why MongoDB (Features of MongoDB)

With the use document instead of a relation database row, it’s very simple to represent complex hierarchical relationships with a single record (document).

No predefined schema, documents keys, and values not of fixed sizes.

 Easy scaling - as the amount of data is growing day by day it’s important to scale databases/servers. MongoDB was designed to scale out (sharing data across machines); MongoDB makes it easier to scale up data using multiple servers

 Supports Indexing, aggregation, special collection types, file storage (GRIDFS), replication, sharding (storing data across machines), auto-balancing of data across machines 

 Advantages over RDBMS

  • schema-free
  • no joins required
  • relationship between objects not required
  • easy to scale
  • uses internal memory for operations which enables fast retrieval of data
watch out this space for more articles coming on MongoDB
  • Share This:  
  •  Facebook
  •  Twitter
  •  Instagram
  •  Pin
  •  linkedin
  •  reddit
Email ThisBlogThis!Share to XShare to Facebook

Related Posts:

  • MongoDB Storage Engines With version 3.0, MongoDB introduced the Pluggable Storage Engine API. WiredTiger is one of the pluggable storage engines bundled with MongoDB Pl… Read More
  • MongoDB 4.0 New FeaturesMongoDB 4.0 has been released on Aug 6, 2018, with tremendous new features specially ACID transactions. I have listed the MongoDB 4.0 new featur… Read More
  • Starting and Stopping MongoDB Starting the MongoDB MongoDB is started with a mongod executable file, it has many configurable options which can be viewed with mongod--help on … Read More
  • Data Types in MongoDB MongoDB supports a wide range of data types as values in documents, we will discuss those below Basic Data Types Documents in MongoDB can be tho… Read More
  • MongoDB Database Backup and Restore MongoDB stores all its data in the data directory mentioned by --dbpath during startup. Taking backup of MongoDB is as simple … Read More
Newer Post Older Post Home

3 comments:

  1. Mark Sheppard2 August 2022 at 18:17

    Very Informative and creative contents. This concept is a good way to enhance knowledge. Thanks for sharing. Continue to share your knowledge through articles like these.

    Data Engineering Services 

    Data Analytics Solutions

    Artificial Intelligence Solutions

    Data Modernization Solutions

    ReplyDelete
    Replies
      Reply
  2. Anonymous18 January 2023 at 15:53

    The blog is really interesting and informative content. Your blog helps me to know more updated information's. Keep sharing more informative content like this.

    Software Testing Services

    ReplyDelete
    Replies
      Reply
  3. Anonymous24 April 2023 at 11:41

    I really appreciate your blog post and the effort you put in to creating it. Keep up the good work!
    Full stack classes in Pune

    ReplyDelete
    Replies
      Reply
Add comment
Load more...

Author

Atikh Shaikh
View my complete profile

Categories

  • MongoDB (18)
  • Oracle 12c (30)
  • Oracle12cR2 New Feature (3)
  • PostgreSQL (20)
  • RMAN (10)
  • Snowflake (8)
  • mysql (23)
  • oracle (74)

Blog Archive

  • ▼  2018 (38)
    • ▼  November (25)
      • Introduction On MySQL
      • SQL Modes in MySQL
      • MySQL Version explained
      • MySQL Storage Engines (Part 1)
      • MySQL Storage Engines (Part 2)
      • Login to MySQL Database on Linux
      • Error Code: 1419. You do not have the SUPER privil...
      • Create MySQL database on Linux
      • Create New User in MySQL Database
      • MySQL Default database | MySQL System Database
      • Oracle ASM Basic Commands
      • Oracle Database Schema Refresh
      • Create User in Oracle Database Pre-12c and 12c
      • RMAN Disk backup and List or Report RMAN Backup
      • RMAN Backup of Single Datafile and List Backup
      • Difference Between User, Service account and Schem...
      • Create MySQL Database Backup | mysqldump mysqlbackup
      • Switching between ARCHIVELOG Mode and NOARCHIVELOG...
      • Introduction to MongoDB
      • Introduction to PostgreSQL
      • Installation of PostgreSQL 9.6 on Windows
      • Installation of MongoDB on Windows
      • Oracle DBA Scripts
      • Databases, Collections and Documents in MongoDB
      • CRUD (Create, Read, Update, Delete) Operations in ...
    • ►  December (13)
  • ►  2019 (33)
    • ►  January (15)
    • ►  February (6)
    • ►  March (2)
    • ►  April (5)
    • ►  May (5)
  • ►  2020 (5)
    • ►  April (1)
    • ►  May (2)
    • ►  July (2)
  • ►  2021 (8)
    • ►  June (3)
    • ►  July (3)
    • ►  August (1)
    • ►  December (1)
  • ►  2022 (33)
    • ►  May (3)
    • ►  June (10)
    • ►  July (3)
    • ►  August (4)
    • ►  September (8)
    • ►  October (3)
    • ►  November (2)
  • ►  2023 (14)
    • ►  February (1)
    • ►  April (5)
    • ►  May (2)
    • ►  June (1)
    • ►  September (1)
    • ►  October (1)
    • ►  December (3)
  • ►  2024 (5)
    • ►  January (2)
    • ►  March (3)
  • ►  2025 (6)
    • ►  March (1)
    • ►  April (3)
    • ►  May (2)

Popular Posts

  • ORA-29283: invalid file operation: unexpected "LFI" error (1509)[29437]
    I was trying to export the schema in my windows PC, it got stuck with below error    C:\Users\shaik\Videos\technodba exp>expdp userid...
  • Oracle Dataguard Broker Configuration (DGMGRL)
    Data Guard Broker is a command-line interface that makes managing primary and standby databases easy. DBA can use a single command to switch...
  • Oracle 23ai : The all new Hybrid Read-Only for pluggable databases (PDBs)
      The latest Oracle database version, Oracle 23ai, introduced a new open mode called Hybrid Read-Only for pluggable databases (PDBs). Local ...
  • ERROR 1221 (HY000): Incorrect usage of DB GRANT and GLOBAL PRIVILEGES
    In previous articles, we have learned about user creation and grants  in MySQL in detail, but there are a few privileges called global priv...
  • PostgreSQL : How to get data directory location for PostgreSQL instance
    Sometimes, you start working on a PostgreSQL instance but forget about the data directory, here we will discuss different methods to know th...

Labels

oracle Oracle 12c mysql PostgreSQL MongoDB oracle 19c Oracle23c oracle19c Orale PDB-CDB oracle12c python AWS Oracle ASM Virtualbox pluggable database storage engine

Pages

  • Disclaimer
  • Privacy Policy

Follow TechnoDBA

Copyright © 2025 Atikh's DBA blog | Powered by Blogger