TechBubbles Microsoft Technology BLOG

Azure DocumentDB overview

DocumentDB is a NoSQL database supports fast performance, ease of development and high availability. Its schema –free NoSQL database. As data is stored in JSON format reads and writes are served under 10 milliseconds. DocumentDB is ideal for developing web, mobile, gaming and IoT applications. You can use SQL like language to query the DocumentDB data.

image

All the data that you stored in DocumentDB is automatically indexed so you can query anything at any time. DocumentDB also enables you to leverage existing JavaScript skills to execute transactional application logic over multiple documents using JavaScript based triggers, user-defined functions and stored procedures. It easily integrates with existing Azure services to simplify modern application development.

Creating DocumentDB on Azure

Create a DocumentDB service using Azure portal as follows

image

Open the created DB and add a database and collection as follows

image

Add a document to the database as shown follows

image

Open the query explorer to query the data like sql

image

Connecting DocumentDB using Visual Studio

Open Visual Studio and create a new project for connecting DocumentDB, install Microsoft.Azure.DocumentDB package

image

Add the following namespace to code file

image

Copy the endpoint URI and Primary key from Azure Portal

image

Write the following code to establish the connection to the database

image

Write the following code to establish the connection to the database

image

 

 

 

 

About the author

Kalyan Bandarupalli

My name is kalyan, I am a software architect and builds the applications using Microsoft .NET technologies. Here I am trying to share what I feel and what I think with whoever comes along wandering to Internet home of mine.I hope that this page and its contents will speak for me and that is the reason I am not going to say anything specially about my self here.

Add Comment

TechBubbles Microsoft Technology BLOG

Follow me

Archives

Tag Cloud