281510lecture - 1 Introduction To MongoDB-1718181125331

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 22

NoSQL Database:

MongoDB
Lecture 1
Introduction to MongoDB
Session Objective
By the end of this class, you will be able
to:

▪ Recall the creators of MongoDB and its


release year
▪ Explain two advantages of MongoDB's
schema-less design
▪ Develop a basic MongoDB data model for a
hypothetical application
Introduction MongoDB

Advantages of MongoDB

The Architecture of MongoDB & Use


Cases
MongoDB

MongoDB is an open-source database that uses a document-


oriented data model and a non-structured query language. It is
one of the most powerful NoSQL systems and databases around,
today.

MongoDB is an open source, non relational database management


system (DBMS) that uses flexible documents instead of tables and
rows to process and store various forms of data.
What is MongoDB?

▪ Being a NoSQL tool means that MongoDB


does not use the usual rows and columns
that you so much associate with relational
database management.

▪ It is an architecture that is built on


collections and documents.

▪ The basic unit of data in this database


consists of a set of key-value pairs. It
allows documents to have different fields
and structures.
What is MongoDB?

▪ This database uses a document storage


format called BSON which is a binary style
of JSON documents.

▪ The data model that MongoDB follows is a


highly elastic one that lets us combine and
store data of multivariate types without
having to compromise on powerful indexing
options, data access, and validation rules.

▪ As a NoSQL database solution, MongoDB


does not require a relational database
management system (RDBMS), so it
provides an elastic data storage model that
enables users to store and query
multivariate data types with ease.
What is MongoDB?

▪ MongoDB documents or collections of


documents are the basic units of data.
Formatted as Binary JSON (Javascript Object
Notation), these documents can store
various types of data and be distributed
across multiple systems.

▪ Since MongoDB employs a dynamic schema


design, users have unparalleled flexibility
when creating data records, querying
document collections through MongoDB
aggregation and analyzing large amounts of
information.
What is MongoDB?

▪ MongoDB is used for high-volume data


storage, helping organizations store large
amounts of data while still performing
rapidly.

▪ Organizations also use MongoDB for its ad-


hoc queries, indexing, load balancing,
aggregation, server-side JavaScript
execution and other features.

▪ Structured Query Language (SQL) is a


standardized programming language that is
used to manage relational databases.

▪ SQL normalized data as schemas and tables,


and every table has a fixed structure.
MongoDB history

▪ MongoDB was created by Dwight Merriman and


Eliot Horowitz, who encountered development
and scalability issues with traditional relational
database approaches while building web
applications at DoubleClick, an online advertising
company that is now owned by Google Inc.

▪ Merriman and Horowitz helped form 10Gen Inc. in


2007 to commercialize MongoDB and related
software.

▪ The company was renamed MongoDB Inc. in 2013


and went public in October 2017 under the ticker
symbol MDB.

▪ Organizations such as the insurance company


MetLife have used MongoDB for customer service
applications, while other websites such as
Craigslist have used it for archiving data.
Introduction MongoDB

Advantages of MongoDB

The Architecture of MongoDB & Use


Cases
Let’s do a quick activity to gain Hands-On Creation of Capped
Collections

In pairs or small groups, instruct students to create a capped


collection in a MongoDB environment.

Guide specifying size limits and configuring relevant options.

Steps:
Connect to a MongoDB server or use a local instance.
Create a capped collection with a defined size limit.
Insert documents into the collection until the size limit is reached.
Observe the automatic removal of older documents.
Advantages of MongoDB

Schema-less: Document- Scalability:


MongoDB doesn't oriented: A core function of
require One of the MongoDB is its
predefined
1 2 advantages of using 3 horizontal scalability,
schemas. documents is that which makes it a
these objects map to useful database for
native data types in companies running
several programming big data applications.
languages.
Advantages of MongoDB(Contd.)

Third-party Aggregation: Long-term


support: The DBMS also has Commitment:
MongoDB supports built-in You would be
several storage aggregation staggered to know
1
4 engines and 25 36
capabilities, which about the
provides pluggable lets users run development of
storage engine MapReduce code this technology.
APIs
Introduction MongoDB

Advantages of MongoDB

The Architecture of MongoDB & Use


Cases
The Architecture of MongoDB NoSQL Database

▪ Database: In simple words, it can be called


the physical container for data. Each of the
databases has its own set of files on the file
system with multiple databases existing on a
single MongoDB server.

▪ Collection: A group of database documents


can be called a collection. The RDBMS
equivalent to a collection is a table. The
entire collection exists within a single
database.

▪ Document: A set of key-value pairs can be


designated as a document. Documents are
associated with dynamic schemas.
MongoDB Use Cases

▪ Some documents are called MongoDB Use


Case documents, which will help in
introducing the operations used, designs,
and patterns in MongoDB application
development.

▪ It will also give some special attention to


scaling, sharding, performance, and
indexing.
Content Management System Case Study

▪ Content Management Systems:

▪ Fundamentals of MongoDB approaches


and practices are introduced in content
management use cases, which would be
done using familiar, simple examples
and problems.

▪ The method for modeling user


comments on content such as media
and blog spots is introduced by ‘Storing
Comments’. A model is proposed for
designing a website content
management system by ‘Metadata and
Asset Management’ in MongoDB.
Product Data Management Case Study

▪ For e-commerce websites and product data


management and solutions, one can use
MongoDB to store information because it has
a flexible schema well suited for the job. One
can also manage a product catalog and learn
the practices and methods for modeling from
the Product Catalog document.

▪ They can also determine the pattern to


handle interactions between users’ shopping
carts and inventory using ‘Inventory
Management’.
Operational Intelligence Case Study

▪ MongoDB is beneficial for real-time analytics


and operational intelligence use. One can
learn ‘Storing Log Data’ Document to know
about the approaches and several ways to
store and model machine-generated data
with MongoDB. They can also determine the
Hierarchical Aggregation Method to store
and process hierarchical reports from raw
event data according to the minute, hour, or
day.
Introduction MongoDB

Advantages of MongoDB

The Architecture of MongoDB & Use


Cases
Let’s do a quick activity to explore practical use cases of
MongoDB in different industries.

Facilitate a group discussion where each pair or group presents their


findings.
Encourage participants to discuss the strengths and potential
challenges of using MongoDB in the given use case.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy