SlideShare a Scribd company logo
1 of 36
« »
Azure DocumentDb Training – Resource Model
How do we model Data
inside DocumentDb?
Azure DocumentDb Training – Resource Model
Recap: Why DocumentDb
Resource Model
Document and Resource Units
Database Account, Accessibility and Consistency
Database and Namespace
Containers and Partitioning
Conclusions
Azure DocumentDb Training – Resource Model
Recap: why DocumentDb
Azure DocumentDb Training – Resource Model
Set of principles that can be satisfied by a Distributed System
Consistency:
All nodes should see the same data at the same time
"Result is always up to date" (no out-of-date data / stale data)
Availability:
Every request receives a response about whether it succeeded or failed
"There is always a result" (accepting out-of-date data / stale data)
Partition-tolerance:
The system continues to operate despite arbitrary partitioning due to network failures
"Data can be given one of multiple nodes" (some nodes can be out-of-date/ stale)
A distributed system can satisfy any two of these principles at the same time, but not all three
Azure DocumentDb Training – Resource Model
A DBMS is a Distributed System
It lives under CAP Theorem
A DBMS needs to choose loosing one of the three principles:
A Relational DBMS chooses loosing partitioning to guarantee strict consistency and
availability
A No-Sql DBMS typically chooses moving to eventual consistency (relaxing, not
loosing) to guarantee partitioning and availability (it complains Stale Data)
Azure DocumentDb Training – Resource Model
With Eventual Consistency, a DBMS cannot run some typical
relational features
referential integrity
check constraints
schema
Azure DocumentDb Training – Resource Model
DocumentDb is a schemaless Db
DocumentDb is a Document-Oriented Db
Document is JSON Document
Promote code first development (mapping objects to json)
Resilient to iterative schema changes
No ORM required
It’s great for Catalog Data, Preference and State, Event Store,
User Generated Content, Data Exchange
Azure DocumentDb Training – Resource Model
Resource Model
Azure DocumentDb Training – Resource Model
DocumentDb is Platform as a Service
No OnPremise
RESTful API
All DocDb elements public and accessible as Resource Uri
Resource
Json Resources
Azure DocumentDb Training – Resource Model
Azure DocumentDb Training – Resource Model
Documents
Azure DocumentDb Training – Resource Model
JS
JS
JS
101
010
{
"id" : "123"
"name" : "joe"
"age" : 30
"address" : {
"street" : "some st"
}
}
Azure DocumentDb Training – Resource Model
Come as you are
Data normalization
Azure DocumentDb Training – Resource Model
embed reference
Azure DocumentDb Training – Resource Model
Representing one-to-many relationships.
Representing many-to-many relationships.
Related data changes frequently.
Referenced data could be unbounded
Provides more flexibility than embedding
More round trips to read data
Normalizing typically provides better write performance
Azure DocumentDb Training – Resource Model
There are contains relationships between entities.
There are one-to-few relationships between entities.
There is embedded data that changes infrequently.
There is embedded data won't grow without bound.
There is embedded data that is integral to data in a document.
Azure DocumentDb Training – Resource Model
Resource Unit
DocumentDb is Platform as a Service: no perception of physical resource allocation
A throughput currency
1RU: ability of reading a 1Kb Json document
Many factors impacting RU usage: Document size. Document property count. Data
consistency. Indexed properties. Document indexing. Query patterns. Script usage.
Reservation Model
You are billed for the amount of throughput reserved for the collection, regardless of how
much of that throughput is actively used.
There is a pricing calculator available to help calculating costs
https://www.documentdb.com/capacityplanner
Azure DocumentDb Training – Resource Model
demo
Estimating cost for a
docucument
Azure DocumentDb Training – Resource Model
Database Account
Azure DocumentDb Training – Resource Model
Unit of Autorization
Unit of Consistency
JS
JS
JS
101
010
Azure DocumentDb Training – Resource Model
Master keys
Upon creation of a DocumentDB account, two master keys (primary and secondary) are
created. These keys enable full administrative access to all resources within the
DocumentDB account.
Read-only keys
Upon creation of a DocumentDB account, two read-only keys (primary and secondary) are
created. These keys enable read-only access to all resources within the DocumentDB
account.
Resource tokens
A resource token is associated with a DocumentDB permission resource and captures the
relationship between the user of a database and the permission that user has for a
specific DocumentDB application resource (e.g. collection, document).
Azure DocumentDb Training – Resource Model
Query / transaction throughput (and reliability – i.e., hardware
failure) depend on replication!
All writes to the primary are replicated across two secondary replicas
All reads are distributed across three copies
“Scalability of throughput” – allowing different clients to read from different replicas
helps prevent bottlenecks
BUT replication takes time!
Potential scenario: some clients are reading while another is writing
Now, the data is stale (out-of-date), inconsistent!
Azure DocumentDb Training – Resource Model
Trade-off: speed (performance & availability) or consistency
(data correctness)?
“Does every read need the MOST current data?”
“Or do I need every request to be handled and handled quickly?”
4 options …
Strong, Session, Bounded Staleness, Eventual
Default consistency for the entire Db…
At collection basis in a future release
On query basis (optional parameter on CreateDocumentQuery method)
Azure DocumentDb Training – Resource Model
demo
Creating a DocumentDb
Database Account
Azure DocumentDb Training – Resource Model
Database
Azure DocumentDb Training – Resource Model
Unit of Namespace
JS
JS
JS
101
010
Azure DocumentDb Training – Resource Model
demo
Creating a DocumenDb
Database
Azure DocumentDb Training – Resource Model
Collections
Azure DocumentDb Training – Resource Model
A unit of scale for transaction
for stored procedures and triggers
A unit of query throughput
capacity units allocated uniformly across
all collections)
A unit of replication
A collection is replicated three times
A container of JSON
documents
JSON docs inside of a collection can
vary dramatically
JS
JS
JS
101
010
Azure DocumentDb Training – Resource Model
Collection-based RU Reservation
Capacity units allocated uniformly across all
collections)
Standard pricing tier with hourly
billing
$0.042/hour for mimimum 400RU/s
Performance levels can be
adjusted
Each collection = 10GB of SSD
Limit of 100 collections (1 TB)
Soft limit, can be lifted as needed per account
(with Support)
Azure DocumentDb Training – Resource Model
Partitioning
Data Size
A single collection (currently*) holds 10GB
Throughput
3 Performance tiers with a max of 2,500 RU/sec
Azure DocumentDb Training – Resource Model
demo
Creating a DocumenDb
Collection
Azure DocumentDb Training – Resource Model
Conclusions
Azure DocumentDb Training – Resource Model
DocumentDb is a Restful service
Documents defines Unit of Costs with Resource Units
Database Account defines Accessibility and Consistency
Database is a Namespace placeholder
Containers is the unit of Scale
Azure DocumentDb Training - Resource Model

More Related Content

What's hot

Digikrit Company Profile
Digikrit Company ProfileDigikrit Company Profile
Digikrit Company ProfileDigikrit
 
Introduction to Azure DocumentDB
Introduction to Azure DocumentDBIntroduction to Azure DocumentDB
Introduction to Azure DocumentDBDenny Lee
 
Azure DocumentDB for Healthcare Integration - Part 2
Azure DocumentDB for Healthcare Integration - Part 2Azure DocumentDB for Healthcare Integration - Part 2
Azure DocumentDB for Healthcare Integration - Part 2BizTalk360
 
MongoDB .local Paris 2020: Devenez explorateur de données avec MongoDB Charts
MongoDB .local Paris 2020: Devenez explorateur de données avec MongoDB ChartsMongoDB .local Paris 2020: Devenez explorateur de données avec MongoDB Charts
MongoDB .local Paris 2020: Devenez explorateur de données avec MongoDB ChartsMongoDB
 
Big Data Analytics from Azure Cloud to Power BI Mobile
Big Data Analytics from Azure Cloud to Power BI MobileBig Data Analytics from Azure Cloud to Power BI Mobile
Big Data Analytics from Azure Cloud to Power BI MobileRoy Kim
 
MongoDB .local Paris 2020: Les bonnes pratiques pour travailler avec les donn...
MongoDB .local Paris 2020: Les bonnes pratiques pour travailler avec les donn...MongoDB .local Paris 2020: Les bonnes pratiques pour travailler avec les donn...
MongoDB .local Paris 2020: Les bonnes pratiques pour travailler avec les donn...MongoDB
 
Azure Data Factory Data Flow Preview December 2019
Azure Data Factory Data Flow Preview December 2019Azure Data Factory Data Flow Preview December 2019
Azure Data Factory Data Flow Preview December 2019Mark Kromer
 
Scaling to Infinity - Open Source meets Big Data
Scaling to Infinity - Open Source meets Big DataScaling to Infinity - Open Source meets Big Data
Scaling to Infinity - Open Source meets Big DataTreasure Data, Inc.
 
Microsoft Data Access Technologies
Microsoft Data Access TechnologiesMicrosoft Data Access Technologies
Microsoft Data Access TechnologiesDavid Chou
 
Architecting Solutions Leveraging The Cloud
Architecting Solutions Leveraging The CloudArchitecting Solutions Leveraging The Cloud
Architecting Solutions Leveraging The CloudDavid Chou
 
Azure data factory
Azure data factoryAzure data factory
Azure data factoryDavid Giard
 
Exploring Puerto Rico Open Data with Power BI
Exploring Puerto Rico Open Data with Power BIExploring Puerto Rico Open Data with Power BI
Exploring Puerto Rico Open Data with Power BIGuillermo Caicedo
 
Globally Distributed Modern Apps using Azure Cosmos DB and Azure Functions
Globally Distributed Modern Apps using Azure Cosmos DB and Azure FunctionsGlobally Distributed Modern Apps using Azure Cosmos DB and Azure Functions
Globally Distributed Modern Apps using Azure Cosmos DB and Azure FunctionsMohammad Asif
 
Big Data Storage Challenges and Solutions
Big Data Storage Challenges and SolutionsBig Data Storage Challenges and Solutions
Big Data Storage Challenges and SolutionsWSO2
 
Deep Dive Data Management Gateway - SQLSaturday Edinburgh
Deep Dive Data Management Gateway - SQLSaturday EdinburghDeep Dive Data Management Gateway - SQLSaturday Edinburgh
Deep Dive Data Management Gateway - SQLSaturday EdinburghJean-Pierre Riehl
 
Data Platform Overview
Data Platform OverviewData Platform Overview
Data Platform OverviewHamid J. Fard
 

What's hot (20)

Digikrit Company Profile
Digikrit Company ProfileDigikrit Company Profile
Digikrit Company Profile
 
Introduction to Azure DocumentDB
Introduction to Azure DocumentDBIntroduction to Azure DocumentDB
Introduction to Azure DocumentDB
 
Azure datafactory
Azure datafactoryAzure datafactory
Azure datafactory
 
Microsoft azure documentDB
Microsoft azure documentDBMicrosoft azure documentDB
Microsoft azure documentDB
 
Azure DocumentDB for Healthcare Integration - Part 2
Azure DocumentDB for Healthcare Integration - Part 2Azure DocumentDB for Healthcare Integration - Part 2
Azure DocumentDB for Healthcare Integration - Part 2
 
MongoDB .local Paris 2020: Devenez explorateur de données avec MongoDB Charts
MongoDB .local Paris 2020: Devenez explorateur de données avec MongoDB ChartsMongoDB .local Paris 2020: Devenez explorateur de données avec MongoDB Charts
MongoDB .local Paris 2020: Devenez explorateur de données avec MongoDB Charts
 
Big Data Analytics from Azure Cloud to Power BI Mobile
Big Data Analytics from Azure Cloud to Power BI MobileBig Data Analytics from Azure Cloud to Power BI Mobile
Big Data Analytics from Azure Cloud to Power BI Mobile
 
MongoDB .local Paris 2020: Les bonnes pratiques pour travailler avec les donn...
MongoDB .local Paris 2020: Les bonnes pratiques pour travailler avec les donn...MongoDB .local Paris 2020: Les bonnes pratiques pour travailler avec les donn...
MongoDB .local Paris 2020: Les bonnes pratiques pour travailler avec les donn...
 
Azure Data Factory Data Flow Preview December 2019
Azure Data Factory Data Flow Preview December 2019Azure Data Factory Data Flow Preview December 2019
Azure Data Factory Data Flow Preview December 2019
 
Scaling to Infinity - Open Source meets Big Data
Scaling to Infinity - Open Source meets Big DataScaling to Infinity - Open Source meets Big Data
Scaling to Infinity - Open Source meets Big Data
 
Microsoft Data Access Technologies
Microsoft Data Access TechnologiesMicrosoft Data Access Technologies
Microsoft Data Access Technologies
 
Big data in Azure
Big data in AzureBig data in Azure
Big data in Azure
 
Architecting Solutions Leveraging The Cloud
Architecting Solutions Leveraging The CloudArchitecting Solutions Leveraging The Cloud
Architecting Solutions Leveraging The Cloud
 
Azure data factory
Azure data factoryAzure data factory
Azure data factory
 
Exploring Puerto Rico Open Data with Power BI
Exploring Puerto Rico Open Data with Power BIExploring Puerto Rico Open Data with Power BI
Exploring Puerto Rico Open Data with Power BI
 
Hibernate training-topics
Hibernate training-topicsHibernate training-topics
Hibernate training-topics
 
Globally Distributed Modern Apps using Azure Cosmos DB and Azure Functions
Globally Distributed Modern Apps using Azure Cosmos DB and Azure FunctionsGlobally Distributed Modern Apps using Azure Cosmos DB and Azure Functions
Globally Distributed Modern Apps using Azure Cosmos DB and Azure Functions
 
Big Data Storage Challenges and Solutions
Big Data Storage Challenges and SolutionsBig Data Storage Challenges and Solutions
Big Data Storage Challenges and Solutions
 
Deep Dive Data Management Gateway - SQLSaturday Edinburgh
Deep Dive Data Management Gateway - SQLSaturday EdinburghDeep Dive Data Management Gateway - SQLSaturday Edinburgh
Deep Dive Data Management Gateway - SQLSaturday Edinburgh
 
Data Platform Overview
Data Platform OverviewData Platform Overview
Data Platform Overview
 

Viewers also liked

From building an Arcade Bartop to fun with games in Windows 10
From building an Arcade Bartop to fun with games in Windows 10From building an Arcade Bartop to fun with games in Windows 10
From building an Arcade Bartop to fun with games in Windows 10Marco Parenzan
 
Azure for Game Developers
Azure for Game DevelopersAzure for Game Developers
Azure for Game DevelopersMarco Parenzan
 
Windows 10 for fun - Building an Arcade BarTop
Windows 10 for fun - Building an Arcade BarTopWindows 10 for fun - Building an Arcade BarTop
Windows 10 for fun - Building an Arcade BarTopMarco Parenzan
 
Polyglot Persistence in Azure
Polyglot Persistence in AzurePolyglot Persistence in Azure
Polyglot Persistence in AzureMarco Parenzan
 
State of Azure Sql Database
State of Azure Sql DatabaseState of Azure Sql Database
State of Azure Sql DatabaseMarco Parenzan
 
Introduction to .NET Core
Introduction to .NET CoreIntroduction to .NET Core
Introduction to .NET CoreMarco Parenzan
 
Predictive Maintenance per le aziende del nord-est con Azure e IoT
Predictive Maintenance per le aziende del nord-est con Azure e IoTPredictive Maintenance per le aziende del nord-est con Azure e IoT
Predictive Maintenance per le aziende del nord-est con Azure e IoTMarco Parenzan
 

Viewers also liked (7)

From building an Arcade Bartop to fun with games in Windows 10
From building an Arcade Bartop to fun with games in Windows 10From building an Arcade Bartop to fun with games in Windows 10
From building an Arcade Bartop to fun with games in Windows 10
 
Azure for Game Developers
Azure for Game DevelopersAzure for Game Developers
Azure for Game Developers
 
Windows 10 for fun - Building an Arcade BarTop
Windows 10 for fun - Building an Arcade BarTopWindows 10 for fun - Building an Arcade BarTop
Windows 10 for fun - Building an Arcade BarTop
 
Polyglot Persistence in Azure
Polyglot Persistence in AzurePolyglot Persistence in Azure
Polyglot Persistence in Azure
 
State of Azure Sql Database
State of Azure Sql DatabaseState of Azure Sql Database
State of Azure Sql Database
 
Introduction to .NET Core
Introduction to .NET CoreIntroduction to .NET Core
Introduction to .NET Core
 
Predictive Maintenance per le aziende del nord-est con Azure e IoT
Predictive Maintenance per le aziende del nord-est con Azure e IoTPredictive Maintenance per le aziende del nord-est con Azure e IoT
Predictive Maintenance per le aziende del nord-est con Azure e IoT
 

Similar to Azure DocumentDb Training - Resource Model

Tech-Spark: Exploring the Cosmos DB
Tech-Spark: Exploring the Cosmos DBTech-Spark: Exploring the Cosmos DB
Tech-Spark: Exploring the Cosmos DBRalph Attard
 
Samedi SQL Québec - La plateforme data de Azure
Samedi SQL Québec - La plateforme data de AzureSamedi SQL Québec - La plateforme data de Azure
Samedi SQL Québec - La plateforme data de AzureMSDEVMTL
 
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 AzureMarco Parenzan
 
Introduction à DocumentDB
Introduction à DocumentDBIntroduction à DocumentDB
Introduction à DocumentDBMSDEVMTL
 
Azure DocumentDB for Healthcare Integration
Azure DocumentDB for Healthcare IntegrationAzure DocumentDB for Healthcare Integration
Azure DocumentDB for Healthcare IntegrationBizTalk360
 
Introducing Azure SQL Data Warehouse
Introducing Azure SQL Data WarehouseIntroducing Azure SQL Data Warehouse
Introducing Azure SQL Data WarehouseJames Serra
 
Afternoons with Azure - Azure Data Services
Afternoons with Azure - Azure Data ServicesAfternoons with Azure - Azure Data Services
Afternoons with Azure - Azure Data ServicesCCG
 
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)Trivadis
 
Azure cosmos db, Azure no-SQL database,
Azure cosmos db, Azure no-SQL database, Azure cosmos db, Azure no-SQL database,
Azure cosmos db, Azure no-SQL database, BRIJESH KUMAR
 
3.Implementation with NOSQL databases Document Databases (Mongodb).pptx
3.Implementation with NOSQL databases Document Databases (Mongodb).pptx3.Implementation with NOSQL databases Document Databases (Mongodb).pptx
3.Implementation with NOSQL databases Document Databases (Mongodb).pptxRushikeshChikane2
 
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 CCG
 
PASS_Summit_2019_Azure_Storage_Options_for_Analytics
PASS_Summit_2019_Azure_Storage_Options_for_AnalyticsPASS_Summit_2019_Azure_Storage_Options_for_Analytics
PASS_Summit_2019_Azure_Storage_Options_for_AnalyticsDustin Vannoy
 

Similar to Azure DocumentDb Training - Resource Model (20)

Azure Data Storage
Azure Data StorageAzure Data Storage
Azure Data Storage
 
Tech-Spark: Exploring the Cosmos DB
Tech-Spark: Exploring the Cosmos DBTech-Spark: Exploring the Cosmos DB
Tech-Spark: Exploring the Cosmos DB
 
Samedi SQL Québec - La plateforme data de Azure
Samedi SQL Québec - La plateforme data de AzureSamedi SQL Québec - La plateforme data de Azure
Samedi SQL Québec - La plateforme data de Azure
 
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
 
AzureDocumentDB
AzureDocumentDBAzureDocumentDB
AzureDocumentDB
 
Introduction à DocumentDB
Introduction à DocumentDBIntroduction à DocumentDB
Introduction à DocumentDB
 
Azure DocumentDB for Healthcare Integration
Azure DocumentDB for Healthcare IntegrationAzure DocumentDB for Healthcare Integration
Azure DocumentDB for Healthcare Integration
 
Azure CosmosDb
Azure CosmosDbAzure CosmosDb
Azure CosmosDb
 
Introducing Azure SQL Data Warehouse
Introducing Azure SQL Data WarehouseIntroducing Azure SQL Data Warehouse
Introducing Azure SQL Data Warehouse
 
Azure data platform overview
Azure data platform overviewAzure data platform overview
Azure data platform overview
 
Afternoons with Azure - Azure Data Services
Afternoons with Azure - Azure Data ServicesAfternoons with Azure - Azure Data Services
Afternoons with Azure - Azure Data Services
 
No sq lv1_0
No sq lv1_0No sq lv1_0
No sq lv1_0
 
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)
 
Azure cosmos db, Azure no-SQL database,
Azure cosmos db, Azure no-SQL database, Azure cosmos db, Azure no-SQL database,
Azure cosmos db, Azure no-SQL database,
 
Azure CosmosDB
Azure CosmosDBAzure CosmosDB
Azure CosmosDB
 
3.Implementation with NOSQL databases Document Databases (Mongodb).pptx
3.Implementation with NOSQL databases Document Databases (Mongodb).pptx3.Implementation with NOSQL databases Document Databases (Mongodb).pptx
3.Implementation with NOSQL databases Document Databases (Mongodb).pptx
 
Azure cosmosdb
Azure cosmosdbAzure cosmosdb
Azure cosmosdb
 
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 SQL Database
Azure SQL DatabaseAzure SQL Database
Azure SQL Database
 
PASS_Summit_2019_Azure_Storage_Options_for_Analytics
PASS_Summit_2019_Azure_Storage_Options_for_AnalyticsPASS_Summit_2019_Azure_Storage_Options_for_Analytics
PASS_Summit_2019_Azure_Storage_Options_for_Analytics
 

More from Marco Parenzan

Azure IoT Central per lo SCADA engineer
Azure IoT Central per lo SCADA engineerAzure IoT Central per lo SCADA engineer
Azure IoT Central per lo SCADA engineerMarco Parenzan
 
Static abstract members nelle interfacce di C# 11 e dintorni di .NET 7.pptx
Static abstract members nelle interfacce di C# 11 e dintorni di .NET 7.pptxStatic abstract members nelle interfacce di C# 11 e dintorni di .NET 7.pptx
Static abstract members nelle interfacce di C# 11 e dintorni di .NET 7.pptxMarco Parenzan
 
Azure Synapse Analytics for your IoT Solutions
Azure Synapse Analytics for your IoT SolutionsAzure Synapse Analytics for your IoT Solutions
Azure Synapse Analytics for your IoT SolutionsMarco Parenzan
 
Power BI Streaming Data Flow e Azure IoT Central
Power BI Streaming Data Flow e Azure IoT Central Power BI Streaming Data Flow e Azure IoT Central
Power BI Streaming Data Flow e Azure IoT Central Marco Parenzan
 
Power BI Streaming Data Flow e Azure IoT Central
Power BI Streaming Data Flow e Azure IoT CentralPower BI Streaming Data Flow e Azure IoT Central
Power BI Streaming Data Flow e Azure IoT CentralMarco Parenzan
 
Power BI Streaming Data Flow e Azure IoT Central
Power BI Streaming Data Flow e Azure IoT CentralPower BI Streaming Data Flow e Azure IoT Central
Power BI Streaming Data Flow e Azure IoT CentralMarco Parenzan
 
Developing Actors in Azure with .net
Developing Actors in Azure with .netDeveloping Actors in Azure with .net
Developing Actors in Azure with .netMarco Parenzan
 
Math with .NET for you and Azure
Math with .NET for you and AzureMath with .NET for you and Azure
Math with .NET for you and AzureMarco Parenzan
 
Power BI data flow and Azure IoT Central
Power BI data flow and Azure IoT CentralPower BI data flow and Azure IoT Central
Power BI data flow and Azure IoT CentralMarco Parenzan
 
.net for fun: write a Christmas videogame
.net for fun: write a Christmas videogame.net for fun: write a Christmas videogame
.net for fun: write a Christmas videogameMarco Parenzan
 
Building IoT infrastructure on edge with .net, Raspberry PI and ESP32 to conn...
Building IoT infrastructure on edge with .net, Raspberry PI and ESP32 to conn...Building IoT infrastructure on edge with .net, Raspberry PI and ESP32 to conn...
Building IoT infrastructure on edge with .net, Raspberry PI and ESP32 to conn...Marco Parenzan
 
Anomaly Detection with Azure and .NET
Anomaly Detection with Azure and .NETAnomaly Detection with Azure and .NET
Anomaly Detection with Azure and .NETMarco Parenzan
 
Deploy Microsoft Azure Data Solutions
Deploy Microsoft Azure Data SolutionsDeploy Microsoft Azure Data Solutions
Deploy Microsoft Azure Data SolutionsMarco Parenzan
 
Deep Dive Time Series Anomaly Detection in Azure with dotnet
Deep Dive Time Series Anomaly Detection in Azure with dotnetDeep Dive Time Series Anomaly Detection in Azure with dotnet
Deep Dive Time Series Anomaly Detection in Azure with dotnetMarco Parenzan
 
Anomaly Detection with Azure and .net
Anomaly Detection with Azure and .netAnomaly Detection with Azure and .net
Anomaly Detection with Azure and .netMarco Parenzan
 
Code Generation for Azure with .net
Code Generation for Azure with .netCode Generation for Azure with .net
Code Generation for Azure with .netMarco Parenzan
 
Running Kafka and Spark on Raspberry PI with Azure and some .net magic
Running Kafka and Spark on Raspberry PI with Azure and some .net magicRunning Kafka and Spark on Raspberry PI with Azure and some .net magic
Running Kafka and Spark on Raspberry PI with Azure and some .net magicMarco Parenzan
 
Time Series Anomaly Detection with Azure and .NETT
Time Series Anomaly Detection with Azure and .NETTTime Series Anomaly Detection with Azure and .NETT
Time Series Anomaly Detection with Azure and .NETTMarco Parenzan
 

More from Marco Parenzan (20)

Azure IoT Central per lo SCADA engineer
Azure IoT Central per lo SCADA engineerAzure IoT Central per lo SCADA engineer
Azure IoT Central per lo SCADA engineer
 
Azure Hybrid @ Home
Azure Hybrid @ HomeAzure Hybrid @ Home
Azure Hybrid @ Home
 
Static abstract members nelle interfacce di C# 11 e dintorni di .NET 7.pptx
Static abstract members nelle interfacce di C# 11 e dintorni di .NET 7.pptxStatic abstract members nelle interfacce di C# 11 e dintorni di .NET 7.pptx
Static abstract members nelle interfacce di C# 11 e dintorni di .NET 7.pptx
 
Azure Synapse Analytics for your IoT Solutions
Azure Synapse Analytics for your IoT SolutionsAzure Synapse Analytics for your IoT Solutions
Azure Synapse Analytics for your IoT Solutions
 
Power BI Streaming Data Flow e Azure IoT Central
Power BI Streaming Data Flow e Azure IoT Central Power BI Streaming Data Flow e Azure IoT Central
Power BI Streaming Data Flow e Azure IoT Central
 
Power BI Streaming Data Flow e Azure IoT Central
Power BI Streaming Data Flow e Azure IoT CentralPower BI Streaming Data Flow e Azure IoT Central
Power BI Streaming Data Flow e Azure IoT Central
 
Power BI Streaming Data Flow e Azure IoT Central
Power BI Streaming Data Flow e Azure IoT CentralPower BI Streaming Data Flow e Azure IoT Central
Power BI Streaming Data Flow e Azure IoT Central
 
Developing Actors in Azure with .net
Developing Actors in Azure with .netDeveloping Actors in Azure with .net
Developing Actors in Azure with .net
 
Math with .NET for you and Azure
Math with .NET for you and AzureMath with .NET for you and Azure
Math with .NET for you and Azure
 
Power BI data flow and Azure IoT Central
Power BI data flow and Azure IoT CentralPower BI data flow and Azure IoT Central
Power BI data flow and Azure IoT Central
 
.net for fun: write a Christmas videogame
.net for fun: write a Christmas videogame.net for fun: write a Christmas videogame
.net for fun: write a Christmas videogame
 
Building IoT infrastructure on edge with .net, Raspberry PI and ESP32 to conn...
Building IoT infrastructure on edge with .net, Raspberry PI and ESP32 to conn...Building IoT infrastructure on edge with .net, Raspberry PI and ESP32 to conn...
Building IoT infrastructure on edge with .net, Raspberry PI and ESP32 to conn...
 
Anomaly Detection with Azure and .NET
Anomaly Detection with Azure and .NETAnomaly Detection with Azure and .NET
Anomaly Detection with Azure and .NET
 
Deploy Microsoft Azure Data Solutions
Deploy Microsoft Azure Data SolutionsDeploy Microsoft Azure Data Solutions
Deploy Microsoft Azure Data Solutions
 
Deep Dive Time Series Anomaly Detection in Azure with dotnet
Deep Dive Time Series Anomaly Detection in Azure with dotnetDeep Dive Time Series Anomaly Detection in Azure with dotnet
Deep Dive Time Series Anomaly Detection in Azure with dotnet
 
Azure IoT Central
Azure IoT CentralAzure IoT Central
Azure IoT Central
 
Anomaly Detection with Azure and .net
Anomaly Detection with Azure and .netAnomaly Detection with Azure and .net
Anomaly Detection with Azure and .net
 
Code Generation for Azure with .net
Code Generation for Azure with .netCode Generation for Azure with .net
Code Generation for Azure with .net
 
Running Kafka and Spark on Raspberry PI with Azure and some .net magic
Running Kafka and Spark on Raspberry PI with Azure and some .net magicRunning Kafka and Spark on Raspberry PI with Azure and some .net magic
Running Kafka and Spark on Raspberry PI with Azure and some .net magic
 
Time Series Anomaly Detection with Azure and .NETT
Time Series Anomaly Detection with Azure and .NETTTime Series Anomaly Detection with Azure and .NETT
Time Series Anomaly Detection with Azure and .NETT
 

Recently uploaded

Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)OPEN KNOWLEDGE GmbH
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software DevelopersVinodh Ram
 
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfThe Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfkalichargn70th171
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...OnePlan Solutions
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsAlberto González Trastoy
 
Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...aditisharan08
 
Asset Management Software - Infographic
Asset Management Software - InfographicAsset Management Software - Infographic
Asset Management Software - InfographicHr365.us smith
 
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataAdobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataBradBedford3
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Modelsaagamshah0812
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...harshavardhanraghave
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxbodapatigopi8531
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVshikhaohhpro
 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEOrtus Solutions, Corp
 
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio, Inc.
 
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...soniya singh
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...MyIntelliSource, Inc.
 
What is Binary Language? Computer Number Systems
What is Binary Language?  Computer Number SystemsWhat is Binary Language?  Computer Number Systems
What is Binary Language? Computer Number SystemsJheuzeDellosa
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantAxelRicardoTrocheRiq
 

Recently uploaded (20)

Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software Developers
 
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfThe Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
 
Exploring iOS App Development: Simplifying the Process
Exploring iOS App Development: Simplifying the ProcessExploring iOS App Development: Simplifying the Process
Exploring iOS App Development: Simplifying the Process
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
 
Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...
 
Asset Management Software - Infographic
Asset Management Software - InfographicAsset Management Software - Infographic
Asset Management Software - Infographic
 
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataAdobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptx
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
 
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
 
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
 
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
 
What is Binary Language? Computer Number Systems
What is Binary Language?  Computer Number SystemsWhat is Binary Language?  Computer Number Systems
What is Binary Language? Computer Number Systems
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service Consultant
 

Azure DocumentDb Training - Resource Model

  • 1.
  • 2. « » Azure DocumentDb Training – Resource Model How do we model Data inside DocumentDb?
  • 3. Azure DocumentDb Training – Resource Model Recap: Why DocumentDb Resource Model Document and Resource Units Database Account, Accessibility and Consistency Database and Namespace Containers and Partitioning Conclusions
  • 4. Azure DocumentDb Training – Resource Model Recap: why DocumentDb
  • 5. Azure DocumentDb Training – Resource Model Set of principles that can be satisfied by a Distributed System Consistency: All nodes should see the same data at the same time "Result is always up to date" (no out-of-date data / stale data) Availability: Every request receives a response about whether it succeeded or failed "There is always a result" (accepting out-of-date data / stale data) Partition-tolerance: The system continues to operate despite arbitrary partitioning due to network failures "Data can be given one of multiple nodes" (some nodes can be out-of-date/ stale) A distributed system can satisfy any two of these principles at the same time, but not all three
  • 6. Azure DocumentDb Training – Resource Model A DBMS is a Distributed System It lives under CAP Theorem A DBMS needs to choose loosing one of the three principles: A Relational DBMS chooses loosing partitioning to guarantee strict consistency and availability A No-Sql DBMS typically chooses moving to eventual consistency (relaxing, not loosing) to guarantee partitioning and availability (it complains Stale Data)
  • 7. Azure DocumentDb Training – Resource Model With Eventual Consistency, a DBMS cannot run some typical relational features referential integrity check constraints schema
  • 8. Azure DocumentDb Training – Resource Model DocumentDb is a schemaless Db DocumentDb is a Document-Oriented Db Document is JSON Document Promote code first development (mapping objects to json) Resilient to iterative schema changes No ORM required It’s great for Catalog Data, Preference and State, Event Store, User Generated Content, Data Exchange
  • 9. Azure DocumentDb Training – Resource Model Resource Model
  • 10. Azure DocumentDb Training – Resource Model DocumentDb is Platform as a Service No OnPremise RESTful API All DocDb elements public and accessible as Resource Uri Resource Json Resources
  • 11. Azure DocumentDb Training – Resource Model
  • 12. Azure DocumentDb Training – Resource Model Documents
  • 13. Azure DocumentDb Training – Resource Model JS JS JS 101 010 { "id" : "123" "name" : "joe" "age" : 30 "address" : { "street" : "some st" } }
  • 14. Azure DocumentDb Training – Resource Model Come as you are Data normalization
  • 15. Azure DocumentDb Training – Resource Model embed reference
  • 16. Azure DocumentDb Training – Resource Model Representing one-to-many relationships. Representing many-to-many relationships. Related data changes frequently. Referenced data could be unbounded Provides more flexibility than embedding More round trips to read data Normalizing typically provides better write performance
  • 17. Azure DocumentDb Training – Resource Model There are contains relationships between entities. There are one-to-few relationships between entities. There is embedded data that changes infrequently. There is embedded data won't grow without bound. There is embedded data that is integral to data in a document.
  • 18. Azure DocumentDb Training – Resource Model Resource Unit DocumentDb is Platform as a Service: no perception of physical resource allocation A throughput currency 1RU: ability of reading a 1Kb Json document Many factors impacting RU usage: Document size. Document property count. Data consistency. Indexed properties. Document indexing. Query patterns. Script usage. Reservation Model You are billed for the amount of throughput reserved for the collection, regardless of how much of that throughput is actively used. There is a pricing calculator available to help calculating costs https://www.documentdb.com/capacityplanner
  • 19. Azure DocumentDb Training – Resource Model demo Estimating cost for a docucument
  • 20. Azure DocumentDb Training – Resource Model Database Account
  • 21. Azure DocumentDb Training – Resource Model Unit of Autorization Unit of Consistency JS JS JS 101 010
  • 22. Azure DocumentDb Training – Resource Model Master keys Upon creation of a DocumentDB account, two master keys (primary and secondary) are created. These keys enable full administrative access to all resources within the DocumentDB account. Read-only keys Upon creation of a DocumentDB account, two read-only keys (primary and secondary) are created. These keys enable read-only access to all resources within the DocumentDB account. Resource tokens A resource token is associated with a DocumentDB permission resource and captures the relationship between the user of a database and the permission that user has for a specific DocumentDB application resource (e.g. collection, document).
  • 23. Azure DocumentDb Training – Resource Model Query / transaction throughput (and reliability – i.e., hardware failure) depend on replication! All writes to the primary are replicated across two secondary replicas All reads are distributed across three copies “Scalability of throughput” – allowing different clients to read from different replicas helps prevent bottlenecks BUT replication takes time! Potential scenario: some clients are reading while another is writing Now, the data is stale (out-of-date), inconsistent!
  • 24. Azure DocumentDb Training – Resource Model Trade-off: speed (performance & availability) or consistency (data correctness)? “Does every read need the MOST current data?” “Or do I need every request to be handled and handled quickly?” 4 options … Strong, Session, Bounded Staleness, Eventual Default consistency for the entire Db… At collection basis in a future release On query basis (optional parameter on CreateDocumentQuery method)
  • 25. Azure DocumentDb Training – Resource Model demo Creating a DocumentDb Database Account
  • 26. Azure DocumentDb Training – Resource Model Database
  • 27. Azure DocumentDb Training – Resource Model Unit of Namespace JS JS JS 101 010
  • 28. Azure DocumentDb Training – Resource Model demo Creating a DocumenDb Database
  • 29. Azure DocumentDb Training – Resource Model Collections
  • 30. Azure DocumentDb Training – Resource Model A unit of scale for transaction for stored procedures and triggers A unit of query throughput capacity units allocated uniformly across all collections) A unit of replication A collection is replicated three times A container of JSON documents JSON docs inside of a collection can vary dramatically JS JS JS 101 010
  • 31. Azure DocumentDb Training – Resource Model Collection-based RU Reservation Capacity units allocated uniformly across all collections) Standard pricing tier with hourly billing $0.042/hour for mimimum 400RU/s Performance levels can be adjusted Each collection = 10GB of SSD Limit of 100 collections (1 TB) Soft limit, can be lifted as needed per account (with Support)
  • 32. Azure DocumentDb Training – Resource Model Partitioning Data Size A single collection (currently*) holds 10GB Throughput 3 Performance tiers with a max of 2,500 RU/sec
  • 33. Azure DocumentDb Training – Resource Model demo Creating a DocumenDb Collection
  • 34. Azure DocumentDb Training – Resource Model Conclusions
  • 35. Azure DocumentDb Training – Resource Model DocumentDb is a Restful service Documents defines Unit of Costs with Resource Units Database Account defines Accessibility and Consistency Database is a Namespace placeholder Containers is the unit of Scale

Editor's Notes

  1. instead of taking the business subject / domain entity and breaking it up into multiple relational structures store the business subject in the minimal number of documents.
  2. Add diagram showing the differences