SlideShare ist ein Scribd-Unternehmen logo
1 von 21
Microsoft Azure
DocumentDB
Microsoft’s NoSQL Database as a Service
Global Azure Bootcamp 2016 Sunny SharmaC# Corner – Delhi Chapter
< Who am I />
• Sunny Sharma
• Lead Developer @ C# Corner
• C# Corner MVP
• Author / Trainer / Speaker
• t: @sunny_delhi
• http://codeflair.net
DocumentDB – Core Features
• Schema-less, NoSQL Document database
• JSON documents
• Transactional support with ACID semantics
• Tunable Consistency
• Excellent Search Speed without SQL
• Restful API
• Async Support
• Fully Managed
Tunable Consistency Levels
• Strong
• Session
• Bounded Staleness
• Eventual
Consistency Levels
• Client always see completely consistent data
• Slowest read/write
• Applicable to areas: Airline / Banking / Stock Market
Strong
Consistency Levels
• Client reads its own writes, while other clients
reading this same date might see older values.
Session (default option)
Consistency Levels
• Client might see old data, but it can specify how old
that data can be, let’s say 3 seconds!
• Updates happen in order received
• Similar to Session consistency, but speeds up the
reads while still preserving the order of updates.
Bounded Staleness
Consistency Levels
• Client might see old data for as long as it takes a
write to propagate to all replicas
• High performance & availability
• Client might see updates out of order
Eventual
Resource Model
Sample JSON document
{
"Event": "Global Azure Bootcamp",
"Year":"2016",
"Session": "Learn DocumentDB - Microsoft's NoSQL database",
"Speaker": "Sunny Sharma",
"Hours":"02:30 PM-03:30 PM",
"Other Sessions":[
{
"Name": "IoT With Azure",
"Speaker":"Prabhjot Singh",
"Hours":"01:30 PM-02:30 PM"
},
{
"Name": "Introduction to Azure Application Insights",
"Speaker": "Mohit Chhabra",
"Hours":"03:30 PM-04:30 PM"
}
],
"Venue": "C# Corner - Delhi Chapter“,
“id”:”20160416”
}
Resource Addressing
• Native REST Interface
• Each resource has a permanent unique ID
• API URL:
• https://{database account}.documents.azure.com
• Document Path:
• /dbs/{database id}/colls/{collection id}/docs/{document id}
Operations
For each Resource:
• Create / Replace / Delete / Read / Query
• Read is a GET operation on a specific resource ID, returning
a single resource.
• Query is a POST operation on a collection with a request
body containing DocumentDB SQL text, returning a possible
empty collection of resources.
• Query can filter on indexed properties.
Stored Procedures, Triggers and UDFs
• DocumentDB supports server-side JavaScript
• Stored Procedures:
• Registered at collection level
• Operate on any document in the collection
• Invoked inside transaction context on primary replica
• Triggers:
• Pre- or Post: create, replace or delete operations
• Invoked inside transaction context on primary replica
• User-Defined Functions:
• Scalar functions invoked only inside queries
Support
• .NET (LINQ to SQL is supported)
• Node.js
• JavaScript
• Python
• Java
• Hadoop
When should you use?
In General
• You don’t want to do replication and scale-out by yourself
• You want to have tunable consistency
• You want to do rapid development
Compared to relational databases
• You don’t want predefined columns Compared to other document stores
Compared to other document stores
• You want to use a SQL-like grammar
Pricing
• http://bit.do/documentdb-pricing
• Capacity Units (CU)
• Capacity
• Throughput (in terms of rate of transactions / second)
• Request Units (RU) = 2000 request per second
• “Request” depends on the size of the document
ex. Uploading 1000 large JSON documents might count as
more than one request
Limitations & Quota
Entity Quota (Standard Offer)
Database Accounts* 50
Maximum document storage per
database account*
1 TB (or higher by request)
Provisioned document storage* /
collection
250 GB (or higher by request)
Maximum Request Units / second per
collection
250,000 RU/s(or higher by request)
Maximum request size of document 512KB
Maximum execution time for stored
procedure and trigger
5 seconds
References
• DocumentDb CheatSheet
• http://bit.ly/documentdb-cheatsheet
• DocumentDB Query Playground
• http://bit.ly/documentdb-playground
• Visual Studio Dev Essentials
• http://bit.ly/vsdev-essentials
Demo time!
Questions ?
Microsoft Azure DocumentDB -  Global Azure Bootcamp 2016

Weitere ähnliche Inhalte

Was ist angesagt?

Code for Startup MVP (Ruby on Rails) Session 1
Code for Startup MVP (Ruby on Rails) Session 1Code for Startup MVP (Ruby on Rails) Session 1
Code for Startup MVP (Ruby on Rails) Session 1
Henry S
 
Node.js Dublin Meetup April 2014
Node.js Dublin Meetup April 2014Node.js Dublin Meetup April 2014
Node.js Dublin Meetup April 2014
Damian Beresford
 

Was ist angesagt? (20)

Use notes objects in memory and other useful java tips for xpages development
Use notes objects in memory and other useful java tips for xpages developmentUse notes objects in memory and other useful java tips for xpages development
Use notes objects in memory and other useful java tips for xpages development
 
Road Trip To Component
Road Trip To ComponentRoad Trip To Component
Road Trip To Component
 
Java script
Java scriptJava script
Java script
 
Uklug2012 yellow and blue stream
Uklug2012 yellow and blue streamUklug2012 yellow and blue stream
Uklug2012 yellow and blue stream
 
Client server
Client serverClient server
Client server
 
Entity Framework Core 2.1: Simple, Powerful Data Access for .NET
Entity Framework Core 2.1: Simple, Powerful Data Access for .NETEntity Framework Core 2.1: Simple, Powerful Data Access for .NET
Entity Framework Core 2.1: Simple, Powerful Data Access for .NET
 
TypeScript: Bringing Sanity to JavaScript
TypeScript: Bringing Sanity to JavaScriptTypeScript: Bringing Sanity to JavaScript
TypeScript: Bringing Sanity to JavaScript
 
Scripting Languages in OSGi
Scripting Languages in OSGiScripting Languages in OSGi
Scripting Languages in OSGi
 
Bccon use notes objects in memory and other useful
Bccon   use notes objects in memory and other usefulBccon   use notes objects in memory and other useful
Bccon use notes objects in memory and other useful
 
TypeScript for Alfresco and CMIS - Alfresco DevCon 2012 San Jose
TypeScript for Alfresco and CMIS - Alfresco DevCon 2012 San JoseTypeScript for Alfresco and CMIS - Alfresco DevCon 2012 San Jose
TypeScript for Alfresco and CMIS - Alfresco DevCon 2012 San Jose
 
ApacheCon Core: Service Discovery in OSGi: Beyond the JVM using Docker and Co...
ApacheCon Core: Service Discovery in OSGi: Beyond the JVM using Docker and Co...ApacheCon Core: Service Discovery in OSGi: Beyond the JVM using Docker and Co...
ApacheCon Core: Service Discovery in OSGi: Beyond the JVM using Docker and Co...
 
NoSQL for great good [hanoi.rb talk]
NoSQL for great good [hanoi.rb talk]NoSQL for great good [hanoi.rb talk]
NoSQL for great good [hanoi.rb talk]
 
Code for Startup MVP (Ruby on Rails) Session 1
Code for Startup MVP (Ruby on Rails) Session 1Code for Startup MVP (Ruby on Rails) Session 1
Code for Startup MVP (Ruby on Rails) Session 1
 
Using forms in oXygen XML editor
Using forms in oXygen XML editorUsing forms in oXygen XML editor
Using forms in oXygen XML editor
 
Webservices: The RESTful Approach
Webservices: The RESTful ApproachWebservices: The RESTful Approach
Webservices: The RESTful Approach
 
Service Discovery in OSGi: Beyond the JVM using Docker and Consul
Service Discovery in OSGi: Beyond the JVM using Docker and ConsulService Discovery in OSGi: Beyond the JVM using Docker and Consul
Service Discovery in OSGi: Beyond the JVM using Docker and Consul
 
Node ts1
Node ts1Node ts1
Node ts1
 
Ansible API
Ansible APIAnsible API
Ansible API
 
Dropping ACID: Wrapping Your Mind Around NoSQL Databases
Dropping ACID: Wrapping Your Mind Around NoSQL DatabasesDropping ACID: Wrapping Your Mind Around NoSQL Databases
Dropping ACID: Wrapping Your Mind Around NoSQL Databases
 
Node.js Dublin Meetup April 2014
Node.js Dublin Meetup April 2014Node.js Dublin Meetup April 2014
Node.js Dublin Meetup April 2014
 

Andere mochten auch

5 Data Modeling for NoSQL 1/2
5 Data Modeling for NoSQL 1/25 Data Modeling for NoSQL 1/2
5 Data Modeling for NoSQL 1/2
Fabio Fumarola
 
02 kab final report in indonesia 2007
02 kab final report in indonesia 200702 kab final report in indonesia 2007
02 kab final report in indonesia 2007
imecommunity
 
Mini market bab iii
Mini market   bab iiiMini market   bab iii
Mini market bab iii
imecommunity
 

Andere mochten auch (20)

Analyze and visualize non-relational data with DocumentDB + Power BI
Analyze and visualize non-relational data with DocumentDB + Power BIAnalyze and visualize non-relational data with DocumentDB + Power BI
Analyze and visualize non-relational data with DocumentDB + Power BI
 
Introduction to Azure DocumentDB
Introduction to Azure DocumentDBIntroduction to Azure DocumentDB
Introduction to Azure DocumentDB
 
Modeling JSON data for NoSQL document databases
Modeling JSON data for NoSQL document databasesModeling JSON data for NoSQL document databases
Modeling JSON data for NoSQL document databases
 
Developing Solutions with Azure DocumentDB
Developing Solutions with Azure DocumentDB Developing Solutions with Azure DocumentDB
Developing Solutions with Azure DocumentDB
 
Microsoft azure documentDB
Microsoft azure documentDBMicrosoft azure documentDB
Microsoft azure documentDB
 
Introduction to Azure DocumentDB
Introduction to Azure DocumentDBIntroduction to Azure DocumentDB
Introduction to Azure DocumentDB
 
Azure DocumentDB Overview
Azure DocumentDB OverviewAzure DocumentDB Overview
Azure DocumentDB Overview
 
Azure DocumentDB
Azure DocumentDBAzure DocumentDB
Azure DocumentDB
 
Data Modeling for NoSQL
Data Modeling for NoSQLData Modeling for NoSQL
Data Modeling for NoSQL
 
5 Data Modeling for NoSQL 1/2
5 Data Modeling for NoSQL 1/25 Data Modeling for NoSQL 1/2
5 Data Modeling for NoSQL 1/2
 
Television Cameras puzzle
Television Cameras puzzleTelevision Cameras puzzle
Television Cameras puzzle
 
02 kab final report in indonesia 2007
02 kab final report in indonesia 200702 kab final report in indonesia 2007
02 kab final report in indonesia 2007
 
kansen en knelpunten boven 't Y winkelcentrum Amsterdam-Noord
kansen en knelpunten boven 't Y winkelcentrum Amsterdam-Noord kansen en knelpunten boven 't Y winkelcentrum Amsterdam-Noord
kansen en knelpunten boven 't Y winkelcentrum Amsterdam-Noord
 
100 examples
100 examples100 examples
100 examples
 
Mini market bab i
Mini market   bab iMini market   bab i
Mini market bab i
 
Ei inicio de la vida
Ei inicio de la vidaEi inicio de la vida
Ei inicio de la vida
 
Mini market bab iii
Mini market   bab iiiMini market   bab iii
Mini market bab iii
 
Exp imp-rks
Exp imp-rksExp imp-rks
Exp imp-rks
 
St. Johnland University, Kings Park NY
St. Johnland University, Kings Park NYSt. Johnland University, Kings Park NY
St. Johnland University, Kings Park NY
 
Exp imp-bab-02
Exp imp-bab-02Exp imp-bab-02
Exp imp-bab-02
 

Ähnlich wie Microsoft Azure DocumentDB - Global Azure Bootcamp 2016

Service-Oriented Design and Implement with Rails3
Service-Oriented Design and Implement with Rails3Service-Oriented Design and Implement with Rails3
Service-Oriented Design and Implement with Rails3
Wen-Tien Chang
 

Ähnlich wie Microsoft Azure DocumentDB - Global Azure Bootcamp 2016 (20)

Cool NoSQL on Azure with DocumentDB
Cool NoSQL on Azure with DocumentDBCool NoSQL on Azure with DocumentDB
Cool NoSQL on Azure with DocumentDB
 
Got documents?
Got documents?Got documents?
Got documents?
 
Got documents Code Mash Revision
Got documents Code Mash RevisionGot documents Code Mash Revision
Got documents Code Mash Revision
 
Azure DocumentDB
Azure DocumentDBAzure DocumentDB
Azure DocumentDB
 
Comparative study of modern databases
Comparative study of modern databasesComparative study of modern databases
Comparative study of modern databases
 
Test driving Azure Search and DocumentDB
Test driving Azure Search and DocumentDBTest driving Azure Search and DocumentDB
Test driving Azure Search and DocumentDB
 
Got documents - The Raven Bouns Edition
Got documents - The Raven Bouns EditionGot documents - The Raven Bouns Edition
Got documents - The Raven Bouns Edition
 
Service-Oriented Design and Implement with Rails3
Service-Oriented Design and Implement with Rails3Service-Oriented Design and Implement with Rails3
Service-Oriented Design and Implement with Rails3
 
SQL, NoSQL, Distributed SQL: Choose your DataStore carefully
SQL, NoSQL, Distributed SQL: Choose your DataStore carefullySQL, NoSQL, Distributed SQL: Choose your DataStore carefully
SQL, NoSQL, Distributed SQL: Choose your DataStore carefully
 
Scaling the Web: Databases & NoSQL
Scaling the Web: Databases & NoSQLScaling the Web: Databases & NoSQL
Scaling the Web: Databases & NoSQL
 
Boost the Performance of SharePoint Today!
Boost the Performance of SharePoint Today!Boost the Performance of SharePoint Today!
Boost the Performance of SharePoint Today!
 
CosmosDB for DBAs & Developers
CosmosDB for DBAs & DevelopersCosmosDB for DBAs & Developers
CosmosDB for DBAs & Developers
 
Azure document db/Cosmos DB
Azure document db/Cosmos DBAzure document db/Cosmos DB
Azure document db/Cosmos DB
 
Document db
Document dbDocument db
Document db
 
8. Software Development Security
8. Software Development Security8. Software Development Security
8. Software Development Security
 
Untangling - fall2017 - week 8
Untangling - fall2017 - week 8Untangling - fall2017 - week 8
Untangling - fall2017 - week 8
 
Introduction to CQRS - command and query responsibility segregation
Introduction to CQRS - command and query responsibility segregationIntroduction to CQRS - command and query responsibility segregation
Introduction to CQRS - command and query responsibility segregation
 
CosmosDB.pptx
CosmosDB.pptxCosmosDB.pptx
CosmosDB.pptx
 
Non-Relational Databases at ACCU2011
Non-Relational Databases at ACCU2011Non-Relational Databases at ACCU2011
Non-Relational Databases at ACCU2011
 
MongoDB.local Austin 2018: Solving Your Backup Needs Using MongoDB Ops Manage...
MongoDB.local Austin 2018: Solving Your Backup Needs Using MongoDB Ops Manage...MongoDB.local Austin 2018: Solving Your Backup Needs Using MongoDB Ops Manage...
MongoDB.local Austin 2018: Solving Your Backup Needs Using MongoDB Ops Manage...
 

Mehr von Sunny Sharma

Mehr von Sunny Sharma (13)

Cognitive Services by Abhimanyu Kumar Vatsa
Cognitive Services by Abhimanyu Kumar VatsaCognitive Services by Abhimanyu Kumar Vatsa
Cognitive Services by Abhimanyu Kumar Vatsa
 
Inversion of Control in MVC
Inversion of Control in MVCInversion of Control in MVC
Inversion of Control in MVC
 
JavaScript Debugging Tips & Tricks
JavaScript Debugging Tips & TricksJavaScript Debugging Tips & Tricks
JavaScript Debugging Tips & Tricks
 
Typescript Fundamentals
Typescript FundamentalsTypescript Fundamentals
Typescript Fundamentals
 
Node.js and express
Node.js and expressNode.js and express
Node.js and express
 
AngularJS Forms Validation
AngularJS Forms ValidationAngularJS Forms Validation
AngularJS Forms Validation
 
JavaScript Debugging Tips and Tricks
JavaScript Debugging Tips and TricksJavaScript Debugging Tips and Tricks
JavaScript Debugging Tips and Tricks
 
Real Time Data Visualization using asp.net / SignalR + D3.js
Real Time Data Visualization using asp.net / SignalR + D3.jsReal Time Data Visualization using asp.net / SignalR + D3.js
Real Time Data Visualization using asp.net / SignalR + D3.js
 
Exploring Git in Visual Studio 2013
Exploring Git in Visual Studio 2013Exploring Git in Visual Studio 2013
Exploring Git in Visual Studio 2013
 
Html5 Offline Applications
Html5 Offline Applications Html5 Offline Applications
Html5 Offline Applications
 
Self Hosting
Self HostingSelf Hosting
Self Hosting
 
Prototype & Inheritance in JavaScript
Prototype & Inheritance in JavaScriptPrototype & Inheritance in JavaScript
Prototype & Inheritance in JavaScript
 
Evolution of wcf
Evolution of wcfEvolution of wcf
Evolution of wcf
 

Kürzlich hochgeladen

+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 

Kürzlich hochgeladen (20)

ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
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
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
[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
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
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...
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
 
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
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
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
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
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
 

Microsoft Azure DocumentDB - Global Azure Bootcamp 2016

  • 1. Microsoft Azure DocumentDB Microsoft’s NoSQL Database as a Service Global Azure Bootcamp 2016 Sunny SharmaC# Corner – Delhi Chapter
  • 2. < Who am I /> • Sunny Sharma • Lead Developer @ C# Corner • C# Corner MVP • Author / Trainer / Speaker • t: @sunny_delhi • http://codeflair.net
  • 3. DocumentDB – Core Features • Schema-less, NoSQL Document database • JSON documents • Transactional support with ACID semantics • Tunable Consistency • Excellent Search Speed without SQL • Restful API • Async Support • Fully Managed
  • 4. Tunable Consistency Levels • Strong • Session • Bounded Staleness • Eventual
  • 5. Consistency Levels • Client always see completely consistent data • Slowest read/write • Applicable to areas: Airline / Banking / Stock Market Strong
  • 6. Consistency Levels • Client reads its own writes, while other clients reading this same date might see older values. Session (default option)
  • 7. Consistency Levels • Client might see old data, but it can specify how old that data can be, let’s say 3 seconds! • Updates happen in order received • Similar to Session consistency, but speeds up the reads while still preserving the order of updates. Bounded Staleness
  • 8. Consistency Levels • Client might see old data for as long as it takes a write to propagate to all replicas • High performance & availability • Client might see updates out of order Eventual
  • 10. Sample JSON document { "Event": "Global Azure Bootcamp", "Year":"2016", "Session": "Learn DocumentDB - Microsoft's NoSQL database", "Speaker": "Sunny Sharma", "Hours":"02:30 PM-03:30 PM", "Other Sessions":[ { "Name": "IoT With Azure", "Speaker":"Prabhjot Singh", "Hours":"01:30 PM-02:30 PM" }, { "Name": "Introduction to Azure Application Insights", "Speaker": "Mohit Chhabra", "Hours":"03:30 PM-04:30 PM" } ], "Venue": "C# Corner - Delhi Chapter“, “id”:”20160416” }
  • 11. Resource Addressing • Native REST Interface • Each resource has a permanent unique ID • API URL: • https://{database account}.documents.azure.com • Document Path: • /dbs/{database id}/colls/{collection id}/docs/{document id}
  • 12. Operations For each Resource: • Create / Replace / Delete / Read / Query • Read is a GET operation on a specific resource ID, returning a single resource. • Query is a POST operation on a collection with a request body containing DocumentDB SQL text, returning a possible empty collection of resources. • Query can filter on indexed properties.
  • 13. Stored Procedures, Triggers and UDFs • DocumentDB supports server-side JavaScript • Stored Procedures: • Registered at collection level • Operate on any document in the collection • Invoked inside transaction context on primary replica • Triggers: • Pre- or Post: create, replace or delete operations • Invoked inside transaction context on primary replica • User-Defined Functions: • Scalar functions invoked only inside queries
  • 14. Support • .NET (LINQ to SQL is supported) • Node.js • JavaScript • Python • Java • Hadoop
  • 15. When should you use? In General • You don’t want to do replication and scale-out by yourself • You want to have tunable consistency • You want to do rapid development Compared to relational databases • You don’t want predefined columns Compared to other document stores Compared to other document stores • You want to use a SQL-like grammar
  • 16. Pricing • http://bit.do/documentdb-pricing • Capacity Units (CU) • Capacity • Throughput (in terms of rate of transactions / second) • Request Units (RU) = 2000 request per second • “Request” depends on the size of the document ex. Uploading 1000 large JSON documents might count as more than one request
  • 17. Limitations & Quota Entity Quota (Standard Offer) Database Accounts* 50 Maximum document storage per database account* 1 TB (or higher by request) Provisioned document storage* / collection 250 GB (or higher by request) Maximum Request Units / second per collection 250,000 RU/s(or higher by request) Maximum request size of document 512KB Maximum execution time for stored procedure and trigger 5 seconds
  • 18. References • DocumentDb CheatSheet • http://bit.ly/documentdb-cheatsheet • DocumentDB Query Playground • http://bit.ly/documentdb-playground • Visual Studio Dev Essentials • http://bit.ly/vsdev-essentials

Hinweis der Redaktion

  1. Fully Managed: Scaled over azure, not to think about VM manipulation.
  2. Azure SQL bills by DTU (Data Through-put Unit)
  3. Azure SQL bills by DTU (Data Through-put Unit)