DBA > Articles

Microsoft Azure DocumentDB

By: Robert Sheldon
To read more DBA articles, visit http://dba.fyicenter.com/article/

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.

DocumentDB integrates JSON and JavaScript right into the database engine. JSON, short for JavaScript Object Notation, is a widely implemented lightweight format for exchanging data between different source types, similar to how XML can be used to exchange data. JSON is based on a subset of the JavaScript programming language and is easy for computers to parse and generate, as well as being human readable.

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.

Full article...

Other Related Articles

... to read more DBA articles, visit http://dba.fyicenter.com/article/