Download presentation
Presentation is loading. Please wait.
Published byJacob Cunningham Modified over 9 years ago
1
2015 International TechNet Wiki Summit 2015 Creating and Querying Microsoft Azure DocumentDB Chervine Bhiwoo
2
Meet Chervine | @chervinebhiwoo 2 Software Developer From Mauritius – Indian Ocean - Africa Works mainly on Microsoft Technologies such as C# and ASP.NET. Also has a good knowledge on BI, Data- warehousing, MS Azure and Windows Phone http://chervinebhiwoo.blogspot.com /
3
In this session TechNet Wiki Why DocumentDB..? Introduction to Azure DocumentDB Creating a DocumentDB Account Storing & Querying Data Using Azure DocumentDB in as ASP.NET MVC Application Code Samples on Gallery 3
4
TechNet Wiki 4 1.Articles about Microsoft Azure 1.http://social.technet.microsoft.com/wiki/contents/articles/tags/Microsoft+Azure/ default.aspxhttp://social.technet.microsoft.com/wiki/contents/articles/tags/Microsoft+Azure/ default.aspx 2.Creating and Querying Microsoft Azure DocumentDB 1.http://social.technet.microsoft.com/wiki/contents/articles/29717.using-microsoft- azure-documentdb-in-an-asp-net-mvc-application.aspxhttp://social.technet.microsoft.com/wiki/contents/articles/29717.using-microsoft- azure-documentdb-in-an-asp-net-mvc-application.aspx 3.Using Microsoft Azure DocumentDB in an ASP.NET MVC Application 1.http://social.technet.microsoft.com/wiki/contents/articles/29717.using-microsoft- azure-documentdb-in-an-asp-net-mvc-application.aspxhttp://social.technet.microsoft.com/wiki/contents/articles/29717.using-microsoft- azure-documentdb-in-an-asp-net-mvc-application.aspx 4.Other articles by Chervine 1.http://social.technet.microsoft.com/wiki/contents/articles/tags/Chervine/default. aspxhttp://social.technet.microsoft.com/wiki/contents/articles/tags/Chervine/default. aspx
5
Why..? Applications load balance varies rapidly and application should be able to adapt 5 Modern Applications produce and consume incredibly high volume of data Users today expects near instantaneous response times Applications Database models are no longer fixed and evolve continuously
6
What is Azure DocumentDB? It is a fully managed, highly scalable, queryable, schema- free document database, delivered as a service, for modern applications. 6
7
What is DocumentDB? 7 Query against Schema-Free JSON Multi-Document transactions Tunable, High Performance Designed for cloud first
8
Azure DocumentDB Resources 8 Source: http://azure.microsoft.com/en-us/documentation/articles/documentdb-introduction/
9
The DocumentDB Data Model 9 All data is stored in JSON Documents Object created in code Object saved in Database
10
Demo: Creating a DocumentDB Account 10 From the preview portal (https://portal.azure.com), click on New > Data + Storage > DocumentDB, fill in the required information and click create.https://portal.azure.com
11
Demo: Querying DocumentDB (1) 11 Create an instance of DocumentClient Create a DocumentDB Database Create a Document Collection Create & Save Documents Provides a client-side logical representation of the Azure DocumentDB service The method CreateOrGetDatabase check if the database already exists, if not, it will create it and return an instance of the database A document collection is a named logical container for documents. The method CreateOrGetCollection returns the collections if it already exists, else it will create the collection. To save documents, the method CreateDocumentAsync is used which creates a document as an asynchronous operation.
12
Demo: Querying DocumentDB (2) 12 Query Documents Update Documents Delete Documents Both SQL and LINQ can be used to retrieve data from DocummentDB using the CreateDocumentQuery method. You first need to get the document to update, make the changes and replace the document using the ReplaceDocumentAsync mthod Get the required document and delete it using the DeleteDocumentAsync method
13
Demo: Azure DocumentDB and ASP.NET MVC Application (1) 13 Request Controller Model View DocumentDB Repository Azure DocumentDB Application Architecture and Flow
14
Demo: Azure DocumentDB and ASP.NET MVC Application (2) 14 Instantiate DocumentClient Get DatabaseGet Collection Do CRUD Operations Provides a client-side logical representation of the Azure DocumentDB service. The Method ReadOrCreateDatabase will create the database if it does not exist The Method ReadOrCreateCollection will create the collection if it does not exist After getting the database and collection, Create, Read, Update and Delete operations can be done. The DocumentDB Repository Flow
15
Gallery Download 15 1.Creating and Querying Microsoft Azure DocumentDB 1.Gallery Download: https://gallery.technet.microsoft.com/Querying-Azure-DocumentDB-d12e7e39 https://gallery.technet.microsoft.com/Querying-Azure-DocumentDB-d12e7e39 2.Using Microsoft Azure DocumentDB in an ASP.NET MVC Application 1.Gallery Download: https://gallery.technet.microsoft.com/Using-Azure-DocumentDB-in-738b277d https://gallery.technet.microsoft.com/Using-Azure-DocumentDB-in-738b277d
16
16 Thank You!
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.