What Is MongoDB
What Is MongoDB
What is MongoDB
• MongoDB is a document oriented No-SQL general-purpose database
designed with flexibility for high volume data storage.
• Because MongoDB takes the best of relational and NoSQL databases,
providing a technology foundation that enables customers to meet
the demands of almost any class of modern application
• MongoDB stores the data in the form of collections and documents
• Collection Table of RDBMS
• Document row of RDBMS
What is NoSQL Database
• NoSQL stands for “Not Only SQL”
• NoSQL database are non tabular and doesn’t follow RDBMS standards
• They provide flexible schemas and scale easily with high volumes of data.
• A NoSQL database is used to store large quantities of complex and diverse data, such as
product catalogs, logs, user interactions, analytics, and more Designed for scalability and
high availability.
• NoSQL databases emerged in the late 2000s as the cost of storage dramatically
decreased.
• MongoDB is one of the most established NoSQL databases
• NoSQL databases were invented to solve the problem of storing unstructured and semi-
structured data.
• NoSQL databases allow you to store the data without a schema and also support
dynamic schema, which decouples the clients from a rigid schema, and is often
necessary for modern and experimental applications.
Difference between RDBMS & NoSQL
Database
What is MongoDB
• MongoDB is a document oriented database
• MongpDB is “no-sql” database
• It’s a general purpose “no-sql” database
• Designed for scalability and high availability
• Follows schema-less architecture ( Which means a dynamic schema)
• MongoDB works on on-premise , on cloud and mobile devices
Collections and Documents
• MongoDB stores the data in the form of collections and documents.
• Documents are the basis of data storage and it stores the data in the form
of "key-value" pair .
• There is no pre-defined schema for documents, which enables the
developer to add or remove fields as required.
• for eg: two documents in a single collection can have different fields
• Collections consiste of set of documents and certian built in fuctions like
"count" , which will help to get the count of documents in a collection.
• MongoDB allows to create the collection "on the fly", which means the
devloper can create the collection along with data insert statement
• MongoDB supports Capped Collection( Fixed size) and non capped
collections
Where MongoDB can be used
• E-commerce product catalog.
• Blogs and content management.
• Real-time analytics and high-speed logging, caching, and high
scalability.
• Configuration management.
• Maintaining location-based data — Geospatial data.
• Mobile and social networking sites.
• Evolving data requirements.
• Loosely coupled objectives — the design may change by over time.
MongoDB Common Use cases
• Many of its most successful use cases center around the following
areas:
• IoT
• Mobile applications
• Real-time analytics
• Personalization
• Catalog management
• Content management
Some companies who uses mongDB
• IBM
• Citrix
• T-Mobile
• Zendesk
• Sony
Benefits of Using MongoDB
• Document oriented
• High performance
• High availability — Replication
• High scalability – Sharding
• Dynamic — No rigid schema.
• Flexible – field addition/deletion have less or no impact on the application
• Heterogeneous Data
• Capped Collections
• No Joins
• Distributed
• Data Representation in JSON or BSON
• Geospatial support
• Document-based query language that’s nearly as powerful as SQL
• Cloud distributions such as AWS, Microsoft, RedHat,dotCloud and SoftLayer etc:-. In fact, MongoDB is built for the cloud. Its native
scale-out architecture, enabled by ‘sharding,’ aligns well with the horizontal scaling and agility afforded by cloud computing.
Editions of MongoDB
• MongoDB Community Edition ( Free for Production use)
• MongoDB Enterprise Advanced Server ( Paid License)
• MongoDB Atlas ( For Cloud)
• MongoDB Realm for mobile applications
• Upgrading from community edition to enterprise Edition possible
Difference Between Community and
Enterprise Edition
• MongoDB Enterprise provides various features not available in the
MongoDB Community edition, such as:
Taking an example
• MongoDB 4.4 --> MongoDB stable release 4 of version 4( New feature releases
..sometime contains non backward compatible changes )
• MongoDB 4.4.12 --> MongoDB stable release 4 of version 4 with revision number 14(
mostly bug fixes. The changes are backward compatible)
Course Design
What all covered in this course
• This course is designed for MongoDB database administration,
meaning more emphasis is given for database administration topics
than development activities
• Installation and configuration of MongoDB on Linux
• Different options in starting up mongodb server
• Database creation and management
• Creation of collection
• CRUD Operations
What all covered in this course
• Securing MongoDb
• Authorization and authentication
• User & Roles Management
• Backup and Recovery
• Replication Configuration
• Sharding Configuartion