Microsoft Azure DocumentDB
By: Robert Sheldon
In April 2015, Microsoft made Azure DocumentDB generally available to the public, nearly eight months after launching the preview, and over six years after the release of MongoDB, the world’s most popular NoSQL database management system. Like MongoDB, DocumentDB stores data as uniquely identifiable documents, but unlike MongoDB, DocumentDB was built from the ground up to run as a cloud service, providing a platform for creating NoSQL databases, populating them with JSON documents, and querying those documents with a SQL-like language optimized to work with JSON data.
DocumentDB organizes documents into collections, with each database capable of hosting one or more collection. Because DocumentDB is a cloud service, it offers quick and easy implementations, while delivering the flexibility and scalability necessary to meet the demands of todays web and mobile applications.
To support data access in DocumentDB, Microsoft has come up with a SQL-type language for querying the JSON documents. The language is made up only of the SELECT statement, which looks very much like a T-SQL SELECT statement, except that the DocumentDB version supports only four clauses. In this article, I provide a general overview of how to get started with DocumentDB and then introduce you to DocumentDB’s SQL language. The article assumes you have some familiarity with T-SQL and JSON, both useful skills to have if you plan to work with DocumentDB.
Getting started with DocumentDB
I won’t dive too deeply into how to get started with DocumentDB because Microsoft provides a good set of instructions on its DocumentDB documentation page, but I’ll still give you some basic information about the initial setup, should you want to try out the example queries in this article. To do so, you must take the following steps (if you haven’t already taken them):
Create a DocumentDB account.
Create a database.
Create a collection.
Add the JSON documents.
Not surprisingly, you must have an Azure account before you can create the DocumentDB account. If you are new to Azure, you can take advantage of the 30-day free trial. Once that’s in place, go to the Azure portal, click New in the left pane, which opens the New pane to the right. In the New pane, click Data + Storage. When the Data + Storage pane appears, click Azure DocumentDB, as shown in the following figure.
Other Related Articles
... to read more DBA articles, visit http://dba.fyicenter.com/article/