SlideShare una empresa de Scribd logo
1 de 31
Descargar para leer sin conexión
User Data Management
with
Please stand by...
We’ll begin shortly.
Q&A to follow the webinar
Recording Available 24 Hours After Event
Other issues? E-mail webinars@10gen.com
Osmar Olivo
Consulting Engineer, 10gen
Oz@10gen.com
Friday, July 12, 13
Agenda
// High Level Overview
> MongoDB
> User Data
// Modeling & Querying User Data
> Insurance Company User Data
> User Check-Ins
// Extending the Data Model for Future Use-Cases
> Tracking User Activity
> Social Media
Friday, July 12, 13
MongoDB
• Scalable, High-Performance, Open Source, Document-
Oriented Database
– JSON (well... BSON) Storage Model
– Indexes and Full Query Language
– Easy for Developers to Pick Up
– Easy for Administrators to Scale
• More Features at http://www.mongodb.org/
• Overview Video: http://www.10gen.com/what-is-mongodb
Friday, July 12, 13
User Data
• Account Information
– Name, Address, etc
– Account Status
– Notes
• Activity Streams
– Posts, Tweets, Likes, Check-Ins
– Recording User Actions
• Social Networks
– Friends, Connections
– Groups, Tags
Friday, July 12, 13
Insurance Company Data
Account Information
– Name, Address, etc
– Account Status
– Notes
A Data Modeling
Exercise
Friday, July 12, 13
Insurance Company
Friday, July 12, 13
Insurance Company
Friday, July 12, 13
Insurance Company
User Opened
Date: 05/26/2012
Status: Success
Account Modified
Date: 06/22/2012
Action: Added
User Call Log
Date: 07/24/2012
Type: Complaint
Friday, July 12, 13
2 Types of Data
User Opened
Date: 05/26/2012
Status: Success
Account Modified
Date: 06/22/2012
Action: Added
User Call Log
Date: 07/24/2012
Type: Complaint
Friday, July 12, 13
Rule of Thumb: Categories of Data
Map Well to MongoDB Collections
Policies Activities
Friday, July 12, 13
Policies
policy = {
	

 name:“John Smith”
	

 employer:“10gen”,
	

 address:“555 Fictional Ave”,
	

 e-mail:“me@john.smith.com”,
	

 spouse:“Yes”,
	

 dependents:“No”,
	

 dates: [
{start: 5/26/2013 10:12:00},
end: 5/26/2023 10:12:00}],
	

 others:“No”
}
Friday, July 12, 13
Activities
activity = {
	

 user-id: “JohnSmith421”
	

 type:“account-opening”,
	

 status:“Success”,
	

 dates: 5/26/2012 10:12:00,
	

 related-doc:“/customer/
JohnSmith421/open.pdf”
}
User Opened Account
Date: 05/26/2012
Status: Success
Account Modified
Date: 06/22/2012
Action: Added Spouse
User Call Log
Date: 07/24/2012
Type: Complaint
Friday, July 12, 13
User Check-Ins
Activity Streams
– Posts, Tweets, Check-Ins
– Recording User Actions
Friday, July 12, 13
Places
Q: Current location
A: Places near
location
User Generated
Content
Places
Friday, July 12, 13
Inserting a Place
var p = { name:“10gen HQ”,
address:“229 W 43rd St”,
city:“NewYork”,
zip:“10036”,
tags: [“mongoDB”,“business”],
latlong: [40.0, 72.0],
tips: [{user:“John Smith”, time:“3/15/2013”,tip:
“Make sure to stop by for office hours!”}]}
> db.posts.save(p)
Friday, July 12, 13
Updating Tips
db.places.update({name:"10gen HQ"},
	

 {$push :{tips:
	

 	

 	

 {user:"John", time:3/15/2012,
	

 	

 	

 tip:"stop by for office hours on
	

 	

 	

 Wednesdays from 4-6"}}}}
Friday, July 12, 13
Querying Our Places
• Creating Indexes
★ db.places.ensureIndex({tags:1})
★ db.places.ensureIndex({name:1})
★ db.places.ensureIndex({latlong:”2d”})
• Finding Places
★ db.places.find({latlong:{$near:[40,70]}})
• Regular Expressions
★ db.places.find({name: /^typeaheadstring/)
• Using Tags
★ db.places.find({tags: “business”})
Friday, July 12, 13
User Check-Ins
Record User Check-Ins
Check-Ins
Users
Stats
Users
Stats
Friday, July 12, 13
Users
user1 = {
	

 name:“John Smith”
	

 e-mail:“me@John.Smith.com”,
	

 check-ins: [4b97e62bf1d8c7152c9ccb74,
5a20e62bf1d8c736ab]
}
checkins [] = ObjectId reference to Check-Ins
Collection
Friday, July 12, 13
Check-Ins
user1 = {
	

 place: “10gen HQ”,
	

 ts: 9/20/2010 10:12:00,
	

 userId: <object id of user>
}
Every Check-In is Two Operations
• Insert a Check-In Object (check-ins collection)
• Update ($push) user object with check-in ID
(users collection)
Friday, July 12, 13
Simple Stats
db.checkins.find({place:“10gen HQ”)
db.checkins.find({place:“10gen HQ”})
	

 	

 	

 	

 .sort({ts:-1}).limit(10)
db.checkins.find({place:“10gen HQ”, 	

	

 	

 	

 	

 ts: {$gt: midnight}}).count()
Friday, July 12, 13
Stats w/ MapReduce
mapFunc = function() {emit(this.place, 1);}
reduceFunc = function(key, values) {return
Array.sum(values);}
res = db.checkins.mapReduce(mapFunc,reduceFunc,
	

 {query: {timestamp: {$gt:nowminus3hrs}}})
res = [{_id:”10gen HQ”, value: 17}, ….., ….]
... or try using the new aggregation framework!
Friday, July 12, 13
Account Modified
Date: 06/22/2012
Action: Added
Adding More User Data
User Opened
Date: 05/26/2012
Status: Success
User Call Log
Date: 07/24/2012
Type: Complaint
Friday, July 12, 13
Account Modified
Date: 06/22/2012
Action: Added
Adding More User Data
Click!
Click! Click!
User Opened
Date: 05/26/2012
Status: Success
Click!
User Call Log
Date: 07/24/2012
Type: Complaint
Click!
Friday, July 12, 13
Tracking Clicks
Policies Activities
Friday, July 12, 13
Each Click Creates a New Doc
Policies Activities Clicks
Friday, July 12, 13
Clicks
click = {
	

 user: “JohnSmith”,
	

 ts: 9/20/2010 10:12:00,
	

 link:“http://some-link-here.com/wherever”
}
Now we can audit user activity...
db.clicks.find({user:”JohnSmith”}).sort({ts:-1})
Show me all of John’s clicks sorted by timestamp.
Friday, July 12, 13
Extending the Schema
user1 = {
	

 name:“John Smith”
	

 e-mail:“me@John.Smith.com”,
	

 check-ins: [4b97e62bf1d8c7152c9ccb74,
5a20e62bf1d8c736ab]
}
Friday, July 12, 13
Extending the Schema
user1 = {
	

 name:“John Smith”
	

 e-mail:“me@John.Smith.com”,
	

 check-ins: [4b97e62bf1d8c7152c9ccb74,
5a20e62bf1d8c736ab],
	

 friends: [7b47j62bk1d3c5621c1icv90,
1h11p62bf1d8c716za]
}
Friday, July 12, 13
Takeaways
// User Data Fits Well in MongoDB
> Flexible Data Model
> Stay Agile; Make Changes
> Many Customers in Production
// Application Patterns Drive Data Design
> Optimize Data Model For Queries
> Primary Use Cases Drive Design
// Adding Features Can Be Easy
> Create New Data Structures
> Extend Existing
Friday, July 12, 13
@mongodb
conferences,	
  appearances,	
  and	
  meetups
http://www.10gen.com/events
http://bit.ly/mongo>	
  
Facebook	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  |	
  	
  	
  	
  	
  	
  	
  	
  	
  Twitter	
  	
  	
  	
  	
  	
  	
  	
  	
  |	
  	
  	
  	
  	
  	
  	
  	
  	
  LinkedIn
http://linkd.in/joinmongo
More info at http://www.mongodb.org/
Questions?
Oz@10gen.com
Friday, July 12, 13

Más contenido relacionado

Destacado

MongoDB 2.4 Security Features
MongoDB 2.4 Security FeaturesMongoDB 2.4 Security Features
MongoDB 2.4 Security FeaturesMongoDB
 
Replication and Replica Sets
Replication and Replica SetsReplication and Replica Sets
Replication and Replica SetsMongoDB
 
Launching Services in Amazon Web Services
Launching Services in Amazon Web ServicesLaunching Services in Amazon Web Services
Launching Services in Amazon Web ServicesJames Armes
 
Regular Expressions and You
Regular Expressions and YouRegular Expressions and You
Regular Expressions and YouJames Armes
 
Security Features in MongoDB 2.4
Security Features in MongoDB 2.4Security Features in MongoDB 2.4
Security Features in MongoDB 2.4MongoDB
 
MongoDB : Scaling, Security & Performance
MongoDB : Scaling, Security & PerformanceMongoDB : Scaling, Security & Performance
MongoDB : Scaling, Security & PerformanceSasidhar Gogulapati
 

Destacado (6)

MongoDB 2.4 Security Features
MongoDB 2.4 Security FeaturesMongoDB 2.4 Security Features
MongoDB 2.4 Security Features
 
Replication and Replica Sets
Replication and Replica SetsReplication and Replica Sets
Replication and Replica Sets
 
Launching Services in Amazon Web Services
Launching Services in Amazon Web ServicesLaunching Services in Amazon Web Services
Launching Services in Amazon Web Services
 
Regular Expressions and You
Regular Expressions and YouRegular Expressions and You
Regular Expressions and You
 
Security Features in MongoDB 2.4
Security Features in MongoDB 2.4Security Features in MongoDB 2.4
Security Features in MongoDB 2.4
 
MongoDB : Scaling, Security & Performance
MongoDB : Scaling, Security & PerformanceMongoDB : Scaling, Security & Performance
MongoDB : Scaling, Security & Performance
 

Similar a User Data Management with MongoDB

Webinar: User Data Management with MongoDB
Webinar: User Data Management with MongoDBWebinar: User Data Management with MongoDB
Webinar: User Data Management with MongoDBMongoDB
 
Creating a Single View: Overview and Analysis
Creating a Single View: Overview and AnalysisCreating a Single View: Overview and Analysis
Creating a Single View: Overview and AnalysisMongoDB
 
How to Win Friends and Influence People (with Hadoop)
How to Win Friends and Influence People (with Hadoop)How to Win Friends and Influence People (with Hadoop)
How to Win Friends and Influence People (with Hadoop)Sam Shah
 
Single View of the Customer
Single View of the Customer Single View of the Customer
Single View of the Customer MongoDB
 
End-to-End Identity Management
End-to-End Identity ManagementEnd-to-End Identity Management
End-to-End Identity ManagementWSO2
 
Our application got popular and now it breaks
Our application got popular and now it breaksOur application got popular and now it breaks
Our application got popular and now it breaksColdFusionConference
 
Our application got popular and now it breaks
Our application got popular and now it breaksOur application got popular and now it breaks
Our application got popular and now it breaksdevObjective
 
How Retail Banks Use MongoDB
How Retail Banks Use MongoDBHow Retail Banks Use MongoDB
How Retail Banks Use MongoDBMongoDB
 
BSides Lisbon 2017: David Sopas's 'GTFO Mr. User'
BSides Lisbon 2017: David Sopas's 'GTFO Mr. User'BSides Lisbon 2017: David Sopas's 'GTFO Mr. User'
BSides Lisbon 2017: David Sopas's 'GTFO Mr. User'Checkmarx
 
Duet enterprise executive overview
Duet enterprise executive overviewDuet enterprise executive overview
Duet enterprise executive overviewYi Guoyong
 
CamundaCon NYC 2023 Keynote - Shifting into overdrive with process orchestration
CamundaCon NYC 2023 Keynote - Shifting into overdrive with process orchestrationCamundaCon NYC 2023 Keynote - Shifting into overdrive with process orchestration
CamundaCon NYC 2023 Keynote - Shifting into overdrive with process orchestrationBernd Ruecker
 
Web analytics, a CARL IT On Air presentation
Web analytics, a CARL IT On Air presentationWeb analytics, a CARL IT On Air presentation
Web analytics, a CARL IT On Air presentationIan Chan
 
How can a data layer help my seo
How can a data layer help my seoHow can a data layer help my seo
How can a data layer help my seoPhil Pearce
 
Creating a Single View Part 1: Overview and Data Analysis
Creating a Single View Part 1: Overview and Data AnalysisCreating a Single View Part 1: Overview and Data Analysis
Creating a Single View Part 1: Overview and Data AnalysisMongoDB
 
Socialize your SAP ERP and Collaborate with him!
Socialize your SAP ERP and Collaborate with him! Socialize your SAP ERP and Collaborate with him!
Socialize your SAP ERP and Collaborate with him! Andrea Fontana
 
Nyss Open legislation
Nyss Open legislationNyss Open legislation
Nyss Open legislationGraylinKim
 
AD306 - Turbocharge Your Enterprise Social Network With Analytics
AD306 - Turbocharge Your Enterprise Social Network With AnalyticsAD306 - Turbocharge Your Enterprise Social Network With Analytics
AD306 - Turbocharge Your Enterprise Social Network With AnalyticsVincent Burckhardt
 
2013 SharePoint Fest DC - Build a SharePoint Intake/Request List
2013 SharePoint Fest DC - Build a SharePoint Intake/Request List2013 SharePoint Fest DC - Build a SharePoint Intake/Request List
2013 SharePoint Fest DC - Build a SharePoint Intake/Request ListWes Preston
 
SOASTA mPulse: Delivering the Real in Real User Measurement (RUM)
SOASTA mPulse: Delivering the Real in Real User Measurement (RUM)SOASTA mPulse: Delivering the Real in Real User Measurement (RUM)
SOASTA mPulse: Delivering the Real in Real User Measurement (RUM)SOASTA
 
SOASTA mPulse: Delivering the Real in Real User Measurement (RUM)
SOASTA mPulse: Delivering the Real in Real User Measurement (RUM)SOASTA mPulse: Delivering the Real in Real User Measurement (RUM)
SOASTA mPulse: Delivering the Real in Real User Measurement (RUM)SOASTA
 

Similar a User Data Management with MongoDB (20)

Webinar: User Data Management with MongoDB
Webinar: User Data Management with MongoDBWebinar: User Data Management with MongoDB
Webinar: User Data Management with MongoDB
 
Creating a Single View: Overview and Analysis
Creating a Single View: Overview and AnalysisCreating a Single View: Overview and Analysis
Creating a Single View: Overview and Analysis
 
How to Win Friends and Influence People (with Hadoop)
How to Win Friends and Influence People (with Hadoop)How to Win Friends and Influence People (with Hadoop)
How to Win Friends and Influence People (with Hadoop)
 
Single View of the Customer
Single View of the Customer Single View of the Customer
Single View of the Customer
 
End-to-End Identity Management
End-to-End Identity ManagementEnd-to-End Identity Management
End-to-End Identity Management
 
Our application got popular and now it breaks
Our application got popular and now it breaksOur application got popular and now it breaks
Our application got popular and now it breaks
 
Our application got popular and now it breaks
Our application got popular and now it breaksOur application got popular and now it breaks
Our application got popular and now it breaks
 
How Retail Banks Use MongoDB
How Retail Banks Use MongoDBHow Retail Banks Use MongoDB
How Retail Banks Use MongoDB
 
BSides Lisbon 2017: David Sopas's 'GTFO Mr. User'
BSides Lisbon 2017: David Sopas's 'GTFO Mr. User'BSides Lisbon 2017: David Sopas's 'GTFO Mr. User'
BSides Lisbon 2017: David Sopas's 'GTFO Mr. User'
 
Duet enterprise executive overview
Duet enterprise executive overviewDuet enterprise executive overview
Duet enterprise executive overview
 
CamundaCon NYC 2023 Keynote - Shifting into overdrive with process orchestration
CamundaCon NYC 2023 Keynote - Shifting into overdrive with process orchestrationCamundaCon NYC 2023 Keynote - Shifting into overdrive with process orchestration
CamundaCon NYC 2023 Keynote - Shifting into overdrive with process orchestration
 
Web analytics, a CARL IT On Air presentation
Web analytics, a CARL IT On Air presentationWeb analytics, a CARL IT On Air presentation
Web analytics, a CARL IT On Air presentation
 
How can a data layer help my seo
How can a data layer help my seoHow can a data layer help my seo
How can a data layer help my seo
 
Creating a Single View Part 1: Overview and Data Analysis
Creating a Single View Part 1: Overview and Data AnalysisCreating a Single View Part 1: Overview and Data Analysis
Creating a Single View Part 1: Overview and Data Analysis
 
Socialize your SAP ERP and Collaborate with him!
Socialize your SAP ERP and Collaborate with him! Socialize your SAP ERP and Collaborate with him!
Socialize your SAP ERP and Collaborate with him!
 
Nyss Open legislation
Nyss Open legislationNyss Open legislation
Nyss Open legislation
 
AD306 - Turbocharge Your Enterprise Social Network With Analytics
AD306 - Turbocharge Your Enterprise Social Network With AnalyticsAD306 - Turbocharge Your Enterprise Social Network With Analytics
AD306 - Turbocharge Your Enterprise Social Network With Analytics
 
2013 SharePoint Fest DC - Build a SharePoint Intake/Request List
2013 SharePoint Fest DC - Build a SharePoint Intake/Request List2013 SharePoint Fest DC - Build a SharePoint Intake/Request List
2013 SharePoint Fest DC - Build a SharePoint Intake/Request List
 
SOASTA mPulse: Delivering the Real in Real User Measurement (RUM)
SOASTA mPulse: Delivering the Real in Real User Measurement (RUM)SOASTA mPulse: Delivering the Real in Real User Measurement (RUM)
SOASTA mPulse: Delivering the Real in Real User Measurement (RUM)
 
SOASTA mPulse: Delivering the Real in Real User Measurement (RUM)
SOASTA mPulse: Delivering the Real in Real User Measurement (RUM)SOASTA mPulse: Delivering the Real in Real User Measurement (RUM)
SOASTA mPulse: Delivering the Real in Real User Measurement (RUM)
 

Más de MongoDB

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
 
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
 

Más de MongoDB (20)

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
 
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...
 

Último

Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsRoshan Dwivedi
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
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
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 
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
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
[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
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
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
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
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
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 

Último (20)

Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
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
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
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
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
[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
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
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 ...
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
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
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 

User Data Management with MongoDB

  • 1. User Data Management with Please stand by... We’ll begin shortly. Q&A to follow the webinar Recording Available 24 Hours After Event Other issues? E-mail webinars@10gen.com Osmar Olivo Consulting Engineer, 10gen Oz@10gen.com Friday, July 12, 13
  • 2. Agenda // High Level Overview > MongoDB > User Data // Modeling & Querying User Data > Insurance Company User Data > User Check-Ins // Extending the Data Model for Future Use-Cases > Tracking User Activity > Social Media Friday, July 12, 13
  • 3. MongoDB • Scalable, High-Performance, Open Source, Document- Oriented Database – JSON (well... BSON) Storage Model – Indexes and Full Query Language – Easy for Developers to Pick Up – Easy for Administrators to Scale • More Features at http://www.mongodb.org/ • Overview Video: http://www.10gen.com/what-is-mongodb Friday, July 12, 13
  • 4. User Data • Account Information – Name, Address, etc – Account Status – Notes • Activity Streams – Posts, Tweets, Likes, Check-Ins – Recording User Actions • Social Networks – Friends, Connections – Groups, Tags Friday, July 12, 13
  • 5. Insurance Company Data Account Information – Name, Address, etc – Account Status – Notes A Data Modeling Exercise Friday, July 12, 13
  • 8. Insurance Company User Opened Date: 05/26/2012 Status: Success Account Modified Date: 06/22/2012 Action: Added User Call Log Date: 07/24/2012 Type: Complaint Friday, July 12, 13
  • 9. 2 Types of Data User Opened Date: 05/26/2012 Status: Success Account Modified Date: 06/22/2012 Action: Added User Call Log Date: 07/24/2012 Type: Complaint Friday, July 12, 13
  • 10. Rule of Thumb: Categories of Data Map Well to MongoDB Collections Policies Activities Friday, July 12, 13
  • 11. Policies policy = { name:“John Smith” employer:“10gen”, address:“555 Fictional Ave”, e-mail:“me@john.smith.com”, spouse:“Yes”, dependents:“No”, dates: [ {start: 5/26/2013 10:12:00}, end: 5/26/2023 10:12:00}], others:“No” } Friday, July 12, 13
  • 12. Activities activity = { user-id: “JohnSmith421” type:“account-opening”, status:“Success”, dates: 5/26/2012 10:12:00, related-doc:“/customer/ JohnSmith421/open.pdf” } User Opened Account Date: 05/26/2012 Status: Success Account Modified Date: 06/22/2012 Action: Added Spouse User Call Log Date: 07/24/2012 Type: Complaint Friday, July 12, 13
  • 13. User Check-Ins Activity Streams – Posts, Tweets, Check-Ins – Recording User Actions Friday, July 12, 13
  • 14. Places Q: Current location A: Places near location User Generated Content Places Friday, July 12, 13
  • 15. Inserting a Place var p = { name:“10gen HQ”, address:“229 W 43rd St”, city:“NewYork”, zip:“10036”, tags: [“mongoDB”,“business”], latlong: [40.0, 72.0], tips: [{user:“John Smith”, time:“3/15/2013”,tip: “Make sure to stop by for office hours!”}]} > db.posts.save(p) Friday, July 12, 13
  • 16. Updating Tips db.places.update({name:"10gen HQ"}, {$push :{tips: {user:"John", time:3/15/2012, tip:"stop by for office hours on Wednesdays from 4-6"}}}} Friday, July 12, 13
  • 17. Querying Our Places • Creating Indexes ★ db.places.ensureIndex({tags:1}) ★ db.places.ensureIndex({name:1}) ★ db.places.ensureIndex({latlong:”2d”}) • Finding Places ★ db.places.find({latlong:{$near:[40,70]}}) • Regular Expressions ★ db.places.find({name: /^typeaheadstring/) • Using Tags ★ db.places.find({tags: “business”}) Friday, July 12, 13
  • 18. User Check-Ins Record User Check-Ins Check-Ins Users Stats Users Stats Friday, July 12, 13
  • 19. Users user1 = { name:“John Smith” e-mail:“me@John.Smith.com”, check-ins: [4b97e62bf1d8c7152c9ccb74, 5a20e62bf1d8c736ab] } checkins [] = ObjectId reference to Check-Ins Collection Friday, July 12, 13
  • 20. Check-Ins user1 = { place: “10gen HQ”, ts: 9/20/2010 10:12:00, userId: <object id of user> } Every Check-In is Two Operations • Insert a Check-In Object (check-ins collection) • Update ($push) user object with check-in ID (users collection) Friday, July 12, 13
  • 21. Simple Stats db.checkins.find({place:“10gen HQ”) db.checkins.find({place:“10gen HQ”}) .sort({ts:-1}).limit(10) db.checkins.find({place:“10gen HQ”, ts: {$gt: midnight}}).count() Friday, July 12, 13
  • 22. Stats w/ MapReduce mapFunc = function() {emit(this.place, 1);} reduceFunc = function(key, values) {return Array.sum(values);} res = db.checkins.mapReduce(mapFunc,reduceFunc, {query: {timestamp: {$gt:nowminus3hrs}}}) res = [{_id:”10gen HQ”, value: 17}, ….., ….] ... or try using the new aggregation framework! Friday, July 12, 13
  • 23. Account Modified Date: 06/22/2012 Action: Added Adding More User Data User Opened Date: 05/26/2012 Status: Success User Call Log Date: 07/24/2012 Type: Complaint Friday, July 12, 13
  • 24. Account Modified Date: 06/22/2012 Action: Added Adding More User Data Click! Click! Click! User Opened Date: 05/26/2012 Status: Success Click! User Call Log Date: 07/24/2012 Type: Complaint Click! Friday, July 12, 13
  • 26. Each Click Creates a New Doc Policies Activities Clicks Friday, July 12, 13
  • 27. Clicks click = { user: “JohnSmith”, ts: 9/20/2010 10:12:00, link:“http://some-link-here.com/wherever” } Now we can audit user activity... db.clicks.find({user:”JohnSmith”}).sort({ts:-1}) Show me all of John’s clicks sorted by timestamp. Friday, July 12, 13
  • 28. Extending the Schema user1 = { name:“John Smith” e-mail:“me@John.Smith.com”, check-ins: [4b97e62bf1d8c7152c9ccb74, 5a20e62bf1d8c736ab] } Friday, July 12, 13
  • 29. Extending the Schema user1 = { name:“John Smith” e-mail:“me@John.Smith.com”, check-ins: [4b97e62bf1d8c7152c9ccb74, 5a20e62bf1d8c736ab], friends: [7b47j62bk1d3c5621c1icv90, 1h11p62bf1d8c716za] } Friday, July 12, 13
  • 30. Takeaways // User Data Fits Well in MongoDB > Flexible Data Model > Stay Agile; Make Changes > Many Customers in Production // Application Patterns Drive Data Design > Optimize Data Model For Queries > Primary Use Cases Drive Design // Adding Features Can Be Easy > Create New Data Structures > Extend Existing Friday, July 12, 13
  • 31. @mongodb conferences,  appearances,  and  meetups http://www.10gen.com/events http://bit.ly/mongo>   Facebook                    |                  Twitter                  |                  LinkedIn http://linkd.in/joinmongo More info at http://www.mongodb.org/ Questions? Oz@10gen.com Friday, July 12, 13