Quantcast
Channel: CodeSection,代码区,数据库(综合) - CodeSec
Viewing all articles
Browse latest Browse all 6262

Azure DocumentDB overview

$
0
0

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.


Azure DocumentDB overview

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


Azure DocumentDB overview

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


Azure DocumentDB overview

Add a document to the database as shown follows


Azure DocumentDB overview

Open the query explorer to query the data like sql


Azure DocumentDB overview

Connecting DocumentDB using Visual Studio

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


Azure DocumentDB overview

Add the following namespace to code file


Azure DocumentDB overview

Copy the endpoint URI and Primary key from Azure Portal


Azure DocumentDB overview

Write the following code to establish the connection to the database


Azure DocumentDB overview

Write the following code to establish the connection to the database


Azure DocumentDB overview

Viewing all articles
Browse latest Browse all 6262

Trending Articles