SlideShare a Scribd company logo
1 of 27
MS Azure
DocumentDB
MSDEVMTL
GROUPE AZURE
OCTOBER 26TH, 2015
Who am I?
Vincent-Philippe Lauzon
Cloud Solution Architect
Microsoft Canada
Blog: http://vincentlauzon.com
Twitter: http://twitter.com/@vplauzon
Audience
I’ve read about Azure
I’ve tried Azure
Working with Azure
Azure is what I do
No SQL
 NO SQL → Not Only SQL
 Other than Tabular / Relational model
 Less / No up-front (schema) design
 Easier to scale horizontally (cluster)
 Make them a better match for big data
 Each Product makes different tradeoffs
 Younger & less complete feature set
No SQL on Azure
 Fully Managed
 Table Storage (Key Value)
 Redis (Key Value)
 Hadoop HBase (Wide Column)
 Hadoop Hive (ad hoc tables)
 DocumentDB (Document)
 Through Marketplace
 MongoDB (Document)
 CouchBase (Document)
 Cassandra (Wide Column)
 Neo4J (Graph)
Azure DocumentDB
 NoSQL document database as-a-service
 Query JSON docs: whole docs are indexed
 Familiar languages: SQL & JavaScript
 Fast / Predictable Performance (SSD)
 Tunable consistency
 Flexible document schema without sacrificing
queryability
 Will be available on Azure Stack (on premise)
Conceptual Domain
101
010
DocumentDB account Databases
Users
Permissions
Collections Documents Attachments
Stored procedures
Triggers
User-defined functions
your
Documents
here
{ }
{ }
JS
JS
JS
Demo: Account Creation &
Adding Documents
Collections
 Collections are not tables
 Unit of partitioning / Scaling Unit
 Transaction boundary
 No enforced schema, flexible
 Queries or updates stay within one collection
 Size of 10 Gb
 For more, you need to shard through multiple collections
 e.g. Spill-over, Range
Demo: Simple Querying
More on querying
 Visit the Querying Playground:
 https://www.documentdb.com/sql/demo
 Use the cheat sheet
 http://aka.ms/docdbcheatsheet
 Data Migration Tool:
 https://azure.microsoft.com/en-
us/documentation/articles/documentdb-import-data/
Querying limitation
 Within a collection
 No inter-document joins  (yet?)
 Beside filtering, only ORDER BY is supported
 No aggregation yet 
 No COUNT
 No GROUP BY
 No SUM, AVG, etc.
 SQL for queries only
 No batch UPDATE or DELETE or CREATE
Indexing
 Every property is indexed!
 Unless you opt out
 You can opt-out selectively
 Leave out paths
 Per collection (policy) or per document
 Indexing mode: consistent vs lazy
 Kind: hash, range & spatial
 Automatic vs manual
 You might want to fiddle with it: indexes take space
 You can now change them online!
Demo: Looking at indexing
policy
Consistency
 Set at the account level
 Can be overridden at the query level
 4 Levels
 Strong
 Bounded staleness
 Session
 Eventual
Demo: Looking at
consistency level
DocumentDB at Microsoft
over 425 millionunique users
store 20TB of JSON document data
under 15ms writes and single digit ms reads
store for 40+ app / device combinations
available globally to serve all markets
user data store
Other objects
101
010
DocumentDB account Databases
Users
Permissions
Collections Documents Attachments
Stored procedures
Triggers
User-defined functions
your
Documents
here
{ }
{ }
JS
JS
JS
Limitations / Quotas
https://azure.microsoft.com/en-us/documentation/articles/documentdb-limits/
Entity Quota
Accounts 5 (soft)
Dbs / Account 100
Permissions / Account 2M
Sprocs, Triggers & UDFs / collection 25
Max Execution Time / Sproc, Triggeer 5 seconds
Collections / DB 100 (soft)
ID Length 255 chars
AND, OR / query 20
Demo: .NET SDK
Data Modeling –
Polymorphism
 Put every document type in a collection
 Discriminate on document type somehow
 documentType property or other mechanism
 Use Collection as scaling units not as categorization
unit
Data Modeling –
Denormalization
 Optimize for read (no inter-doc joins)
 Embed relationships in document
 One-to-few relationships
 Data changing infrequently
 Data that is integral to documents
 When embed provides better reading perf
 Make sure the pattern fit: you read much more than
you write
 Gone wrong: blog posts & comments
 Leverage x-doc transaction (stored procs)
Data Modeling –
Normalization
 Normalize
 One-to-many (unbound)
 Many-to-many
 Frequent changes
 If nothing in here fits: stick with relational
Integration within Azure
 Indexer for Azure Search
 https://azure.microsoft.com/en-
us/documentation/articles/search-howto-connecting-
azure-sql-database-to-azure-search-using-indexers-
2015-02-28/
 Power BI:
 https://azure.microsoft.com/en-us/blog/unleashing-
insights-from-data-in-documentdb-with-power-bi/
 Data Factory: both source & sink
 Sink in Stream Analytics:
 https://azure.microsoft.com/en-us/blog/azure-stream-
analytics-and-documentdb-for-your-iot-application/
IMDB import
Batch Event Hub Stream
Analytics
DocumentDB
Log Analysis Example
DocumentDBWeb SiteApp Logs
{
eventName = “busRead“,
duration = “0:0:21.423“,
subscription = “XYZ”,
messageCount=“3”
}
http://bit.ly/1JQbkTH
{
eventName = “requestFailed“,
duration = “0:0:0.231“,
error = “…”,
endPoint=“http://oursite.com/...”
}
Thank you!
 All demo material is available here:
http://bit.ly/1SrhVcA

More Related Content

What's hot

The CIOs Guide to NoSQL
The CIOs Guide to NoSQLThe CIOs Guide to NoSQL
The CIOs Guide to NoSQL
DATAVERSITY
 

What's hot (20)

Mongo DB
Mongo DBMongo DB
Mongo DB
 
The CIOs Guide to NoSQL
The CIOs Guide to NoSQLThe CIOs Guide to NoSQL
The CIOs Guide to NoSQL
 
[PASS Summit 2016] Azure DocumentDB: A Deep Dive into Advanced Features
[PASS Summit 2016] Azure DocumentDB: A Deep Dive into Advanced Features[PASS Summit 2016] Azure DocumentDB: A Deep Dive into Advanced Features
[PASS Summit 2016] Azure DocumentDB: A Deep Dive into Advanced Features
 
CouchDB
CouchDBCouchDB
CouchDB
 
Mongo db
Mongo dbMongo db
Mongo db
 
Mongo DB
Mongo DB Mongo DB
Mongo DB
 
An Introduction To NoSQL & MongoDB
An Introduction To NoSQL & MongoDBAn Introduction To NoSQL & MongoDB
An Introduction To NoSQL & MongoDB
 
Couch db
Couch dbCouch db
Couch db
 
MongoDB for Coder Training (Coding Serbia 2013)
MongoDB for Coder Training (Coding Serbia 2013)MongoDB for Coder Training (Coding Serbia 2013)
MongoDB for Coder Training (Coding Serbia 2013)
 
Mongodb - NoSql Database
Mongodb - NoSql DatabaseMongodb - NoSql Database
Mongodb - NoSql Database
 
Mongo DB: Fundamentals & Basics/ An Overview of MongoDB/ Mongo DB tutorials
Mongo DB: Fundamentals & Basics/ An Overview of MongoDB/ Mongo DB tutorialsMongo DB: Fundamentals & Basics/ An Overview of MongoDB/ Mongo DB tutorials
Mongo DB: Fundamentals & Basics/ An Overview of MongoDB/ Mongo DB tutorials
 
Cosmos DB at VLDB 2019
Cosmos DB at VLDB 2019Cosmos DB at VLDB 2019
Cosmos DB at VLDB 2019
 
Mongo db
Mongo dbMongo db
Mongo db
 
Non Relational Databases
Non Relational DatabasesNon Relational Databases
Non Relational Databases
 
Mongo db operations_v2
Mongo db operations_v2Mongo db operations_v2
Mongo db operations_v2
 
AzureDocumentDB
AzureDocumentDBAzureDocumentDB
AzureDocumentDB
 
MongoDB
MongoDBMongoDB
MongoDB
 
CouchDB
CouchDBCouchDB
CouchDB
 
Couch db
Couch dbCouch db
Couch db
 
Session #2, tech session: Build realtime search by Sylvain Utard from Algolia
Session #2, tech session: Build realtime search by Sylvain Utard from AlgoliaSession #2, tech session: Build realtime search by Sylvain Utard from Algolia
Session #2, tech session: Build realtime search by Sylvain Utard from Algolia
 

Similar to Introduction à DocumentDB

1 extreme performance - part i
1   extreme performance - part i1   extreme performance - part i
1 extreme performance - part i
sqlserver.co.il
 

Similar to Introduction à DocumentDB (20)

2014.11.14 Data Opportunities with Azure
2014.11.14 Data Opportunities with Azure2014.11.14 Data Opportunities with Azure
2014.11.14 Data Opportunities with Azure
 
Hadoop Frameworks Panel__HadoopSummit2010
Hadoop Frameworks Panel__HadoopSummit2010Hadoop Frameworks Panel__HadoopSummit2010
Hadoop Frameworks Panel__HadoopSummit2010
 
SQL Server 2016 new features
SQL Server 2016 new featuresSQL Server 2016 new features
SQL Server 2016 new features
 
Sql azure dec_2010 Lynn & Ike
Sql azure dec_2010 Lynn & IkeSql azure dec_2010 Lynn & Ike
Sql azure dec_2010 Lynn & Ike
 
Dipping Your Toes: Azure Data Lake for DBAs
Dipping Your Toes: Azure Data Lake for DBAsDipping Your Toes: Azure Data Lake for DBAs
Dipping Your Toes: Azure Data Lake for DBAs
 
Introduction to NoSQL
Introduction to NoSQLIntroduction to NoSQL
Introduction to NoSQL
 
SharePoint and Azure - A Match Made in the Clouds
SharePoint and Azure - A Match Made in the CloudsSharePoint and Azure - A Match Made in the Clouds
SharePoint and Azure - A Match Made in the Clouds
 
Afternoons with Azure - Azure Data Services
Afternoons with Azure - Azure Data ServicesAfternoons with Azure - Azure Data Services
Afternoons with Azure - Azure Data Services
 
Cloud Architecture Patterns for Mere Mortals - Bill Wilder - Vermont Code Cam...
Cloud Architecture Patterns for Mere Mortals - Bill Wilder - Vermont Code Cam...Cloud Architecture Patterns for Mere Mortals - Bill Wilder - Vermont Code Cam...
Cloud Architecture Patterns for Mere Mortals - Bill Wilder - Vermont Code Cam...
 
Introducing Azure SQL Data Warehouse
Introducing Azure SQL Data WarehouseIntroducing Azure SQL Data Warehouse
Introducing Azure SQL Data Warehouse
 
Azure Data Storage
Azure Data StorageAzure Data Storage
Azure Data Storage
 
Taming the Data Science Monster with A New ‘Sword’ – U-SQL
Taming the Data Science Monster with A New ‘Sword’ – U-SQLTaming the Data Science Monster with A New ‘Sword’ – U-SQL
Taming the Data Science Monster with A New ‘Sword’ – U-SQL
 
Data Analytics Meetup: Introduction to Azure Data Lake Storage
Data Analytics Meetup: Introduction to Azure Data Lake Storage Data Analytics Meetup: Introduction to Azure Data Lake Storage
Data Analytics Meetup: Introduction to Azure Data Lake Storage
 
Azure Days 2019: Business Intelligence auf Azure (Marco Amhof & Yves Mauron)
Azure Days 2019: Business Intelligence auf Azure (Marco Amhof & Yves Mauron)Azure Days 2019: Business Intelligence auf Azure (Marco Amhof & Yves Mauron)
Azure Days 2019: Business Intelligence auf Azure (Marco Amhof & Yves Mauron)
 
Design Considerations For Storing With Windows Azure
Design Considerations For Storing With Windows AzureDesign Considerations For Storing With Windows Azure
Design Considerations For Storing With Windows Azure
 
Prague data management meetup 2018-03-27
Prague data management meetup 2018-03-27Prague data management meetup 2018-03-27
Prague data management meetup 2018-03-27
 
1 extreme performance - part i
1   extreme performance - part i1   extreme performance - part i
1 extreme performance - part i
 
Ssis 2016 RC3
Ssis 2016 RC3Ssis 2016 RC3
Ssis 2016 RC3
 
DP-900.pdf
DP-900.pdfDP-900.pdf
DP-900.pdf
 
Experiences using CouchDB inside Microsoft's Azure team
Experiences using CouchDB inside Microsoft's Azure teamExperiences using CouchDB inside Microsoft's Azure team
Experiences using CouchDB inside Microsoft's Azure team
 

More from MSDEVMTL

More from MSDEVMTL (20)

Intro grpc.net
Intro  grpc.netIntro  grpc.net
Intro grpc.net
 
Grpc and asp.net partie 2
Grpc and asp.net partie 2Grpc and asp.net partie 2
Grpc and asp.net partie 2
 
Property based testing
Property based testingProperty based testing
Property based testing
 
Improve cloud visibility and cost in Microsoft Azure
Improve cloud visibility and cost in Microsoft AzureImprove cloud visibility and cost in Microsoft Azure
Improve cloud visibility and cost in Microsoft Azure
 
Return on Ignite 2019: Azure, .NET, A.I. & Data
Return on Ignite 2019: Azure, .NET, A.I. & DataReturn on Ignite 2019: Azure, .NET, A.I. & Data
Return on Ignite 2019: Azure, .NET, A.I. & Data
 
C sharp 8.0 new features
C sharp 8.0 new featuresC sharp 8.0 new features
C sharp 8.0 new features
 
Asp.net core 3
Asp.net core 3Asp.net core 3
Asp.net core 3
 
MSDEVMTL Informations 2019
MSDEVMTL Informations 2019MSDEVMTL Informations 2019
MSDEVMTL Informations 2019
 
Common features in webapi aspnetcore
Common features in webapi aspnetcoreCommon features in webapi aspnetcore
Common features in webapi aspnetcore
 
Groupe Excel et Power BI - Rencontre du 25 septembre 2018
Groupe Excel et Power BI  - Rencontre du 25 septembre 2018Groupe Excel et Power BI  - Rencontre du 25 septembre 2018
Groupe Excel et Power BI - Rencontre du 25 septembre 2018
 
Api gateway
Api gatewayApi gateway
Api gateway
 
Common features in webapi aspnetcore
Common features in webapi aspnetcoreCommon features in webapi aspnetcore
Common features in webapi aspnetcore
 
Stephane Lapointe: Governance in Azure, keep control of your environments
Stephane Lapointe: Governance in Azure, keep control of your environmentsStephane Lapointe: Governance in Azure, keep control of your environments
Stephane Lapointe: Governance in Azure, keep control of your environments
 
Eric Routhier: Garder le contrôle sur vos coûts Azure
Eric Routhier: Garder le contrôle sur vos coûts AzureEric Routhier: Garder le contrôle sur vos coûts Azure
Eric Routhier: Garder le contrôle sur vos coûts Azure
 
Data science presentation
Data science presentationData science presentation
Data science presentation
 
Michel Ouellette + Gabriel Lainesse: Process Automation & Data Analytics at S...
Michel Ouellette + Gabriel Lainesse: Process Automation & Data Analytics at S...Michel Ouellette + Gabriel Lainesse: Process Automation & Data Analytics at S...
Michel Ouellette + Gabriel Lainesse: Process Automation & Data Analytics at S...
 
Open id connect, azure ad, angular 5, web api core
Open id connect, azure ad, angular 5, web api coreOpen id connect, azure ad, angular 5, web api core
Open id connect, azure ad, angular 5, web api core
 
Yoann Clombe : Fail fast, iterate quickly with power bi and google analytics
Yoann Clombe : Fail fast, iterate quickly with power bi and google analyticsYoann Clombe : Fail fast, iterate quickly with power bi and google analytics
Yoann Clombe : Fail fast, iterate quickly with power bi and google analytics
 
CAE: etude de cas - Rolling Average
CAE: etude de cas - Rolling AverageCAE: etude de cas - Rolling Average
CAE: etude de cas - Rolling Average
 
CAE: etude de cas
CAE: etude de casCAE: etude de cas
CAE: etude de cas
 

Recently uploaded

CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
giselly40
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
Earley Information Science
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
Enterprise Knowledge
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
 

Recently uploaded (20)

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
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
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
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
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
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
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...
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
[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
 
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
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
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
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 

Introduction à DocumentDB

  • 2. Who am I? Vincent-Philippe Lauzon Cloud Solution Architect Microsoft Canada Blog: http://vincentlauzon.com Twitter: http://twitter.com/@vplauzon
  • 3. Audience I’ve read about Azure I’ve tried Azure Working with Azure Azure is what I do
  • 4. No SQL  NO SQL → Not Only SQL  Other than Tabular / Relational model  Less / No up-front (schema) design  Easier to scale horizontally (cluster)  Make them a better match for big data  Each Product makes different tradeoffs  Younger & less complete feature set
  • 5. No SQL on Azure  Fully Managed  Table Storage (Key Value)  Redis (Key Value)  Hadoop HBase (Wide Column)  Hadoop Hive (ad hoc tables)  DocumentDB (Document)  Through Marketplace  MongoDB (Document)  CouchBase (Document)  Cassandra (Wide Column)  Neo4J (Graph)
  • 6. Azure DocumentDB  NoSQL document database as-a-service  Query JSON docs: whole docs are indexed  Familiar languages: SQL & JavaScript  Fast / Predictable Performance (SSD)  Tunable consistency  Flexible document schema without sacrificing queryability  Will be available on Azure Stack (on premise)
  • 7. Conceptual Domain 101 010 DocumentDB account Databases Users Permissions Collections Documents Attachments Stored procedures Triggers User-defined functions your Documents here { } { } JS JS JS
  • 8. Demo: Account Creation & Adding Documents
  • 9. Collections  Collections are not tables  Unit of partitioning / Scaling Unit  Transaction boundary  No enforced schema, flexible  Queries or updates stay within one collection  Size of 10 Gb  For more, you need to shard through multiple collections  e.g. Spill-over, Range
  • 11. More on querying  Visit the Querying Playground:  https://www.documentdb.com/sql/demo  Use the cheat sheet  http://aka.ms/docdbcheatsheet  Data Migration Tool:  https://azure.microsoft.com/en- us/documentation/articles/documentdb-import-data/
  • 12. Querying limitation  Within a collection  No inter-document joins  (yet?)  Beside filtering, only ORDER BY is supported  No aggregation yet   No COUNT  No GROUP BY  No SUM, AVG, etc.  SQL for queries only  No batch UPDATE or DELETE or CREATE
  • 13. Indexing  Every property is indexed!  Unless you opt out  You can opt-out selectively  Leave out paths  Per collection (policy) or per document  Indexing mode: consistent vs lazy  Kind: hash, range & spatial  Automatic vs manual  You might want to fiddle with it: indexes take space  You can now change them online!
  • 14. Demo: Looking at indexing policy
  • 15. Consistency  Set at the account level  Can be overridden at the query level  4 Levels  Strong  Bounded staleness  Session  Eventual
  • 17. DocumentDB at Microsoft over 425 millionunique users store 20TB of JSON document data under 15ms writes and single digit ms reads store for 40+ app / device combinations available globally to serve all markets user data store
  • 18. Other objects 101 010 DocumentDB account Databases Users Permissions Collections Documents Attachments Stored procedures Triggers User-defined functions your Documents here { } { } JS JS JS
  • 19. Limitations / Quotas https://azure.microsoft.com/en-us/documentation/articles/documentdb-limits/ Entity Quota Accounts 5 (soft) Dbs / Account 100 Permissions / Account 2M Sprocs, Triggers & UDFs / collection 25 Max Execution Time / Sproc, Triggeer 5 seconds Collections / DB 100 (soft) ID Length 255 chars AND, OR / query 20
  • 21. Data Modeling – Polymorphism  Put every document type in a collection  Discriminate on document type somehow  documentType property or other mechanism  Use Collection as scaling units not as categorization unit
  • 22. Data Modeling – Denormalization  Optimize for read (no inter-doc joins)  Embed relationships in document  One-to-few relationships  Data changing infrequently  Data that is integral to documents  When embed provides better reading perf  Make sure the pattern fit: you read much more than you write  Gone wrong: blog posts & comments  Leverage x-doc transaction (stored procs)
  • 23. Data Modeling – Normalization  Normalize  One-to-many (unbound)  Many-to-many  Frequent changes  If nothing in here fits: stick with relational
  • 24. Integration within Azure  Indexer for Azure Search  https://azure.microsoft.com/en- us/documentation/articles/search-howto-connecting- azure-sql-database-to-azure-search-using-indexers- 2015-02-28/  Power BI:  https://azure.microsoft.com/en-us/blog/unleashing- insights-from-data-in-documentdb-with-power-bi/  Data Factory: both source & sink  Sink in Stream Analytics:  https://azure.microsoft.com/en-us/blog/azure-stream- analytics-and-documentdb-for-your-iot-application/
  • 25. IMDB import Batch Event Hub Stream Analytics DocumentDB
  • 26. Log Analysis Example DocumentDBWeb SiteApp Logs { eventName = “busRead“, duration = “0:0:21.423“, subscription = “XYZ”, messageCount=“3” } http://bit.ly/1JQbkTH { eventName = “requestFailed“, duration = “0:0:0.231“, error = “…”, endPoint=“http://oursite.com/...” }
  • 27. Thank you!  All demo material is available here: http://bit.ly/1SrhVcA