SlideShare a Scribd company logo
#MongoDB

Revolutionizing Application
Development With MongoDB
Jay Runkel
Solutions Architect, MongoDB
Agenda
• What can go wrong?
– Plus, some success stories

• Why are relational projects difficult?
• Why more successful with MongoDB?
Part 1 – What can go wrong?
(and how MongoDB customers
got it right)
Projects Fail
1. Never get to initial version?
2. Initial success, but then can’t scale?
3. Initial success, but new requirements derail them?
4. Application development is slow
Common Reasons
1. Working with unstructured or semi-structure data
2. Polymorphic data
3. Disparate data from multiple sources
4. Platform not architected for scale
5. Development environment does meet developers

needs
The problem is in the foundation
Your Application
RDBMS

Lets look at a few organizations that
chose a different foundation
Example 1 – Managing Diverse
Products
Delivers agile automated supply chain service to
retailers powered by MongoDB
Problem
• RDBMS poorlyequipped to handle
varying data types
(e.g., SKUs, images)
• Inefficient use of
storage in RDBMS
(i.e., 90% empty
columns)

• Complex joins
degraded performance

Why MongoDB
• Document-oriented model
less complex, easier to
code

Results
• Decreased supplier
onboard time by 12x
• Grew from 400K records to
40M in 12 months

• Single data store for
structured, semi-structured
• Significant cost reductions
and unstructured data
on schema design
• Scalability and availability
time, ongoing developer
effort, and storage usage
• Analytics with MapReduce
Example 2 – Multiple Data
Sources
The Wall
–
–
–
–
–

360 real-time view of 100M customers
70 siloed systems
Tried for 2 years on RDBMS
Massive TCO savings
$300M commitment to Big Data

• Why MongoDB?
– Flexible data model
– Fast app development
Example 3 - Scalability
Stores billions of posts in myriad formats with
MongoDB
Problem

Why MongoDB

Results

• 1.5M posts per
day, different structures

• Flexible documentbased model

• Inflexible
MySQL, lengthy delays
for making changes

• Horizontal scalability
built in

• Data piling up in
production database

• Easy to use

• Automated failover
provides high
availability

• Interface in familiar
language

• Schema changes are
quick and easy

• Poor performance

• Initial deployment held
over 5B documents and
10TB of data
Part 2 – Challenges of
Relational Development
Relational: All Data is Column/Row
Customer ID
0
1
2
3
4

First Name
John
Mark
Jay
Meagan
Edward

Last Name
Doe
Smith
Black
White
Daniels

City
New York
San Francisco
Newark
London
Boston

Account Number
10
11
12
13
14
15

Branch ID
100
101
101
200
200
201

Account Type
Checking
Savings
IRA
Checking
Savings
IRA

Customer ID
0
0
0
1
1
2
But, some things are hard to model
Let’s look at a product catalog:
Baseball Bat
-3 length to weight ratio
2-5/8" barrel diameter
Two-piece construction
R2 alloy barrel provides outstanding durability, performance and "pop"
R2 composite handle shifts weight into the bat's knob for ultra-fast swing speeds
Rifle Barrel design removes weight from the barrel for thinner wall thickness
Acoustic barrel offers that sweet-sounding "ping"
Contact grip helps eliminate sting and vibration
AIR Elite is RIP-IT's® fastest BBCOR bat and the one with the most performance
BBCOR certified - approved for high school and collegiate play
Includes RIP-IT's® "Love It Or Return It" 30 Day Refund Policy with free return shipping
Manufacturer's warranty: 400 days
Made in the USA
Model: B1403E
Bat Product Table
Categor
Model
y

Name

Length
to
Barrel
Brand
weight Dia
ratio

Type

Barrel Handle

Bat
Bat

B1403E Air Elite RIP-IT
B1403 Prototype RIP-IT

-3
-3

Bat

Marucc
i

-3

Composit
2 5/8
e
R2 Alloy
2 5/8 One-piece R1 Alloy
AZ3000
aluminu
2 5/8 One-piece
m

-3

Composit
2 5/8
e

Bat

MCB1B

BB14S1

One

S1

Easton

IMX

R2
composi
te
R1 Alloy
AZ3000
aluminu
m
SIC
Black
Carbon

Cert.

BBCOR
BBCOR

Country Price

USA
USA

$399.99
$199.99

BBCOR Imported $199.99

BBCOR China $399.99
Lets Add Gloves

Size: 12"
Infield/Outfield/Pitcher model
2-Piece Web pattern
Most popular MLB® pattern among pitchers
Pro Stock® American steerhide leather offers rugged durability and a superior feel
Dual-Welting™ on "exposed edges" of the fingers helps maintain pocket shape and durability
Pro Stock™ hand-designed pattern for unbeatable craftsmanship
Dri-Lex® ultra-breathable wrist lining repels moisture from your hand
Black leather with rich brown embellishments
Pattern: B212
Model: WTA2000BBB212
Wilson
Bat and Glove Product Table
Categor
Model
y

Bat

Name

Length
to
Barrel
Brand
weight Dia
ratio

Type

Barrel

Handle

Cert. Country Price

R2
Composit
composit
e
R2 Alloy
e
BBCOR

USA

$399.99

USA

$199.99

-3

2 5/8

Bat

B1403E Air Elite RIP-IT
Prototyp
B1403
e
RIP-IT

-3

2 5/8 One-piece R1 Alloy R1 Alloy BBCOR

Bat

MCB1B

-3

2 5/8 One-piece

Easton

-3

Composit
e

Brand

Size

Wilson

12"

One

Bat BB14S1
S1
Categor
Model Name
y
WTA200
0BBB21
Glove
2
A2000
PRO112
Glove
PT

HOH
Pro

Marucci

2 5/8

AL

AL
BBCOR Imported $199.99
SIC
Black
Carbon BBCOR China $399.99

IMX
Web
Position Pattern
Material Color Country Price
Pattern

Infield

Rawling
s
11.25" Outfield

B212
Pro
taper

2-piece Leather
Modified Horwee
Trapn
Eze
Leather

black

Vietnam $299.99

black

China $229.99
Add some baseballs

Cover: Full grain leather for excellent durability
Core: Cushioned cork core
Additions/Technologies: Made to the exact specifications of MLB
Stitching/Seams: 108 classic red stitches/Rawlings® Major League seaming
League/Certification(s): MLB
Balls included per purchase: individual
Recommended Age: All ages
Model : ROMLB
Rawlings
Bat and Glove and Ball Product
Table
Categor
Model
y

Name

Length
to
Barrel
Brand
weight Dia
ratio

Type

Bat

B1403E Air Elite RIP-IT

-3

2 5/8 Composite

Bat

B1403 Prototype RIP-IT
Marucc
MCB1B
One
i

-3

2 5/8 One-piece

-3

2 5/8 One-piece

Easton
Brand

-3
Size

2 5/8 Composite
Position Pattern

Wilson

12"

Bat

Bat
S1
Categor BB14S1
Model Name
y
WTA200
0BBB21
Glove
2
A2000

Infield

B212

PRO112 HOH Rawling
Pro
Categor
Glove Model Name Brand 11.25" Outfield taper
PT
Pro
s
Color Cover
Core
y
DICRLL Little Rawling
Cork
Baseball B1PBG League
s
white Leather rubber
Rawling
Baseball ROML
MLB
s
white Leather cork

Barrel

Handle

Cert. Country Price

R2
BBCO
R2 Alloy composite R
USA $399.99
BBCO
R1 Alloy R1 Alloy
R
USA $199.99
BBCO
AL
AL
R Imported $199.99
SIC Black BBCO
IMX
Carbon
R
China $399.99
Web
Material Color Country Price
Pattern

2-piece Leather
Modified Horwee
Trapn
Eze
Leather

black

Vietnam $299.99

black
Cert.

China
Country $229.99
Price

Little
League

China

$4.99

China

$6.99
Sparse Table

Length
Catego
to
Barrel
Model Name Brand
ry
weight Dia
ratio

Type

Barrel Handle

Certific Countr
Price
ation
y

Size

Bat

B1403E

Air Elite

RIP-IT

-3

2 5/8 Composite

R2 Alloy

R2 composite BBCOR

USA

B1403

Prototype

RIP-IT

-3

2 5/8 One-piece

R1 Alloy

R1 Alloy

BBCOR

USA

$199.99

2 5/8 One-piece

AZ3000
aluminum

AZ3000
aluminum

BBCOR

Imported

$199.99

IMX

SIC Black
Carbon

BBCOR

China

$399.99

Vietnam

$299.99 12"

Core

$399.99

Bat

Positio
Web Materia
Pattern
Color Cover
n
Pattern
l

Bat

MCB1B

One

Bat

BB14S1

Glove

WTA2000BBB
212
A2000

S1

HOH Pro

Marucci
Easton
Wilson

-3
-3

2 5/8 Composite

2-piece

Leather

black

Pro taper

Modified
Trap-Eze

Horween
Leather

black

PRO112PT

Rawlings

China

Baseball

DICRLLB1PBG Little League Rawlings

Little League China

$4.99

white

Leather

cork and
rubber

Baseball

ROML

China

$6.99

white

Leather

cork

Rawlings

Outfield

B212

Glove

MLB

$229.99 11.25"

Infield

Continue adding columns as you add new products
Maybe this design will work better
prodI
D
Catego
Model
Name
Brand Country Price
ry
prodID
1
Bat B1403E Air Elite RIP-IT
USA $399.99
2
Bat
B1403 Prototype RIP-IT
USA $199.99
Importe
3
Bat
MCB1B
One
Marucci
d
$199.99
4
Bat BB14S1
S1
Easton China $399.99
WTA200
0BBB21
5
Glove
2
A2000 Wilson Vietnam $299.99
PRO112
Rawling
6
Glove
PT
HOH Pro
s
China $229.99
Basebal DICRLL
Little
Rawling
7
l
B1PBG League
s
China
$4.99
Basebal
Rawling
8
l
ROML
MLB
s
China
$6.99

1
1
1
1

property value
length/wei
ght
-3
barrel dia 2 5/8
composi
type
te
certificatio
n
BBCOR

…
5
5
5
5
5

size
position
pattern
material
color

12
infield
B212
leather
black

…
8
8
8

color
cover
core

white
leather
cork
What about this product?
One product = a set of products
Lists are hard
Need more tables

Properties

Product

Sub
Products
Add this product?
More complexity
There are solutions
Designing/redesigning takes
time
More tables?
This is hard…
Long time to develop…
Difficult to change…
Queries are complex…
What happens when there are new requirements?
It is hard to iterate
New
Table

New
Column

New
Table
Name

Pet

Phone

New
Column

3 months later…

Email
Have to Manage Changes in 3 Places

Code

XML Config

DB Schema

Application

Object Relational
Mapping

Relational
Database
What if we need to scale? (Scale
Up)
Part 3 - Application
Development is simpler in
MongoDB
Instead Match the Data in your
Application
Relational

MongoDB
{

}

customer_id : 1,
first_name : "Mark",
last_name : "Smith",
city : "San Francisco",
accounts : [
{
account_number : 13,
branch_ID : 200,
account_type : "Checking"
},
{
account_number : 14,
branch_ID : 200,
account_type : ”IRA”,
beneficiaries: […]
}]
Let’s go back to our product catalog
How would we model this
in MongoDB?
Size: 12"
Infield/Outfield/Pitcher model
2-Piece Web pattern
Most popular MLB® pattern among pitchers
Pro Stock® American steerhide leather offers rugged durability and a superior feel
Dual-Welting™ on "exposed edges" of the fingers helps maintain pocket shape and durability
Pro Stock™ hand-designed pattern for unbeatable craftsmanship
Dri-Lex® ultra-breathable wrist lining repels moisture from your hand
Black leather with rich brown embellishments
Pattern: B212
Model: WTA2000BBB212
Wilson
We use a document
{
category: “glove”,
model: “PRO112PT”,
name: “Air Elite”,
brand: “Rawlings”,
price: 229.99,
available: Date(“2013-03-31”)

Fields

}

Values

Field values
are typed
Documents are rich structures
{
category: “glove”,
model: “PRO112PT”,
name: “Air Elite”,
brand: “Rawlings”,
price: 229.99,
available: Date(“2013-03-31”),
position: [“infield”, “outfield”, “pitcher”]
}

Fields can contain arrays
Documents are rich structures
{
category: “glove”,
model: “PRO112PT”,
name: “Air Elite”,
brand: “Rawlings”,
price: 229.99,
available: Date(“2013-03-31”),
position: [“infield”, “outfield”,
“pitcher”],
endorsed: {name: “Ryan Howard”,
team: “Phillies”,
position: “first base”},
}

Fields can contain
sub-documents
Documents are rich structures
{
category: “glove”,
model: “PRO112PT”,
name: “Air Elite”,
brand: “Rawlings”,
price: 229.99,
available: Date(“2013-03-31”),
position: [“infield”, “outfield”, “pitcher”],
endorsed: {name: “Ryan Howard”,
team: “Phillies”,
position: “first base”},
history: [{date: Date(“2013-03-31”), price: 279.99},
{date: Date(“2013-06-01”), price: 259.79},
{date: Date(“2013-08-15”), price: 229.99}]
}

Fields can contain
an array of subdocuments
Document flexibility makes life
easy…
Variation is easy with document
model
{

category: glove,
model: PRO112PT,
name: Air Elite,
brand: “Rawlings”,
price: “229.99”

category: bat,
model: B1403E,
name: Air Elite,
brand: “Rip-IT”,
price: 399.99

size: 11.25,
position: outfield,
pattern: “Pro taper”,
material: leather,
color: black

diameter: “2 5/8”,
barrel: R2 Alloy,
handle: R2 Composite,
type: composite,
}
{

}
{
category: ball,

model: ROML,
name: MLB,
brand: “Rawlings”,
price: “6.99”

cover: leather,
core: cork,
color: white
}
MongoDB: Adapting to new
requirements
meta

meta

meta

meta

…

meta

meta

meta

meta

Legacy
data

New
data
Life is much easier for developers
Code

XML Config

DB Schema

Application

Object Relational
Mapping

Relational
Database

Code

Text Search
Rich
Queries

Application

Geospatial

Aggregatio
n
Map Reduce
Write queries using familiar language
Drivers
Drivers for most popular
programming languages and
frameworks

Java

Ruby

JavaScript

Perl

Python

Shell
Command-line shell for interacting
directly with database

> db.collection.insert({company:“10gen”, product:“MongoDB”})
>
> db.collection.findOne()
{
“_id”: ObjectId(“5106c1c2fc629bfe52792e86”),
“company”: “10gen”
“product”: “MongoDB”
}

Haskell
Queries are easier to develop
> db.products.find( { “position” : “infield”,
“endorsed.team” : “Phillies” } )
{
category: “glove”,
model: “PRO112PT”,
name: “Air Elite”,
brand: “Rawlings”,
price: 229.99,
available: Date(“2013-03-31”),
position: [“infield”, “outfield”, “pitcher”],
endorsed: {name: “Ryan Howard”,
team: “Phillies”,
position: “first base”},

}
Performance/Scalability
Scaling in MongoDB is easy
And it is not expensive
Horizontal Scalability (Scale Out)
Sharding

Key Range
0..100
Mongod

Read/Write Scalability
Sharding

Key Range
0..40

Key Range
40..100

Mongod

Mongod

Read/Write Scalability
Sharding

Key Range
0..24

Key Range
25..40

Key Range
41..70

Key Range
71..100

Mongod

Mongod

Mongod

Mongod

Read/Write Scalability
Summary
Relational DBs don’t work for modern
applications
•

Application foundation doesn’t support data
requirements
•
•

Product catalog
Integrating data from multiple systems

•

Developers manage lots of complexity

•

Change is onerous

•

Scaling is expensive

Your Application
RDBMS
Life is simpler with MongoDB
•

Flexible Document Model

•

Easily supports
•
•

New data
Changing requirements

•

Developer friendly

•

Scales horizontially
•

Low cost

Your Application

RDBMS
Follow the lead…

And over 600 other organizations…
Questions?
#MongoDB

Thank You
Jay Runkel
jay.runkel@mongodb.com
@jayrunkel
Solutions Architect, MongoDB

More Related Content

PPT
eDays - Quadrem Approach
PPTX
Data Treatment MongoDB
PPT
How Retail Banks Use MongoDB
PPTX
Operationalizing the Value of MongoDB: The MetLife Experience
PDF
Single View of the Customer
PPTX
Best Practices for MongoDB in Today's Telecommunications Market
PDF
Drop your table ! MongoDB Schema Design
PDF
Introduction to NoSQL with MongoDB - SQLi Workshop
eDays - Quadrem Approach
Data Treatment MongoDB
How Retail Banks Use MongoDB
Operationalizing the Value of MongoDB: The MetLife Experience
Single View of the Customer
Best Practices for MongoDB in Today's Telecommunications Market
Drop your table ! MongoDB Schema Design
Introduction to NoSQL with MongoDB - SQLi Workshop

Similar to Webinar: Revolutionizing Application Development with MongoDB (20)

KEY
MongoDB, E-commerce and Transactions
PPTX
MongoDB Schema Design: Practical Applications and Implications
PPTX
Quantifying Business Advantage: The Value of Database Selection
PDF
A Brief Introduction: MongoDB
PDF
Mongodb Introduction
PPTX
Nosql Now 2012: MongoDB Use Cases
PPTX
La nuova architettura di classe enterprise
PDF
10gen telco white_paper
PDF
Data_Modeling_MongoDB.pdf
PPTX
Mongodb Presentation
PPTX
Mongodb hashim shaikh
PDF
Rails with MongoDB
PDF
Database madness with_mongoengine_and_sql_alchemy
PDF
Expanding Retail Frontiers with MongoDB
PDF
Big Data for the Rest of Us - OpenWest 2014 - Matt Asay
PDF
Finding Love with MongoDB
PDF
MongoDB@sfr.fr
PPTX
Branf final bringing mongodb into your organization - mongo db-boston2012
PPTX
tranSMART Community Meeting 5-7 Nov 13 - Session 2: MongoDB: What, Why And When
KEY
Optimize drupal using mongo db
MongoDB, E-commerce and Transactions
MongoDB Schema Design: Practical Applications and Implications
Quantifying Business Advantage: The Value of Database Selection
A Brief Introduction: MongoDB
Mongodb Introduction
Nosql Now 2012: MongoDB Use Cases
La nuova architettura di classe enterprise
10gen telco white_paper
Data_Modeling_MongoDB.pdf
Mongodb Presentation
Mongodb hashim shaikh
Rails with MongoDB
Database madness with_mongoengine_and_sql_alchemy
Expanding Retail Frontiers with MongoDB
Big Data for the Rest of Us - OpenWest 2014 - Matt Asay
Finding Love with MongoDB
MongoDB@sfr.fr
Branf final bringing mongodb into your organization - mongo db-boston2012
tranSMART Community Meeting 5-7 Nov 13 - Session 2: MongoDB: What, Why And When
Optimize drupal using mongo db
Ad

More from MongoDB (20)

PDF
MongoDB SoCal 2020: Migrate Anything* to MongoDB Atlas
PDF
MongoDB SoCal 2020: Go on a Data Safari with MongoDB Charts!
PDF
MongoDB SoCal 2020: Using MongoDB Services in Kubernetes: Any Platform, Devel...
PDF
MongoDB SoCal 2020: A Complete Methodology of Data Modeling for MongoDB
PDF
MongoDB SoCal 2020: From Pharmacist to Analyst: Leveraging MongoDB for Real-T...
PDF
MongoDB SoCal 2020: Best Practices for Working with IoT and Time-series Data
PDF
MongoDB SoCal 2020: MongoDB Atlas Jump Start
PDF
MongoDB .local San Francisco 2020: Powering the new age data demands [Infosys]
PDF
MongoDB .local San Francisco 2020: Using Client Side Encryption in MongoDB 4.2
PDF
MongoDB .local San Francisco 2020: Using MongoDB Services in Kubernetes: any ...
PDF
MongoDB .local San Francisco 2020: Go on a Data Safari with MongoDB Charts!
PDF
MongoDB .local San Francisco 2020: From SQL to NoSQL -- Changing Your Mindset
PDF
MongoDB .local San Francisco 2020: MongoDB Atlas Jumpstart
PDF
MongoDB .local San Francisco 2020: Tips and Tricks++ for Querying and Indexin...
PDF
MongoDB .local San Francisco 2020: Aggregation Pipeline Power++
PDF
MongoDB .local San Francisco 2020: A Complete Methodology of Data Modeling fo...
PDF
MongoDB .local San Francisco 2020: MongoDB Atlas Data Lake Technical Deep Dive
PDF
MongoDB .local San Francisco 2020: Developing Alexa Skills with MongoDB & Golang
PDF
MongoDB .local Paris 2020: Realm : l'ingrédient secret pour de meilleures app...
PDF
MongoDB .local Paris 2020: Upply @MongoDB : Upply : Quand le Machine Learning...
MongoDB SoCal 2020: Migrate Anything* to MongoDB Atlas
MongoDB SoCal 2020: Go on a Data Safari with MongoDB Charts!
MongoDB SoCal 2020: Using MongoDB Services in Kubernetes: Any Platform, Devel...
MongoDB SoCal 2020: A Complete Methodology of Data Modeling for MongoDB
MongoDB SoCal 2020: From Pharmacist to Analyst: Leveraging MongoDB for Real-T...
MongoDB SoCal 2020: Best Practices for Working with IoT and Time-series Data
MongoDB SoCal 2020: MongoDB Atlas Jump Start
MongoDB .local San Francisco 2020: Powering the new age data demands [Infosys]
MongoDB .local San Francisco 2020: Using Client Side Encryption in MongoDB 4.2
MongoDB .local San Francisco 2020: Using MongoDB Services in Kubernetes: any ...
MongoDB .local San Francisco 2020: Go on a Data Safari with MongoDB Charts!
MongoDB .local San Francisco 2020: From SQL to NoSQL -- Changing Your Mindset
MongoDB .local San Francisco 2020: MongoDB Atlas Jumpstart
MongoDB .local San Francisco 2020: Tips and Tricks++ for Querying and Indexin...
MongoDB .local San Francisco 2020: Aggregation Pipeline Power++
MongoDB .local San Francisco 2020: A Complete Methodology of Data Modeling fo...
MongoDB .local San Francisco 2020: MongoDB Atlas Data Lake Technical Deep Dive
MongoDB .local San Francisco 2020: Developing Alexa Skills with MongoDB & Golang
MongoDB .local Paris 2020: Realm : l'ingrédient secret pour de meilleures app...
MongoDB .local Paris 2020: Upply @MongoDB : Upply : Quand le Machine Learning...
Ad

Recently uploaded (20)

PDF
Chapter 3 Spatial Domain Image Processing.pdf
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PDF
MIND Revenue Release Quarter 2 2025 Press Release
PDF
Review of recent advances in non-invasive hemoglobin estimation
PDF
Machine learning based COVID-19 study performance prediction
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PDF
Spectral efficient network and resource selection model in 5G networks
PPTX
sap open course for s4hana steps from ECC to s4
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PDF
Empathic Computing: Creating Shared Understanding
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PPTX
MYSQL Presentation for SQL database connectivity
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PPTX
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
PDF
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Chapter 3 Spatial Domain Image Processing.pdf
The Rise and Fall of 3GPP – Time for a Sabbatical?
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
MIND Revenue Release Quarter 2 2025 Press Release
Review of recent advances in non-invasive hemoglobin estimation
Machine learning based COVID-19 study performance prediction
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
Spectral efficient network and resource selection model in 5G networks
sap open course for s4hana steps from ECC to s4
Diabetes mellitus diagnosis method based random forest with bat algorithm
Empathic Computing: Creating Shared Understanding
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
MYSQL Presentation for SQL database connectivity
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
Building Integrated photovoltaic BIPV_UPV.pdf
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...

Webinar: Revolutionizing Application Development with MongoDB

  • 1. #MongoDB Revolutionizing Application Development With MongoDB Jay Runkel Solutions Architect, MongoDB
  • 2. Agenda • What can go wrong? – Plus, some success stories • Why are relational projects difficult? • Why more successful with MongoDB?
  • 3. Part 1 – What can go wrong? (and how MongoDB customers got it right)
  • 4. Projects Fail 1. Never get to initial version? 2. Initial success, but then can’t scale? 3. Initial success, but new requirements derail them? 4. Application development is slow
  • 5. Common Reasons 1. Working with unstructured or semi-structure data 2. Polymorphic data 3. Disparate data from multiple sources 4. Platform not architected for scale 5. Development environment does meet developers needs
  • 6. The problem is in the foundation Your Application RDBMS Lets look at a few organizations that chose a different foundation
  • 7. Example 1 – Managing Diverse Products Delivers agile automated supply chain service to retailers powered by MongoDB Problem • RDBMS poorlyequipped to handle varying data types (e.g., SKUs, images) • Inefficient use of storage in RDBMS (i.e., 90% empty columns) • Complex joins degraded performance Why MongoDB • Document-oriented model less complex, easier to code Results • Decreased supplier onboard time by 12x • Grew from 400K records to 40M in 12 months • Single data store for structured, semi-structured • Significant cost reductions and unstructured data on schema design • Scalability and availability time, ongoing developer effort, and storage usage • Analytics with MapReduce
  • 8. Example 2 – Multiple Data Sources The Wall – – – – – 360 real-time view of 100M customers 70 siloed systems Tried for 2 years on RDBMS Massive TCO savings $300M commitment to Big Data • Why MongoDB? – Flexible data model – Fast app development
  • 9. Example 3 - Scalability Stores billions of posts in myriad formats with MongoDB Problem Why MongoDB Results • 1.5M posts per day, different structures • Flexible documentbased model • Inflexible MySQL, lengthy delays for making changes • Horizontal scalability built in • Data piling up in production database • Easy to use • Automated failover provides high availability • Interface in familiar language • Schema changes are quick and easy • Poor performance • Initial deployment held over 5B documents and 10TB of data
  • 10. Part 2 – Challenges of Relational Development
  • 11. Relational: All Data is Column/Row Customer ID 0 1 2 3 4 First Name John Mark Jay Meagan Edward Last Name Doe Smith Black White Daniels City New York San Francisco Newark London Boston Account Number 10 11 12 13 14 15 Branch ID 100 101 101 200 200 201 Account Type Checking Savings IRA Checking Savings IRA Customer ID 0 0 0 1 1 2
  • 12. But, some things are hard to model Let’s look at a product catalog:
  • 13. Baseball Bat -3 length to weight ratio 2-5/8" barrel diameter Two-piece construction R2 alloy barrel provides outstanding durability, performance and "pop" R2 composite handle shifts weight into the bat's knob for ultra-fast swing speeds Rifle Barrel design removes weight from the barrel for thinner wall thickness Acoustic barrel offers that sweet-sounding "ping" Contact grip helps eliminate sting and vibration AIR Elite is RIP-IT's® fastest BBCOR bat and the one with the most performance BBCOR certified - approved for high school and collegiate play Includes RIP-IT's® "Love It Or Return It" 30 Day Refund Policy with free return shipping Manufacturer's warranty: 400 days Made in the USA Model: B1403E
  • 14. Bat Product Table Categor Model y Name Length to Barrel Brand weight Dia ratio Type Barrel Handle Bat Bat B1403E Air Elite RIP-IT B1403 Prototype RIP-IT -3 -3 Bat Marucc i -3 Composit 2 5/8 e R2 Alloy 2 5/8 One-piece R1 Alloy AZ3000 aluminu 2 5/8 One-piece m -3 Composit 2 5/8 e Bat MCB1B BB14S1 One S1 Easton IMX R2 composi te R1 Alloy AZ3000 aluminu m SIC Black Carbon Cert. BBCOR BBCOR Country Price USA USA $399.99 $199.99 BBCOR Imported $199.99 BBCOR China $399.99
  • 15. Lets Add Gloves Size: 12" Infield/Outfield/Pitcher model 2-Piece Web pattern Most popular MLB® pattern among pitchers Pro Stock® American steerhide leather offers rugged durability and a superior feel Dual-Welting™ on "exposed edges" of the fingers helps maintain pocket shape and durability Pro Stock™ hand-designed pattern for unbeatable craftsmanship Dri-Lex® ultra-breathable wrist lining repels moisture from your hand Black leather with rich brown embellishments Pattern: B212 Model: WTA2000BBB212 Wilson
  • 16. Bat and Glove Product Table Categor Model y Bat Name Length to Barrel Brand weight Dia ratio Type Barrel Handle Cert. Country Price R2 Composit composit e R2 Alloy e BBCOR USA $399.99 USA $199.99 -3 2 5/8 Bat B1403E Air Elite RIP-IT Prototyp B1403 e RIP-IT -3 2 5/8 One-piece R1 Alloy R1 Alloy BBCOR Bat MCB1B -3 2 5/8 One-piece Easton -3 Composit e Brand Size Wilson 12" One Bat BB14S1 S1 Categor Model Name y WTA200 0BBB21 Glove 2 A2000 PRO112 Glove PT HOH Pro Marucci 2 5/8 AL AL BBCOR Imported $199.99 SIC Black Carbon BBCOR China $399.99 IMX Web Position Pattern Material Color Country Price Pattern Infield Rawling s 11.25" Outfield B212 Pro taper 2-piece Leather Modified Horwee Trapn Eze Leather black Vietnam $299.99 black China $229.99
  • 17. Add some baseballs Cover: Full grain leather for excellent durability Core: Cushioned cork core Additions/Technologies: Made to the exact specifications of MLB Stitching/Seams: 108 classic red stitches/Rawlings® Major League seaming League/Certification(s): MLB Balls included per purchase: individual Recommended Age: All ages Model : ROMLB Rawlings
  • 18. Bat and Glove and Ball Product Table Categor Model y Name Length to Barrel Brand weight Dia ratio Type Bat B1403E Air Elite RIP-IT -3 2 5/8 Composite Bat B1403 Prototype RIP-IT Marucc MCB1B One i -3 2 5/8 One-piece -3 2 5/8 One-piece Easton Brand -3 Size 2 5/8 Composite Position Pattern Wilson 12" Bat Bat S1 Categor BB14S1 Model Name y WTA200 0BBB21 Glove 2 A2000 Infield B212 PRO112 HOH Rawling Pro Categor Glove Model Name Brand 11.25" Outfield taper PT Pro s Color Cover Core y DICRLL Little Rawling Cork Baseball B1PBG League s white Leather rubber Rawling Baseball ROML MLB s white Leather cork Barrel Handle Cert. Country Price R2 BBCO R2 Alloy composite R USA $399.99 BBCO R1 Alloy R1 Alloy R USA $199.99 BBCO AL AL R Imported $199.99 SIC Black BBCO IMX Carbon R China $399.99 Web Material Color Country Price Pattern 2-piece Leather Modified Horwee Trapn Eze Leather black Vietnam $299.99 black Cert. China Country $229.99 Price Little League China $4.99 China $6.99
  • 19. Sparse Table Length Catego to Barrel Model Name Brand ry weight Dia ratio Type Barrel Handle Certific Countr Price ation y Size Bat B1403E Air Elite RIP-IT -3 2 5/8 Composite R2 Alloy R2 composite BBCOR USA B1403 Prototype RIP-IT -3 2 5/8 One-piece R1 Alloy R1 Alloy BBCOR USA $199.99 2 5/8 One-piece AZ3000 aluminum AZ3000 aluminum BBCOR Imported $199.99 IMX SIC Black Carbon BBCOR China $399.99 Vietnam $299.99 12" Core $399.99 Bat Positio Web Materia Pattern Color Cover n Pattern l Bat MCB1B One Bat BB14S1 Glove WTA2000BBB 212 A2000 S1 HOH Pro Marucci Easton Wilson -3 -3 2 5/8 Composite 2-piece Leather black Pro taper Modified Trap-Eze Horween Leather black PRO112PT Rawlings China Baseball DICRLLB1PBG Little League Rawlings Little League China $4.99 white Leather cork and rubber Baseball ROML China $6.99 white Leather cork Rawlings Outfield B212 Glove MLB $229.99 11.25" Infield Continue adding columns as you add new products
  • 20. Maybe this design will work better prodI D Catego Model Name Brand Country Price ry prodID 1 Bat B1403E Air Elite RIP-IT USA $399.99 2 Bat B1403 Prototype RIP-IT USA $199.99 Importe 3 Bat MCB1B One Marucci d $199.99 4 Bat BB14S1 S1 Easton China $399.99 WTA200 0BBB21 5 Glove 2 A2000 Wilson Vietnam $299.99 PRO112 Rawling 6 Glove PT HOH Pro s China $229.99 Basebal DICRLL Little Rawling 7 l B1PBG League s China $4.99 Basebal Rawling 8 l ROML MLB s China $6.99 1 1 1 1 property value length/wei ght -3 barrel dia 2 5/8 composi type te certificatio n BBCOR … 5 5 5 5 5 size position pattern material color 12 infield B212 leather black … 8 8 8 color cover core white leather cork
  • 21. What about this product? One product = a set of products Lists are hard Need more tables Properties Product Sub Products
  • 22. Add this product? More complexity There are solutions Designing/redesigning takes time More tables?
  • 23. This is hard… Long time to develop… Difficult to change… Queries are complex…
  • 24. What happens when there are new requirements?
  • 25. It is hard to iterate New Table New Column New Table Name Pet Phone New Column 3 months later… Email
  • 26. Have to Manage Changes in 3 Places Code XML Config DB Schema Application Object Relational Mapping Relational Database
  • 27. What if we need to scale? (Scale Up)
  • 28. Part 3 - Application Development is simpler in MongoDB
  • 29. Instead Match the Data in your Application Relational MongoDB { } customer_id : 1, first_name : "Mark", last_name : "Smith", city : "San Francisco", accounts : [ { account_number : 13, branch_ID : 200, account_type : "Checking" }, { account_number : 14, branch_ID : 200, account_type : ”IRA”, beneficiaries: […] }]
  • 30. Let’s go back to our product catalog
  • 31. How would we model this in MongoDB? Size: 12" Infield/Outfield/Pitcher model 2-Piece Web pattern Most popular MLB® pattern among pitchers Pro Stock® American steerhide leather offers rugged durability and a superior feel Dual-Welting™ on "exposed edges" of the fingers helps maintain pocket shape and durability Pro Stock™ hand-designed pattern for unbeatable craftsmanship Dri-Lex® ultra-breathable wrist lining repels moisture from your hand Black leather with rich brown embellishments Pattern: B212 Model: WTA2000BBB212 Wilson
  • 32. We use a document { category: “glove”, model: “PRO112PT”, name: “Air Elite”, brand: “Rawlings”, price: 229.99, available: Date(“2013-03-31”) Fields } Values Field values are typed
  • 33. Documents are rich structures { category: “glove”, model: “PRO112PT”, name: “Air Elite”, brand: “Rawlings”, price: 229.99, available: Date(“2013-03-31”), position: [“infield”, “outfield”, “pitcher”] } Fields can contain arrays
  • 34. Documents are rich structures { category: “glove”, model: “PRO112PT”, name: “Air Elite”, brand: “Rawlings”, price: 229.99, available: Date(“2013-03-31”), position: [“infield”, “outfield”, “pitcher”], endorsed: {name: “Ryan Howard”, team: “Phillies”, position: “first base”}, } Fields can contain sub-documents
  • 35. Documents are rich structures { category: “glove”, model: “PRO112PT”, name: “Air Elite”, brand: “Rawlings”, price: 229.99, available: Date(“2013-03-31”), position: [“infield”, “outfield”, “pitcher”], endorsed: {name: “Ryan Howard”, team: “Phillies”, position: “first base”}, history: [{date: Date(“2013-03-31”), price: 279.99}, {date: Date(“2013-06-01”), price: 259.79}, {date: Date(“2013-08-15”), price: 229.99}] } Fields can contain an array of subdocuments
  • 37. Variation is easy with document model { category: glove, model: PRO112PT, name: Air Elite, brand: “Rawlings”, price: “229.99” category: bat, model: B1403E, name: Air Elite, brand: “Rip-IT”, price: 399.99 size: 11.25, position: outfield, pattern: “Pro taper”, material: leather, color: black diameter: “2 5/8”, barrel: R2 Alloy, handle: R2 Composite, type: composite, } { } { category: ball, model: ROML, name: MLB, brand: “Rawlings”, price: “6.99” cover: leather, core: cork, color: white }
  • 38. MongoDB: Adapting to new requirements meta meta meta meta … meta meta meta meta Legacy data New data
  • 39. Life is much easier for developers Code XML Config DB Schema Application Object Relational Mapping Relational Database Code Text Search Rich Queries Application Geospatial Aggregatio n Map Reduce
  • 40. Write queries using familiar language Drivers Drivers for most popular programming languages and frameworks Java Ruby JavaScript Perl Python Shell Command-line shell for interacting directly with database > db.collection.insert({company:“10gen”, product:“MongoDB”}) > > db.collection.findOne() { “_id”: ObjectId(“5106c1c2fc629bfe52792e86”), “company”: “10gen” “product”: “MongoDB” } Haskell
  • 41. Queries are easier to develop > db.products.find( { “position” : “infield”, “endorsed.team” : “Phillies” } ) { category: “glove”, model: “PRO112PT”, name: “Air Elite”, brand: “Rawlings”, price: 229.99, available: Date(“2013-03-31”), position: [“infield”, “outfield”, “pitcher”], endorsed: {name: “Ryan Howard”, team: “Phillies”, position: “first base”}, }
  • 43. Scaling in MongoDB is easy And it is not expensive
  • 47. Sharding Key Range 0..24 Key Range 25..40 Key Range 41..70 Key Range 71..100 Mongod Mongod Mongod Mongod Read/Write Scalability
  • 49. Relational DBs don’t work for modern applications • Application foundation doesn’t support data requirements • • Product catalog Integrating data from multiple systems • Developers manage lots of complexity • Change is onerous • Scaling is expensive Your Application RDBMS
  • 50. Life is simpler with MongoDB • Flexible Document Model • Easily supports • • New data Changing requirements • Developer friendly • Scales horizontially • Low cost Your Application RDBMS
  • 51. Follow the lead… And over 600 other organizations…

Editor's Notes

  • #29: From mainframes, to RAC Oracle servers... People solved problems by adding more resources to a single machine.
  • #44: secondary indexes, compound indexes, multikey indexes.why is it important to have all of document together? data locality
  • #49: Large scale operation can be combined with high performance on commodity hardware through horizontal scalingBuild - Document oriented database maps perfectly to object oriented languagesScale - MongoDB presents clear path to scalability that isn't ops intensive - Provides same interface for sharded cluster as single instance