SlideShare uma empresa Scribd logo
1 de 23
Baixar para ler offline
Introduction to
Prof Mayur S Patil,
Assistant Professor,
Dept. of Computer Engineering,
MIT Academy of Engineering, Alandi (D.)
Contents
• Databases
• Purpose of Databases
• Types of Databases
• Relational Model
• Relational Databases
• What is MongoDB?
• Basics of MongoDB
• CRUD Terms
• Limitations
• Current Trending
Databases
• Data + Base
• Add
• Access
• Update
• Delete
Purpose of Databases
• Easy to inject and retrieve data
• Able to store and use sets of data
• To get faster and accurate access of data through organized ways.
• Query data in a database (ask it questions).
• Relate data from two different tables together using JOINs.
• Create meaningful reports from data in a database.
• Information of a given type is always stored only once.
• Fault-tolerant.
• Concurrent; multiple users can use them at the same time without
corrupting the data.
Applications:
Early Phase: Airline, Accounting, Railway reservation.
Now Trending:
 Social Networks: Facebook, Twitter.
 Search Engines: Bing, Google.
 Cloud Services: Amazon, Openstack.
 Big Data: Hadoop.
Types of Databases
• Relational Databases:
 MySQL – Facebook, Twitter.
 PostGreSQL -
 SQLite – Browsers.
• Non Relational Databases:
 MongoDB document
 CouchDB document
 ArangoDB
 Cassandra
Relational Model
• The relational model (RM) for database management is an approach
to managing data using a structure and language.
• In the relational model of a database, all data is represented in terms
of tuples and grouped into relations.
• A database organized in terms of the relational model is a relational
database.
Relational Databases
• A database structured to recognize relations between stored items of
information.
• Data organization approach
 Tables
 Row
 Columns
RDBMS
• Introduction
• Systems that used relational databases known as RDBMS.
• It used SQL.
• DML – Update.
• DDL – New things
• DCL – Control Access
• Advantages
• Building a low-volume, medium-complexity suite of applications that will evolve over time.
• Data volumes (duplicated) would be ridiculous if you didn’t do a reasonable amount of
normalization.
• You simply don’t see a cost/benefit advantage to moving away from proven legacy technology.
• Limitations
• Data Complexity
• Broken Keys and Records
• Developer Expertise
• Hardware Performance
Introduction to MongoDB
• MongoDB (from "humongous“ i.e. huge + Monstrous) is a scalable, high-performance, open
source, schema-free, document-oriented database.
- mongodb.org
• It used NoSQL mechanism.
• A record in MongoDB is a document.
• The advantages of using documents are:
• Documents (i.e. objects) correspond to native data types in many programming languages.
• Data structure composed of field and value pairs.
Comparing Terminologies
SQL Terminologies NoSQL Terminologies
Database Database
Table Collection
Row Document
Features of MongoDB
• High Performance
• I/O results
• Faster keys
• High Availability
• Replica Set
• Automatic Scaling
• Sharding
• Automatic balancing for changes in load and data distribution
• Easy addition of new machines without down time
• Scaling to one thousand nodes
• No single points of failure
• Automatic failover
• One or more shards, each shard holds a portion of the total
• Each shard is backed by a replica set
• Failure Management
• One or more routers, each one acts as a server for one or more clients.
• One or more clients, each one is (part of) the user's application and issues
commands to a router via the mongo client library (driver) for its language.
• mongod is server process and mongos is router process.
Basics of MongoDB
• JSON
•Stores data in Object format.
•It supports nested looping i.e. objects within array.
•Documents enclosed in circular braces.
•Objects are enclosed in curly braces and separated by
commas
•JSON supports
• Number,
• Strings,
• Objects
• Arrays
Example
db.things.save
(
{
a : 1, b : 1,
fruit:
["apple", "grapes", "pear" ]
}
)
BSON
•Its binary JSON i.e. format in which mongodb stores its data.
•MDB drivers send and receive data as BSON from app.
•On app side, MDB drivers maps BSON to native Data types in relative
to programming language.
•Why BSON:
• Lightweight: Its space required to for data keeping is minimum
• Traversable: Writing and reading indexes to MDB
• Efficient: Encoding data to BSON and Decoding from BSON by
drivers for app.
Application
Native Data types
MongoDB
Driver
BSON
Functioning of MongoDB
Working of MongoDB
• MongoDB is a server process that runs on Linux, Windows and
OS X
• It can be run both as a 32 or 64-bit application.
• Clients connect to the MongoDB process.
• MongoDB stores its data in files (default location is /data/db/),
and uses memory mapped files for data management for
efficiency.
CRUD Terms
Create Create Create
Read Insert Insert
Update Update Update
Delete Delete Remove
Limitations
• Joins: between two collections because it is difficult to scale out.
• Transaction: because documents are stored in hierarchical manner so
it is not possible to access those items atomically.
• Naming Restrictions
• Database Name Case Sensitivity
• BSON Documents
• BSON Document Size
• Max connection number is hardcoded to 20k.
• Auto rollback is not for more than 300 MB; more than this manual
intervention is needed.
• To shard a collection, it must be smaller than 256 GB, or else it will likely
fail to shard.
• Map / Reduce are single-threaded.
• Map / Reduce cannot output to sharded collections.
Trending
•Adobe – AEM
•Nokia – For Entertainment databases
•Facebook – Customer Data
•Google – Google Cloud Platform
•Ebay – Media Metadata
THANKS !

Mais conteúdo relacionado

Mais procurados

Mais procurados (20)

Klevis Mino: MongoDB
Klevis Mino: MongoDBKlevis Mino: MongoDB
Klevis Mino: MongoDB
 
MongoDb - Details on the POC
MongoDb - Details on the POCMongoDb - Details on the POC
MongoDb - Details on the POC
 
Open source Technology
Open source TechnologyOpen source Technology
Open source Technology
 
Common MongoDB Use Cases
Common MongoDB Use Cases Common MongoDB Use Cases
Common MongoDB Use Cases
 
NoSQL Databases
NoSQL DatabasesNoSQL Databases
NoSQL Databases
 
No SQL- The Future Of Data Storage
No SQL- The Future Of Data StorageNo SQL- The Future Of Data Storage
No SQL- The Future Of Data Storage
 
Key-Value NoSQL Database
Key-Value NoSQL DatabaseKey-Value NoSQL Database
Key-Value NoSQL Database
 
MongoDB Schema Design by Examples
MongoDB Schema Design by ExamplesMongoDB Schema Design by Examples
MongoDB Schema Design by Examples
 
Introduction to MongoDB
Introduction to MongoDBIntroduction to MongoDB
Introduction to MongoDB
 
9. Document Oriented Databases
9. Document Oriented Databases9. Document Oriented Databases
9. Document Oriented Databases
 
Introduction to NoSQL
Introduction to NoSQLIntroduction to NoSQL
Introduction to NoSQL
 
Introduction to MongoDB
Introduction to MongoDBIntroduction to MongoDB
Introduction to MongoDB
 
Introduction to mongodb
Introduction to mongodbIntroduction to mongodb
Introduction to mongodb
 
NOSQL vs SQL
NOSQL vs SQLNOSQL vs SQL
NOSQL vs SQL
 
An Intro to NoSQL Databases
An Intro to NoSQL DatabasesAn Intro to NoSQL Databases
An Intro to NoSQL Databases
 
MongoDB
MongoDBMongoDB
MongoDB
 
MongoDB: What, why, when
MongoDB: What, why, whenMongoDB: What, why, when
MongoDB: What, why, when
 
Mongo db
Mongo dbMongo db
Mongo db
 
01 nosql and multi model database
01   nosql and multi model database01   nosql and multi model database
01 nosql and multi model database
 
CSCi226PPT1
CSCi226PPT1CSCi226PPT1
CSCi226PPT1
 

Destaque

Behavioural activity monitoring on CoreOS with Sysdig Falco
Behavioural activity monitoring on CoreOS with Sysdig FalcoBehavioural activity monitoring on CoreOS with Sysdig Falco
Behavioural activity monitoring on CoreOS with Sysdig FalcoSysdig
 
Kubernetes Introduction
Kubernetes IntroductionKubernetes Introduction
Kubernetes IntroductionPeng Xiao
 
O'Reilly/Nginx 2016: "Continuous Delivery with Containers: The Trials and Tri...
O'Reilly/Nginx 2016: "Continuous Delivery with Containers: The Trials and Tri...O'Reilly/Nginx 2016: "Continuous Delivery with Containers: The Trials and Tri...
O'Reilly/Nginx 2016: "Continuous Delivery with Containers: The Trials and Tri...Daniel Bryant
 
Kelompok 8 GEMPA BUMI, TSUNAMI DAN GUNUNG BERAPI
Kelompok 8 GEMPA BUMI, TSUNAMI DAN GUNUNG BERAPIKelompok 8 GEMPA BUMI, TSUNAMI DAN GUNUNG BERAPI
Kelompok 8 GEMPA BUMI, TSUNAMI DAN GUNUNG BERAPINanda Reda
 
Kubernetes Immersion
Kubernetes ImmersionKubernetes Immersion
Kubernetes ImmersionJuan Larriba
 
Google Cloud Computing compares GCE, GAE and GKE
Google Cloud Computing compares GCE, GAE and GKEGoogle Cloud Computing compares GCE, GAE and GKE
Google Cloud Computing compares GCE, GAE and GKESimon Su
 
Introduction to container mangement
Introduction to container mangementIntroduction to container mangement
Introduction to container mangementMartin Marcher
 
RootedCON 2017 - Docker might not be your friend. Trojanizing Docker images
RootedCON 2017 - Docker might not be your friend. Trojanizing Docker imagesRootedCON 2017 - Docker might not be your friend. Trojanizing Docker images
RootedCON 2017 - Docker might not be your friend. Trojanizing Docker imagesDaniel Garcia (a.k.a cr0hn)
 

Destaque (9)

Behavioural activity monitoring on CoreOS with Sysdig Falco
Behavioural activity monitoring on CoreOS with Sysdig FalcoBehavioural activity monitoring on CoreOS with Sysdig Falco
Behavioural activity monitoring on CoreOS with Sysdig Falco
 
Kubernetes Introduction
Kubernetes IntroductionKubernetes Introduction
Kubernetes Introduction
 
O'Reilly/Nginx 2016: "Continuous Delivery with Containers: The Trials and Tri...
O'Reilly/Nginx 2016: "Continuous Delivery with Containers: The Trials and Tri...O'Reilly/Nginx 2016: "Continuous Delivery with Containers: The Trials and Tri...
O'Reilly/Nginx 2016: "Continuous Delivery with Containers: The Trials and Tri...
 
Kelompok 8 GEMPA BUMI, TSUNAMI DAN GUNUNG BERAPI
Kelompok 8 GEMPA BUMI, TSUNAMI DAN GUNUNG BERAPIKelompok 8 GEMPA BUMI, TSUNAMI DAN GUNUNG BERAPI
Kelompok 8 GEMPA BUMI, TSUNAMI DAN GUNUNG BERAPI
 
Kubernetes Immersion
Kubernetes ImmersionKubernetes Immersion
Kubernetes Immersion
 
Google Cloud Computing compares GCE, GAE and GKE
Google Cloud Computing compares GCE, GAE and GKEGoogle Cloud Computing compares GCE, GAE and GKE
Google Cloud Computing compares GCE, GAE and GKE
 
Introduction to container mangement
Introduction to container mangementIntroduction to container mangement
Introduction to container mangement
 
RootedCON 2017 - Docker might not be your friend. Trojanizing Docker images
RootedCON 2017 - Docker might not be your friend. Trojanizing Docker imagesRootedCON 2017 - Docker might not be your friend. Trojanizing Docker images
RootedCON 2017 - Docker might not be your friend. Trojanizing Docker images
 
How Google Works
How Google WorksHow Google Works
How Google Works
 

Semelhante a Introduction to MongoDB Basics from SQL to NoSQL

When to Use MongoDB
When to Use MongoDBWhen to Use MongoDB
When to Use MongoDBMongoDB
 
MONGODB VASUDEV PRAJAPATI DOCUMENTBASE DATABASE
MONGODB VASUDEV PRAJAPATI DOCUMENTBASE DATABASEMONGODB VASUDEV PRAJAPATI DOCUMENTBASE DATABASE
MONGODB VASUDEV PRAJAPATI DOCUMENTBASE DATABASEvasustudy176
 
MongoDB.local Sydney: An Introduction to Document Databases with MongoDB
MongoDB.local Sydney: An Introduction to Document Databases with MongoDBMongoDB.local Sydney: An Introduction to Document Databases with MongoDB
MongoDB.local Sydney: An Introduction to Document Databases with MongoDBMongoDB
 
Everything You Need to Know About MongoDB Development.pptx
Everything You Need to Know About MongoDB Development.pptxEverything You Need to Know About MongoDB Development.pptx
Everything You Need to Know About MongoDB Development.pptx75waytechnologies
 
Big Data, NoSQL with MongoDB and Cassasdra
Big Data, NoSQL with MongoDB and CassasdraBig Data, NoSQL with MongoDB and Cassasdra
Big Data, NoSQL with MongoDB and CassasdraBrian Enochson
 
Webinar: When to Use MongoDB
Webinar: When to Use MongoDBWebinar: When to Use MongoDB
Webinar: When to Use MongoDBMongoDB
 
MongoDB Breakfast Milan - Mainframe Offloading Strategies
MongoDB Breakfast Milan -  Mainframe Offloading StrategiesMongoDB Breakfast Milan -  Mainframe Offloading Strategies
MongoDB Breakfast Milan - Mainframe Offloading StrategiesMongoDB
 
MongoDB 2.4 and spring data
MongoDB 2.4 and spring dataMongoDB 2.4 and spring data
MongoDB 2.4 and spring dataJimmy Ray
 
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
 
Dev Jumpstart: Build Your First App with MongoDB
Dev Jumpstart: Build Your First App with MongoDBDev Jumpstart: Build Your First App with MongoDB
Dev Jumpstart: Build Your First App with MongoDBMongoDB
 
how_can_businesses_address_storage_issues_using_mongodb.pdf
how_can_businesses_address_storage_issues_using_mongodb.pdfhow_can_businesses_address_storage_issues_using_mongodb.pdf
how_can_businesses_address_storage_issues_using_mongodb.pdfsarah david
 
MongoDB World 2018: Data Analytics with MongoDB
MongoDB World 2018: Data Analytics with MongoDBMongoDB World 2018: Data Analytics with MongoDB
MongoDB World 2018: Data Analytics with MongoDBMongoDB
 

Semelhante a Introduction to MongoDB Basics from SQL to NoSQL (20)

When to Use MongoDB
When to Use MongoDBWhen to Use MongoDB
When to Use MongoDB
 
MONGODB VASUDEV PRAJAPATI DOCUMENTBASE DATABASE
MONGODB VASUDEV PRAJAPATI DOCUMENTBASE DATABASEMONGODB VASUDEV PRAJAPATI DOCUMENTBASE DATABASE
MONGODB VASUDEV PRAJAPATI DOCUMENTBASE DATABASE
 
Mongodb
MongodbMongodb
Mongodb
 
Mongo db
Mongo dbMongo db
Mongo db
 
Mongo db basics
Mongo db basicsMongo db basics
Mongo db basics
 
MongoDB.local Sydney: An Introduction to Document Databases with MongoDB
MongoDB.local Sydney: An Introduction to Document Databases with MongoDBMongoDB.local Sydney: An Introduction to Document Databases with MongoDB
MongoDB.local Sydney: An Introduction to Document Databases with MongoDB
 
MongoDB
MongoDBMongoDB
MongoDB
 
Mongo db 3.4 Overview
Mongo db 3.4 OverviewMongo db 3.4 Overview
Mongo db 3.4 Overview
 
Everything You Need to Know About MongoDB Development.pptx
Everything You Need to Know About MongoDB Development.pptxEverything You Need to Know About MongoDB Development.pptx
Everything You Need to Know About MongoDB Development.pptx
 
MongoDB
MongoDBMongoDB
MongoDB
 
Big Data, NoSQL with MongoDB and Cassasdra
Big Data, NoSQL with MongoDB and CassasdraBig Data, NoSQL with MongoDB and Cassasdra
Big Data, NoSQL with MongoDB and Cassasdra
 
Webinar: When to Use MongoDB
Webinar: When to Use MongoDBWebinar: When to Use MongoDB
Webinar: When to Use MongoDB
 
MongoDB.pptx
MongoDB.pptxMongoDB.pptx
MongoDB.pptx
 
MongoDB Breakfast Milan - Mainframe Offloading Strategies
MongoDB Breakfast Milan -  Mainframe Offloading StrategiesMongoDB Breakfast Milan -  Mainframe Offloading Strategies
MongoDB Breakfast Milan - Mainframe Offloading Strategies
 
MongoDB 2.4 and spring data
MongoDB 2.4 and spring dataMongoDB 2.4 and spring data
MongoDB 2.4 and spring data
 
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
 
Dev Jumpstart: Build Your First App with MongoDB
Dev Jumpstart: Build Your First App with MongoDBDev Jumpstart: Build Your First App with MongoDB
Dev Jumpstart: Build Your First App with MongoDB
 
how_can_businesses_address_storage_issues_using_mongodb.pdf
how_can_businesses_address_storage_issues_using_mongodb.pdfhow_can_businesses_address_storage_issues_using_mongodb.pdf
how_can_businesses_address_storage_issues_using_mongodb.pdf
 
Mongo DB
Mongo DB Mongo DB
Mongo DB
 
MongoDB World 2018: Data Analytics with MongoDB
MongoDB World 2018: Data Analytics with MongoDBMongoDB World 2018: Data Analytics with MongoDB
MongoDB World 2018: Data Analytics with MongoDB
 

Último

result management system report for college project
result management system report for college projectresult management system report for college project
result management system report for college projectTonystark477637
 
KubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlyKubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlysanyuktamishra911
 
UNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its PerformanceUNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its Performancesivaprakash250
 
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
UNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and workingUNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and workingrknatarajan
 
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130Suhani Kapoor
 
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service NashikCall Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service NashikCall Girls in Nagpur High Profile
 
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...Call Girls in Nagpur High Profile
 
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Dr.Costas Sachpazis
 
UNIT-III FMM. DIMENSIONAL ANALYSIS
UNIT-III FMM.        DIMENSIONAL ANALYSISUNIT-III FMM.        DIMENSIONAL ANALYSIS
UNIT-III FMM. DIMENSIONAL ANALYSISrknatarajan
 
Introduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxIntroduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxupamatechverse
 
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...Soham Mondal
 
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...Christo Ananth
 
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)Suman Mia
 
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVHARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVRajaP95
 
Processing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxProcessing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxpranjaldaimarysona
 
Introduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxIntroduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxupamatechverse
 
IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...
IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...
IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...RajaP95
 

Último (20)

result management system report for college project
result management system report for college projectresult management system report for college project
result management system report for college project
 
KubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlyKubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghly
 
UNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its PerformanceUNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its Performance
 
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
 
UNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and workingUNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and working
 
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
 
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
 
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service NashikCall Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
 
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
 
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
 
UNIT-III FMM. DIMENSIONAL ANALYSIS
UNIT-III FMM.        DIMENSIONAL ANALYSISUNIT-III FMM.        DIMENSIONAL ANALYSIS
UNIT-III FMM. DIMENSIONAL ANALYSIS
 
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINEDJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
 
Introduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxIntroduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptx
 
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
 
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
 
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)
 
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVHARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
 
Processing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxProcessing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptx
 
Introduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxIntroduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptx
 
IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...
IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...
IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...
 

Introduction to MongoDB Basics from SQL to NoSQL

  • 1. Introduction to Prof Mayur S Patil, Assistant Professor, Dept. of Computer Engineering, MIT Academy of Engineering, Alandi (D.)
  • 2. Contents • Databases • Purpose of Databases • Types of Databases • Relational Model • Relational Databases • What is MongoDB? • Basics of MongoDB • CRUD Terms • Limitations • Current Trending
  • 3. Databases • Data + Base • Add • Access • Update • Delete
  • 4. Purpose of Databases • Easy to inject and retrieve data • Able to store and use sets of data • To get faster and accurate access of data through organized ways. • Query data in a database (ask it questions). • Relate data from two different tables together using JOINs. • Create meaningful reports from data in a database. • Information of a given type is always stored only once. • Fault-tolerant. • Concurrent; multiple users can use them at the same time without corrupting the data.
  • 5. Applications: Early Phase: Airline, Accounting, Railway reservation. Now Trending:  Social Networks: Facebook, Twitter.  Search Engines: Bing, Google.  Cloud Services: Amazon, Openstack.  Big Data: Hadoop.
  • 6. Types of Databases • Relational Databases:  MySQL – Facebook, Twitter.  PostGreSQL -  SQLite – Browsers. • Non Relational Databases:  MongoDB document  CouchDB document  ArangoDB  Cassandra
  • 7. Relational Model • The relational model (RM) for database management is an approach to managing data using a structure and language. • In the relational model of a database, all data is represented in terms of tuples and grouped into relations. • A database organized in terms of the relational model is a relational database.
  • 8. Relational Databases • A database structured to recognize relations between stored items of information. • Data organization approach  Tables  Row  Columns
  • 9. RDBMS • Introduction • Systems that used relational databases known as RDBMS. • It used SQL. • DML – Update. • DDL – New things • DCL – Control Access • Advantages • Building a low-volume, medium-complexity suite of applications that will evolve over time. • Data volumes (duplicated) would be ridiculous if you didn’t do a reasonable amount of normalization. • You simply don’t see a cost/benefit advantage to moving away from proven legacy technology. • Limitations • Data Complexity • Broken Keys and Records • Developer Expertise • Hardware Performance
  • 10. Introduction to MongoDB • MongoDB (from "humongous“ i.e. huge + Monstrous) is a scalable, high-performance, open source, schema-free, document-oriented database. - mongodb.org • It used NoSQL mechanism. • A record in MongoDB is a document. • The advantages of using documents are: • Documents (i.e. objects) correspond to native data types in many programming languages. • Data structure composed of field and value pairs.
  • 11. Comparing Terminologies SQL Terminologies NoSQL Terminologies Database Database Table Collection Row Document
  • 12. Features of MongoDB • High Performance • I/O results • Faster keys • High Availability • Replica Set • Automatic Scaling • Sharding • Automatic balancing for changes in load and data distribution • Easy addition of new machines without down time • Scaling to one thousand nodes • No single points of failure • Automatic failover
  • 13. • One or more shards, each shard holds a portion of the total • Each shard is backed by a replica set • Failure Management • One or more routers, each one acts as a server for one or more clients. • One or more clients, each one is (part of) the user's application and issues commands to a router via the mongo client library (driver) for its language. • mongod is server process and mongos is router process.
  • 14. Basics of MongoDB • JSON •Stores data in Object format. •It supports nested looping i.e. objects within array. •Documents enclosed in circular braces. •Objects are enclosed in curly braces and separated by commas •JSON supports • Number, • Strings, • Objects • Arrays
  • 15. Example db.things.save ( { a : 1, b : 1, fruit: ["apple", "grapes", "pear" ] } )
  • 16. BSON •Its binary JSON i.e. format in which mongodb stores its data. •MDB drivers send and receive data as BSON from app. •On app side, MDB drivers maps BSON to native Data types in relative to programming language. •Why BSON: • Lightweight: Its space required to for data keeping is minimum • Traversable: Writing and reading indexes to MDB • Efficient: Encoding data to BSON and Decoding from BSON by drivers for app.
  • 18. Working of MongoDB • MongoDB is a server process that runs on Linux, Windows and OS X • It can be run both as a 32 or 64-bit application. • Clients connect to the MongoDB process. • MongoDB stores its data in files (default location is /data/db/), and uses memory mapped files for data management for efficiency.
  • 19. CRUD Terms Create Create Create Read Insert Insert Update Update Update Delete Delete Remove
  • 20. Limitations • Joins: between two collections because it is difficult to scale out. • Transaction: because documents are stored in hierarchical manner so it is not possible to access those items atomically. • Naming Restrictions • Database Name Case Sensitivity • BSON Documents • BSON Document Size • Max connection number is hardcoded to 20k.
  • 21. • Auto rollback is not for more than 300 MB; more than this manual intervention is needed. • To shard a collection, it must be smaller than 256 GB, or else it will likely fail to shard. • Map / Reduce are single-threaded. • Map / Reduce cannot output to sharded collections.
  • 22. Trending •Adobe – AEM •Nokia – For Entertainment databases •Facebook – Customer Data •Google – Google Cloud Platform •Ebay – Media Metadata