SlideShare una empresa de Scribd logo
1 de 32
MongoDB 3.2 –
Document Validation
Andrew Morgan
@andrewmorgan |
andrew.morgan@mongodb.com
29th October 2015
2
DISCLAIMER: MongoDB's product plans are for
informational purposes only. MongoDB's plans
may change and you should not rely on them for
delivery of a specific feature at a specific time.
Agenda
Value of flexible schemas
Downside of flexible schemas
What 3.2 adds
What 3.2 doesn’t add
Options
Production lifecycle to add Document Validation
Walkthrough
Power of flexible schemas
RDBMS MongoDB
{
_id: ObjectId("4c4ba5e5e8aabf3"),
employee_name: {First: "Billy",
Last: "Fish"},
department: "Engineering",
title: "Aquarium design",
pay_band: "C",
benefits: [
{ type: "Health",
plan: "PPO Plus" },
{ type: "Dental",
plan: "Standard" }
]
}
Power of flexible schemas
{
_id: ObjectId("4c4ba5e5e8aabf3"),
employee_name: {
First: "Billy",
Last: "Fish"},
department: "Engineering",
title: "Aquarium design",
pay_band: "C",
benefits: [
{type: "Health",
plan: "PPO Plus" },
{type: "Dental",
plan: "Standard" }
]
}
• Relational
– Up-front schema definition phase
– Adding new column takes time to
develop & *lots* of time to roll out in
production
• Existing rows must be reformatted
• MongoDB:
– Start hacking your app right away
– Want to store new type of information?
• Just start adding it
• If it doesn’t apply to all instances –
just leave it out
Power of flexible schemas
{
_id: ObjectId("4c4ba5e5e8aabf3"),
employee_name: {
First: "Billy",
Last: "Fish"},
department: "Engineering",
title: "Aquarium design",
pay_band: "C",
benefits: [
{type: "Health",
plan: "PPO Plus" },
{type: "Dental",
plan: "Standard" }
]
}
• Relational
– Up-front schema definition phase
– Adding new column takes time to
develop & *lots* of time to roll out in
production
• Existing rows must be reformatted
• MongoDB:
– Start hacking your app right away
– Want to store new type of information?
• Just start adding it
• If it doesn’t apply to all instances –
just leave it out
7
Why validate documents?
• Many people writing to the database
– Many developers
– Many teams
– Many companies
– Many development languages
• Multiple applications want to exploit the same data, need to agree on what’s there
• Usually a core subset of keys you always want to be there
• For any key may care about:
– Existence
– Type
– Format
– Value
– Existence in combination with other keys (e.g. need a phone number or an email address)
8
Data Access Layer
Why validate documents?
• Good to have a ‘contract’ for what’s in a collection
– When reading from the “subscriber” collection, I
know that every document will include a
subscription plan name:
db.subscriptions.find(
name: "Billy Fish",
$and:[{plan:{$exists: true}},
{plan:{$type: 2}}]})
• < MongoDB 3.2, this is an application responsibility
– 3rd party tools like Mongoose can help
• Best implemented as a layer between the application
and driver (Data Access Layer)
App App App
Driver
Database
Get the database to do the work!
10
Document Validation - MongoDB 3.2
• Configure Document Validation within the database
• Use familiar MongoDB Query Language
• Automatically tests each insert/update; delivers warning or error if a rule is broken
• You choose what keys to validate and how
db.runCommand({
collMod: "contacts",
validator: {
$and: [
{year_of_birth: {$lte: 1994}},
{$or: [
{phone: { $type: ”string"}},
{email: { $type: ”string"}}
]}]
}})
11
Document Validation - MongoDB 3.2
db.getCollectionInfos({name:"contacts"})
[
{
"name": "contacts",
"options": {
"validator": {
"$and": [
{"year_of_birth": {
"$lte": 1994}},
{"$or": [
{"phone": {"$type": "string"}},
{"email": {"$type": "string"}}
]}
]},
"validationLevel": "strict",
"validationAction": "error”
}
}
]
12
Document Validation - MongoDB 3.2
db.contacts.insert(
name: "Fred",
email: "fred@clusterdb.com",
year_of_birth: 2012
})
Document failed validation
WriteResult({
"nInserted": 0,
"writeError": {
"code": 121,
"errmsg": "Document failed validation”}})
13
Document Validation - MongoDB 3.2
db.runCommand({collMod: "bleh",
validator: {
rogue: {$exists:false}
}
}
});
14
Document Validation - MongoDB 3.2
• Can check most things that work with a find expression
– Existence
– Non-existence
– Data type of values
– <, <=, >, >=, ==, !=
– AND, OR
– Regular expressions
– Some geospatial operators (e.g. $geoWithin & $geoIntersects)
– …
15
MongoDB 3.2 Limitations
• Generic error message
– Application needs to figure out what part of the constraints failed
• Cannot compare 1 key with another
– Either within the same document or between documents
• Some operations not supported:
– $text, $geoNear, $near, $nearSphere, $where
• Applications responsibility to bring legacy data into compliance with new
rules
– No audit or tools
16
What validations remain in the app
• User interface
– Don’t have the database be the first place to detect that an email is poorly
formatted
• Any validations that involve comparisons with
– Other data in the same document
– Data from other documents
– External information (e.g. time of day)
• Semantic checks that are designed to fail frequently
– e.g. user is in wrong country to use this service
– Database should typically be testing for coding errors rather than implementing
your business logic
• Determining why the database rejected a document in order to provide a meaningful
error to the user
17
Where MongoDB Validation excels(vs.RDBMS)
• Simple
– Use familiar search expressions (MQL)
– No need for stored procedures
• Flexible
– Only enforced on mandatory parts of the schema
– Can start adding new data at any point and then add validation later if needed
• Practical to deploy
– Simple to role out new rules across thousands of production servers
• Light weight
– Negligible impact to performance
18
Cleaning up legacy data
• Validator does not check if existing
documents in the collection meet the
new validation rules
• User/app can execute a query to
identify & update any document
which don’t meet the new rules
– Use $nor on the full expression
• Be cautious about system impacts:
– Could push working data set out of
memory
– Extra load if many documents need
to be updated
– Execute on secondary
secondary> db.runCommand({collMod: "bleh",
validator: {
a: {$lt:4}
}
});
secondary> db.bleh.find({
a:{$not:{$lt:4}}}).count()
secondary> db.bleh.update(
{a:{$not:{$lt:4}}},
{$set:{a:3}},
{multi:true})
19
Controlling validation
validationLevel
off moderate strict
validationAction
warn
No checks
Warn on validation failure for
inserts & updates to existing
valid documents. Updates to
existing invalid docs OK.
Warn on any validation failure
for any insert or update.
error
No checks
Reject invalid inserts &
updates to existing valid
documents. Updates to
existing invalid docs OK.
Reject any violation of
validation rules for any insert or
update.
DEFAULT
20
Controlling validation
• Set behavior:
db.bleh.runCommand("collMod",
{validationLevel: "moderate",
validationAction: "warn"})
– Note that the warnings are written to the log
21
Lifecycle
Hacking
(Day one)
•No document validation
•Release quick & often
Analyze De facto
Schema
•MongoDB Compass
Add document
validation rules
•Query & fix existing docs
•Log any new documents
that break rules:
{validationLevel:
"moderate",
validationAction:
"warn"}
Fix application
•Follow all rules
•When no new problems
being logged, enter strict
mode:
{validationLevel:
”strict",
validationAction:
”error}
Application uses
new data
(Application
evolves/additional
app)
•If not mandated, stop
here
?
Analyze De-facto
Schema
•MongoDB Compass
Add document
validation rules
•Query & fix existing docs
•Log any new documents
that break rules:
{validationLevel:
"moderate",
validationAction:
"warn"}
Fix application
•Follow all rules
•When no new problems
being logged, enter strict
mode:
{validationLevel:
”strict",
validationAction:
”error}
22
Versioning of Validations (optional)
• Application can lazily update documents with an older version or with no version set
at all
db.runCommand({
collMod: "contacts",
validator:
{$or: [{version: {"$exists": false}},
{version: 1,
$and: [{Name: {"$exists": true}}]
},
{version: 2,
$and: [{Name: {"$type": ”string"}}]
}
]
}
})
Step through selecting and
deploying a simple Document
Validation Rule
Use Compass to see schema
Drill down into anomalies
Graphically Build Query
1. Prevent New Malformed Documents
> db.orders.runCommand("collMod",
{validationLevel: "moderate",
validationAction: "error"});
> db.runCommand({collMod: "orders”,
validator: {
$or: [
{price: {$type: 1}},
{price: {$type: 16}},
{price: {$type: 18}}
]}});
> db.getCollectionInfos({name:"orders"})
{
"name": "orders",
"options": {
"validator": {
"$or": [
{ "price": { "$type": 1 }},
{ "price": { "$type": 16 }},
{ "price": { "$type": 18 }}
]
},
"validationLevel": "moderate",
"validationAction": "error"
}
}
2. Prevent New Malformed Documents
> db.orders.insert({
"_id": 6666,
"item": "jkl",
"price": "rogue",
"quantity": 1 });
Document failed validation
WriteResult({
"nInserted": 0,
"writeError": {
"code": 121,
"errmsg": "Document failed validation"
}
})
3. Clean-Up Legacy Documents
> db.orders.findOne(
{price:
{$type: "string"}}
);
> db.orders.update(
{_id: 3500},
{$set:{quantity: 12}}
);
{
"_id": 3500,
"item": "abc",
"price": "free",
"quantity": 8
}
Updated 1 existing record(s) in 6ms
WriteResult({
"nMatched": 1,
"nUpserted": 0,
"nModified": 1
})
30
3. Clean-Up Legacy Documents
> db.orders.update(
{price:"free"},
{$set: {price: 0}},
{multi: true});
> db.orders.update(
{price:"if you have to ask...."},
{$set: {price: 1000000}},
{multi: true});
4. Confirm Results
> db.orders.find(
{$nor: [
{price: {$type: 1}},
{price: {$type: 16}},
{price: {$type: 18}}
]})
Fetched 0 record(s) in 5ms
Next Steps
• Document Validation - Adding Just the Right Amount of Control Over Your Documents
– https://www.mongodb.com/blog/post/document-validation-part-1-adding-just-the-right-amount-of-control-
over-your-documents
• “Document Validation and What Dynamic Schema Means” – Eliot Horowitz
– http://www.eliothorowitz.com/blog/2015/09/11/document-validation-and-what-dynamic-schema-means/
• “Bulletproof Data Management” – MongoDB World 2015
– https://www.mongodb.com/presentations/data-management-3-bulletproof-data-management
• Documentation
– http://docs.mongodb.org/manual/release-notes/3.1-dev-series/#document-validation
• Not yet ready for production but download and try MongoDB 3.2 RC
– https://www.mongodb.org/downloads#development
• Feedback
– https://www.mongodb.com/blog/post/announcing-the-mongodb-3-2-bug-hunt
– https://jira.mongodb.org/
DISCLAIMER: MongoDB's product plans are for informational purposes only. MongoDB's plans may change and you
should not rely on them for delivery of a specific feature at a specific time.

Más contenido relacionado

La actualidad más candente

How Thermo Fisher is Reducing Data Analysis Times from Days to Minutes with M...
How Thermo Fisher is Reducing Data Analysis Times from Days to Minutes with M...How Thermo Fisher is Reducing Data Analysis Times from Days to Minutes with M...
How Thermo Fisher is Reducing Data Analysis Times from Days to Minutes with M...MongoDB
 
Migrating from RDBMS to MongoDB
Migrating from RDBMS to MongoDBMigrating from RDBMS to MongoDB
Migrating from RDBMS to MongoDBMongoDB
 
Introduction To MongoDB
Introduction To MongoDBIntroduction To MongoDB
Introduction To MongoDBElieHannouch
 
MongoDB Best Practices for Developers
MongoDB Best Practices for DevelopersMongoDB Best Practices for Developers
MongoDB Best Practices for DevelopersMoshe Kaplan
 
MongoDB World 2019: Finding the Right MongoDB Atlas Cluster Size: Does This I...
MongoDB World 2019: Finding the Right MongoDB Atlas Cluster Size: Does This I...MongoDB World 2019: Finding the Right MongoDB Atlas Cluster Size: Does This I...
MongoDB World 2019: Finding the Right MongoDB Atlas Cluster Size: Does This I...MongoDB
 
MongoDB Days Silicon Valley: Winning the Dreamforce Hackathon with MongoDB
MongoDB Days Silicon Valley: Winning the Dreamforce Hackathon with MongoDBMongoDB Days Silicon Valley: Winning the Dreamforce Hackathon with MongoDB
MongoDB Days Silicon Valley: Winning the Dreamforce Hackathon with MongoDBMongoDB
 
Getting Started with MongoDB Using the Microsoft Stack
Getting Started with MongoDB Using the Microsoft Stack Getting Started with MongoDB Using the Microsoft Stack
Getting Started with MongoDB Using the Microsoft Stack MongoDB
 
Transitioning from SQL to MongoDB
Transitioning from SQL to MongoDBTransitioning from SQL to MongoDB
Transitioning from SQL to MongoDBMongoDB
 
A Free New World: Atlas Free Tier and How It Was Born
A Free New World: Atlas Free Tier and How It Was Born A Free New World: Atlas Free Tier and How It Was Born
A Free New World: Atlas Free Tier and How It Was Born MongoDB
 
Advanced Schema Design Patterns
Advanced Schema Design PatternsAdvanced Schema Design Patterns
Advanced Schema Design PatternsMongoDB
 
MongoDB Days Silicon Valley: Introducing MongoDB 3.2
MongoDB Days Silicon Valley: Introducing MongoDB 3.2MongoDB Days Silicon Valley: Introducing MongoDB 3.2
MongoDB Days Silicon Valley: Introducing MongoDB 3.2MongoDB
 
ReadConcern and WriteConcern
ReadConcern and WriteConcernReadConcern and WriteConcern
ReadConcern and WriteConcernMongoDB
 
Cloud Backup Overview
Cloud Backup Overview Cloud Backup Overview
Cloud Backup Overview MongoDB
 
MongoDB World 2019: Raiders of the Anti-patterns: A Journey Towards Fixing Sc...
MongoDB World 2019: Raiders of the Anti-patterns: A Journey Towards Fixing Sc...MongoDB World 2019: Raiders of the Anti-patterns: A Journey Towards Fixing Sc...
MongoDB World 2019: Raiders of the Anti-patterns: A Journey Towards Fixing Sc...MongoDB
 
MongoDB Days Silicon Valley: Best Practices for Upgrading to MongoDB
MongoDB Days Silicon Valley: Best Practices for Upgrading to MongoDBMongoDB Days Silicon Valley: Best Practices for Upgrading to MongoDB
MongoDB Days Silicon Valley: Best Practices for Upgrading to MongoDBMongoDB
 
High Performance Applications with MongoDB
High Performance Applications with MongoDBHigh Performance Applications with MongoDB
High Performance Applications with MongoDBMongoDB
 
MongoDB SoCal 2020: Migrate Anything* to MongoDB Atlas
MongoDB SoCal 2020: Migrate Anything* to MongoDB AtlasMongoDB SoCal 2020: Migrate Anything* to MongoDB Atlas
MongoDB SoCal 2020: Migrate Anything* to MongoDB AtlasMongoDB
 
Globally Distributed RESTful Object Storage
Globally Distributed RESTful Object Storage Globally Distributed RESTful Object Storage
Globally Distributed RESTful Object Storage MongoDB
 

La actualidad más candente (20)

How Thermo Fisher is Reducing Data Analysis Times from Days to Minutes with M...
How Thermo Fisher is Reducing Data Analysis Times from Days to Minutes with M...How Thermo Fisher is Reducing Data Analysis Times from Days to Minutes with M...
How Thermo Fisher is Reducing Data Analysis Times from Days to Minutes with M...
 
Migrating from RDBMS to MongoDB
Migrating from RDBMS to MongoDBMigrating from RDBMS to MongoDB
Migrating from RDBMS to MongoDB
 
Introduction To MongoDB
Introduction To MongoDBIntroduction To MongoDB
Introduction To MongoDB
 
MongoDB Best Practices for Developers
MongoDB Best Practices for DevelopersMongoDB Best Practices for Developers
MongoDB Best Practices for Developers
 
MongoDB World 2019: Finding the Right MongoDB Atlas Cluster Size: Does This I...
MongoDB World 2019: Finding the Right MongoDB Atlas Cluster Size: Does This I...MongoDB World 2019: Finding the Right MongoDB Atlas Cluster Size: Does This I...
MongoDB World 2019: Finding the Right MongoDB Atlas Cluster Size: Does This I...
 
MongoDB Days Silicon Valley: Winning the Dreamforce Hackathon with MongoDB
MongoDB Days Silicon Valley: Winning the Dreamforce Hackathon with MongoDBMongoDB Days Silicon Valley: Winning the Dreamforce Hackathon with MongoDB
MongoDB Days Silicon Valley: Winning the Dreamforce Hackathon with MongoDB
 
Getting Started with MongoDB Using the Microsoft Stack
Getting Started with MongoDB Using the Microsoft Stack Getting Started with MongoDB Using the Microsoft Stack
Getting Started with MongoDB Using the Microsoft Stack
 
Transitioning from SQL to MongoDB
Transitioning from SQL to MongoDBTransitioning from SQL to MongoDB
Transitioning from SQL to MongoDB
 
A Free New World: Atlas Free Tier and How It Was Born
A Free New World: Atlas Free Tier and How It Was Born A Free New World: Atlas Free Tier and How It Was Born
A Free New World: Atlas Free Tier and How It Was Born
 
Advanced Schema Design Patterns
Advanced Schema Design PatternsAdvanced Schema Design Patterns
Advanced Schema Design Patterns
 
MongoDB Days Silicon Valley: Introducing MongoDB 3.2
MongoDB Days Silicon Valley: Introducing MongoDB 3.2MongoDB Days Silicon Valley: Introducing MongoDB 3.2
MongoDB Days Silicon Valley: Introducing MongoDB 3.2
 
ReadConcern and WriteConcern
ReadConcern and WriteConcernReadConcern and WriteConcern
ReadConcern and WriteConcern
 
Cloud Backup Overview
Cloud Backup Overview Cloud Backup Overview
Cloud Backup Overview
 
MongoDB World 2019: Raiders of the Anti-patterns: A Journey Towards Fixing Sc...
MongoDB World 2019: Raiders of the Anti-patterns: A Journey Towards Fixing Sc...MongoDB World 2019: Raiders of the Anti-patterns: A Journey Towards Fixing Sc...
MongoDB World 2019: Raiders of the Anti-patterns: A Journey Towards Fixing Sc...
 
MongoDB Days Silicon Valley: Best Practices for Upgrading to MongoDB
MongoDB Days Silicon Valley: Best Practices for Upgrading to MongoDBMongoDB Days Silicon Valley: Best Practices for Upgrading to MongoDB
MongoDB Days Silicon Valley: Best Practices for Upgrading to MongoDB
 
High Performance Applications with MongoDB
High Performance Applications with MongoDBHigh Performance Applications with MongoDB
High Performance Applications with MongoDB
 
MongodB Internals
MongodB InternalsMongodB Internals
MongodB Internals
 
MongoDB SoCal 2020: Migrate Anything* to MongoDB Atlas
MongoDB SoCal 2020: Migrate Anything* to MongoDB AtlasMongoDB SoCal 2020: Migrate Anything* to MongoDB Atlas
MongoDB SoCal 2020: Migrate Anything* to MongoDB Atlas
 
Mongo DB
Mongo DBMongo DB
Mongo DB
 
Globally Distributed RESTful Object Storage
Globally Distributed RESTful Object Storage Globally Distributed RESTful Object Storage
Globally Distributed RESTful Object Storage
 

Similar a Document Validation in MongoDB 3.2

Document validation in MongoDB 3.2
Document validation in MongoDB 3.2Document validation in MongoDB 3.2
Document validation in MongoDB 3.2Andrew Morgan
 
Novedades de MongoDB 3.6
Novedades de MongoDB 3.6Novedades de MongoDB 3.6
Novedades de MongoDB 3.6MongoDB
 
Neue Features in MongoDB 3.6
Neue Features in MongoDB 3.6Neue Features in MongoDB 3.6
Neue Features in MongoDB 3.6MongoDB
 
MongoDB Schema Design: Practical Applications and Implications
MongoDB Schema Design: Practical Applications and ImplicationsMongoDB Schema Design: Practical Applications and Implications
MongoDB Schema Design: Practical Applications and ImplicationsMongoDB
 
Evolving your Data Access with MongoDB Stitch - Drew Di Palma
Evolving your Data Access with MongoDB Stitch - Drew Di PalmaEvolving your Data Access with MongoDB Stitch - Drew Di Palma
Evolving your Data Access with MongoDB Stitch - Drew Di PalmaMongoDB
 
Eagle6 mongo dc revised
Eagle6 mongo dc revisedEagle6 mongo dc revised
Eagle6 mongo dc revisedMongoDB
 
Eagle6 Enterprise Situational Awareness
Eagle6 Enterprise Situational AwarenessEagle6 Enterprise Situational Awareness
Eagle6 Enterprise Situational AwarenessMongoDB
 
Mongoose and MongoDB 101
Mongoose and MongoDB 101Mongoose and MongoDB 101
Mongoose and MongoDB 101Will Button
 
MongoDB: How We Did It – Reanimating Identity at AOL
MongoDB: How We Did It – Reanimating Identity at AOLMongoDB: How We Did It – Reanimating Identity at AOL
MongoDB: How We Did It – Reanimating Identity at AOLMongoDB
 
MongoDB.pdf
MongoDB.pdfMongoDB.pdf
MongoDB.pdfArthyR3
 
MongoDB What's new in 3.2 version
MongoDB What's new in 3.2 versionMongoDB What's new in 3.2 version
MongoDB What's new in 3.2 versionHéliot PERROQUIN
 
Introduction to MongoDB
Introduction to MongoDBIntroduction to MongoDB
Introduction to MongoDBRaghunath A
 
Effectively Deploying MongoDB on AEM
Effectively Deploying MongoDB on AEMEffectively Deploying MongoDB on AEM
Effectively Deploying MongoDB on AEMNorberto Leite
 
Building Your First App with Shawn Mcarthy
Building Your First App with Shawn Mcarthy Building Your First App with Shawn Mcarthy
Building Your First App with Shawn Mcarthy MongoDB
 
Webinar: “ditch Oracle NOW”: Best Practices for Migrating to MongoDB
 Webinar: “ditch Oracle NOW”: Best Practices for Migrating to MongoDB Webinar: “ditch Oracle NOW”: Best Practices for Migrating to MongoDB
Webinar: “ditch Oracle NOW”: Best Practices for Migrating to MongoDBMongoDB
 
MongoDB.local Paris Keynote
MongoDB.local Paris KeynoteMongoDB.local Paris Keynote
MongoDB.local Paris KeynoteMongoDB
 
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
 

Similar a Document Validation in MongoDB 3.2 (20)

Document validation in MongoDB 3.2
Document validation in MongoDB 3.2Document validation in MongoDB 3.2
Document validation in MongoDB 3.2
 
Novedades de MongoDB 3.6
Novedades de MongoDB 3.6Novedades de MongoDB 3.6
Novedades de MongoDB 3.6
 
Neue Features in MongoDB 3.6
Neue Features in MongoDB 3.6Neue Features in MongoDB 3.6
Neue Features in MongoDB 3.6
 
MongoDB Schema Design: Practical Applications and Implications
MongoDB Schema Design: Practical Applications and ImplicationsMongoDB Schema Design: Practical Applications and Implications
MongoDB Schema Design: Practical Applications and Implications
 
Evolving your Data Access with MongoDB Stitch - Drew Di Palma
Evolving your Data Access with MongoDB Stitch - Drew Di PalmaEvolving your Data Access with MongoDB Stitch - Drew Di Palma
Evolving your Data Access with MongoDB Stitch - Drew Di Palma
 
Eagle6 mongo dc revised
Eagle6 mongo dc revisedEagle6 mongo dc revised
Eagle6 mongo dc revised
 
Eagle6 Enterprise Situational Awareness
Eagle6 Enterprise Situational AwarenessEagle6 Enterprise Situational Awareness
Eagle6 Enterprise Situational Awareness
 
Mongoose and MongoDB 101
Mongoose and MongoDB 101Mongoose and MongoDB 101
Mongoose and MongoDB 101
 
MongoDB: How We Did It – Reanimating Identity at AOL
MongoDB: How We Did It – Reanimating Identity at AOLMongoDB: How We Did It – Reanimating Identity at AOL
MongoDB: How We Did It – Reanimating Identity at AOL
 
Mongodb
MongodbMongodb
Mongodb
 
MongoDB.pdf
MongoDB.pdfMongoDB.pdf
MongoDB.pdf
 
[TestWarez 2017] Behavior Driven Development in a complex environment - Consu...
[TestWarez 2017] Behavior Driven Development in a complex environment - Consu...[TestWarez 2017] Behavior Driven Development in a complex environment - Consu...
[TestWarez 2017] Behavior Driven Development in a complex environment - Consu...
 
MongoDB What's new in 3.2 version
MongoDB What's new in 3.2 versionMongoDB What's new in 3.2 version
MongoDB What's new in 3.2 version
 
Introduction to MongoDB
Introduction to MongoDBIntroduction to MongoDB
Introduction to MongoDB
 
Effectively Deploying MongoDB on AEM
Effectively Deploying MongoDB on AEMEffectively Deploying MongoDB on AEM
Effectively Deploying MongoDB on AEM
 
Mongo db basics
Mongo db basicsMongo db basics
Mongo db basics
 
Building Your First App with Shawn Mcarthy
Building Your First App with Shawn Mcarthy Building Your First App with Shawn Mcarthy
Building Your First App with Shawn Mcarthy
 
Webinar: “ditch Oracle NOW”: Best Practices for Migrating to MongoDB
 Webinar: “ditch Oracle NOW”: Best Practices for Migrating to MongoDB Webinar: “ditch Oracle NOW”: Best Practices for Migrating to MongoDB
Webinar: “ditch Oracle NOW”: Best Practices for Migrating to MongoDB
 
MongoDB.local Paris Keynote
MongoDB.local Paris KeynoteMongoDB.local Paris Keynote
MongoDB.local Paris Keynote
 
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
 

Más de MongoDB

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

Más de MongoDB (20)

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

Último

Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
Azure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAzure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAndikSusilo4
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 

Último (20)

Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
Azure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAzure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & Application
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 

Document Validation in MongoDB 3.2

  • 1. MongoDB 3.2 – Document Validation Andrew Morgan @andrewmorgan | andrew.morgan@mongodb.com 29th October 2015
  • 2. 2 DISCLAIMER: MongoDB's product plans are for informational purposes only. MongoDB's plans may change and you should not rely on them for delivery of a specific feature at a specific time.
  • 3. Agenda Value of flexible schemas Downside of flexible schemas What 3.2 adds What 3.2 doesn’t add Options Production lifecycle to add Document Validation Walkthrough
  • 4. Power of flexible schemas RDBMS MongoDB { _id: ObjectId("4c4ba5e5e8aabf3"), employee_name: {First: "Billy", Last: "Fish"}, department: "Engineering", title: "Aquarium design", pay_band: "C", benefits: [ { type: "Health", plan: "PPO Plus" }, { type: "Dental", plan: "Standard" } ] }
  • 5. Power of flexible schemas { _id: ObjectId("4c4ba5e5e8aabf3"), employee_name: { First: "Billy", Last: "Fish"}, department: "Engineering", title: "Aquarium design", pay_band: "C", benefits: [ {type: "Health", plan: "PPO Plus" }, {type: "Dental", plan: "Standard" } ] } • Relational – Up-front schema definition phase – Adding new column takes time to develop & *lots* of time to roll out in production • Existing rows must be reformatted • MongoDB: – Start hacking your app right away – Want to store new type of information? • Just start adding it • If it doesn’t apply to all instances – just leave it out
  • 6. Power of flexible schemas { _id: ObjectId("4c4ba5e5e8aabf3"), employee_name: { First: "Billy", Last: "Fish"}, department: "Engineering", title: "Aquarium design", pay_band: "C", benefits: [ {type: "Health", plan: "PPO Plus" }, {type: "Dental", plan: "Standard" } ] } • Relational – Up-front schema definition phase – Adding new column takes time to develop & *lots* of time to roll out in production • Existing rows must be reformatted • MongoDB: – Start hacking your app right away – Want to store new type of information? • Just start adding it • If it doesn’t apply to all instances – just leave it out
  • 7. 7 Why validate documents? • Many people writing to the database – Many developers – Many teams – Many companies – Many development languages • Multiple applications want to exploit the same data, need to agree on what’s there • Usually a core subset of keys you always want to be there • For any key may care about: – Existence – Type – Format – Value – Existence in combination with other keys (e.g. need a phone number or an email address)
  • 8. 8 Data Access Layer Why validate documents? • Good to have a ‘contract’ for what’s in a collection – When reading from the “subscriber” collection, I know that every document will include a subscription plan name: db.subscriptions.find( name: "Billy Fish", $and:[{plan:{$exists: true}}, {plan:{$type: 2}}]}) • < MongoDB 3.2, this is an application responsibility – 3rd party tools like Mongoose can help • Best implemented as a layer between the application and driver (Data Access Layer) App App App Driver Database
  • 9. Get the database to do the work!
  • 10. 10 Document Validation - MongoDB 3.2 • Configure Document Validation within the database • Use familiar MongoDB Query Language • Automatically tests each insert/update; delivers warning or error if a rule is broken • You choose what keys to validate and how db.runCommand({ collMod: "contacts", validator: { $and: [ {year_of_birth: {$lte: 1994}}, {$or: [ {phone: { $type: ”string"}}, {email: { $type: ”string"}} ]}] }})
  • 11. 11 Document Validation - MongoDB 3.2 db.getCollectionInfos({name:"contacts"}) [ { "name": "contacts", "options": { "validator": { "$and": [ {"year_of_birth": { "$lte": 1994}}, {"$or": [ {"phone": {"$type": "string"}}, {"email": {"$type": "string"}} ]} ]}, "validationLevel": "strict", "validationAction": "error” } } ]
  • 12. 12 Document Validation - MongoDB 3.2 db.contacts.insert( name: "Fred", email: "fred@clusterdb.com", year_of_birth: 2012 }) Document failed validation WriteResult({ "nInserted": 0, "writeError": { "code": 121, "errmsg": "Document failed validation”}})
  • 13. 13 Document Validation - MongoDB 3.2 db.runCommand({collMod: "bleh", validator: { rogue: {$exists:false} } } });
  • 14. 14 Document Validation - MongoDB 3.2 • Can check most things that work with a find expression – Existence – Non-existence – Data type of values – <, <=, >, >=, ==, != – AND, OR – Regular expressions – Some geospatial operators (e.g. $geoWithin & $geoIntersects) – …
  • 15. 15 MongoDB 3.2 Limitations • Generic error message – Application needs to figure out what part of the constraints failed • Cannot compare 1 key with another – Either within the same document or between documents • Some operations not supported: – $text, $geoNear, $near, $nearSphere, $where • Applications responsibility to bring legacy data into compliance with new rules – No audit or tools
  • 16. 16 What validations remain in the app • User interface – Don’t have the database be the first place to detect that an email is poorly formatted • Any validations that involve comparisons with – Other data in the same document – Data from other documents – External information (e.g. time of day) • Semantic checks that are designed to fail frequently – e.g. user is in wrong country to use this service – Database should typically be testing for coding errors rather than implementing your business logic • Determining why the database rejected a document in order to provide a meaningful error to the user
  • 17. 17 Where MongoDB Validation excels(vs.RDBMS) • Simple – Use familiar search expressions (MQL) – No need for stored procedures • Flexible – Only enforced on mandatory parts of the schema – Can start adding new data at any point and then add validation later if needed • Practical to deploy – Simple to role out new rules across thousands of production servers • Light weight – Negligible impact to performance
  • 18. 18 Cleaning up legacy data • Validator does not check if existing documents in the collection meet the new validation rules • User/app can execute a query to identify & update any document which don’t meet the new rules – Use $nor on the full expression • Be cautious about system impacts: – Could push working data set out of memory – Extra load if many documents need to be updated – Execute on secondary secondary> db.runCommand({collMod: "bleh", validator: { a: {$lt:4} } }); secondary> db.bleh.find({ a:{$not:{$lt:4}}}).count() secondary> db.bleh.update( {a:{$not:{$lt:4}}}, {$set:{a:3}}, {multi:true})
  • 19. 19 Controlling validation validationLevel off moderate strict validationAction warn No checks Warn on validation failure for inserts & updates to existing valid documents. Updates to existing invalid docs OK. Warn on any validation failure for any insert or update. error No checks Reject invalid inserts & updates to existing valid documents. Updates to existing invalid docs OK. Reject any violation of validation rules for any insert or update. DEFAULT
  • 20. 20 Controlling validation • Set behavior: db.bleh.runCommand("collMod", {validationLevel: "moderate", validationAction: "warn"}) – Note that the warnings are written to the log
  • 21. 21 Lifecycle Hacking (Day one) •No document validation •Release quick & often Analyze De facto Schema •MongoDB Compass Add document validation rules •Query & fix existing docs •Log any new documents that break rules: {validationLevel: "moderate", validationAction: "warn"} Fix application •Follow all rules •When no new problems being logged, enter strict mode: {validationLevel: ”strict", validationAction: ”error} Application uses new data (Application evolves/additional app) •If not mandated, stop here ? Analyze De-facto Schema •MongoDB Compass Add document validation rules •Query & fix existing docs •Log any new documents that break rules: {validationLevel: "moderate", validationAction: "warn"} Fix application •Follow all rules •When no new problems being logged, enter strict mode: {validationLevel: ”strict", validationAction: ”error}
  • 22. 22 Versioning of Validations (optional) • Application can lazily update documents with an older version or with no version set at all db.runCommand({ collMod: "contacts", validator: {$or: [{version: {"$exists": false}}, {version: 1, $and: [{Name: {"$exists": true}}] }, {version: 2, $and: [{Name: {"$type": ”string"}}] } ] } })
  • 23. Step through selecting and deploying a simple Document Validation Rule
  • 24. Use Compass to see schema
  • 25. Drill down into anomalies
  • 27. 1. Prevent New Malformed Documents > db.orders.runCommand("collMod", {validationLevel: "moderate", validationAction: "error"}); > db.runCommand({collMod: "orders”, validator: { $or: [ {price: {$type: 1}}, {price: {$type: 16}}, {price: {$type: 18}} ]}}); > db.getCollectionInfos({name:"orders"}) { "name": "orders", "options": { "validator": { "$or": [ { "price": { "$type": 1 }}, { "price": { "$type": 16 }}, { "price": { "$type": 18 }} ] }, "validationLevel": "moderate", "validationAction": "error" } }
  • 28. 2. Prevent New Malformed Documents > db.orders.insert({ "_id": 6666, "item": "jkl", "price": "rogue", "quantity": 1 }); Document failed validation WriteResult({ "nInserted": 0, "writeError": { "code": 121, "errmsg": "Document failed validation" } })
  • 29. 3. Clean-Up Legacy Documents > db.orders.findOne( {price: {$type: "string"}} ); > db.orders.update( {_id: 3500}, {$set:{quantity: 12}} ); { "_id": 3500, "item": "abc", "price": "free", "quantity": 8 } Updated 1 existing record(s) in 6ms WriteResult({ "nMatched": 1, "nUpserted": 0, "nModified": 1 })
  • 30. 30 3. Clean-Up Legacy Documents > db.orders.update( {price:"free"}, {$set: {price: 0}}, {multi: true}); > db.orders.update( {price:"if you have to ask...."}, {$set: {price: 1000000}}, {multi: true});
  • 31. 4. Confirm Results > db.orders.find( {$nor: [ {price: {$type: 1}}, {price: {$type: 16}}, {price: {$type: 18}} ]}) Fetched 0 record(s) in 5ms
  • 32. Next Steps • Document Validation - Adding Just the Right Amount of Control Over Your Documents – https://www.mongodb.com/blog/post/document-validation-part-1-adding-just-the-right-amount-of-control- over-your-documents • “Document Validation and What Dynamic Schema Means” – Eliot Horowitz – http://www.eliothorowitz.com/blog/2015/09/11/document-validation-and-what-dynamic-schema-means/ • “Bulletproof Data Management” – MongoDB World 2015 – https://www.mongodb.com/presentations/data-management-3-bulletproof-data-management • Documentation – http://docs.mongodb.org/manual/release-notes/3.1-dev-series/#document-validation • Not yet ready for production but download and try MongoDB 3.2 RC – https://www.mongodb.org/downloads#development • Feedback – https://www.mongodb.com/blog/post/announcing-the-mongodb-3-2-bug-hunt – https://jira.mongodb.org/ DISCLAIMER: MongoDB's product plans are for informational purposes only. MongoDB's plans may change and you should not rely on them for delivery of a specific feature at a specific time.

Notas del editor

  1. Why schema free is great for rapid, iterative development. Why you might want to add some rules to the database: Contract between app components Multiple sources of data Multiple development languages Often want to be sure a base set of keys are always present Make the database do the work What can MongoDB do that relational DBs can’t (or at least can do much more easily)? What still needs to be done up in the app? Timeline Start with no defined schema, iterate like crazy Decide that need to impose some order Enter moderate mode and ensure all new documents pass rules Start identifying and fixing documents that don’t follow the rules What options the new functionality provides Tutorial/demo for the above.
  2. Override for a single operation (not working in MongoDB 3.1.7): db.bleh.insert({a:999},{bypassDocumentValidation:true})