Microsoft Azure offers a number of ways to work with the cloud-based DocumentDB service, including PowerShell, API, and Azure Web interface. See why it's worth trying.
Data is a forever growing and seemingly never-ending organizational resource (anyone else tired of hearing about big data?). Modern applications must be able to efficiently and quickly work with these data sets where many are unstructured, thus traditional (or relational) methods do not apply.
The NoSQL label emerged for technologies to work with these data sources, whether they are object stores, key-value pairs, graph databases, or document storage and so forth. This takes me back to my days of working with a true NoSQL workhorse: Lotus Notes -- but that is a story for a different day. The DocumentDB data service from Windows Azure is a cloud-based option from Microsoft. Here's what the service (which is currently in preview mode) offers and instructions on how to get it up and running.
Numerous data storage options
Microsoft Azure has many options for storing and working with data, including:
- Table storage, which provides an easy way to quickly access data using key values that describe the data.
- The traditional relational option via SQL Azure.
- The DocumentDB route for unstructured data, which allows you to work with data via a RESTFul interface that takes advantage of JSON -- store, retrieve, and interact via JSON.
DocumentDB allows you to query all data in the document, while table storage only works with metadata outside the document.
Getting started with DocumentDB
The DocumentDB feature preview coincides with a new look for the Microsoft Azure portal home page. Figure A shows my portal page open in the Chrome browser. The portal home page is familiar if you use Windows 8 (or watch the Windows Surface commercials), as it presents the Azure features using the tile approach. It offers quick links to view billing details, service health reports, portal settings, and such.
The portal provides numerous ways for working with Azure features. The green plus sign in the lower left corner of the portal page allows you to add features. Figure B shows the list that is presented when the green plus sign is selected, with the DocumentDB option chosen.
Selecting the New icon presents a list of features to add.
Figure C shows the window presented when choosing to add a new DocumentDB instance. A name is entered along with configuration, subscription, and location details. Select the Create button to create the DocumentDB instance.
DocumentDB details are entered when creating a new instance.
When adding features, the portal page will display their status, as Figure D shows the new DocumentDB instance being created. The new DocumentDB instance is visible as the far right tile in Figure A.
The portal home page shows the status of the new feature.
Once the new DocumentDB container is created, you can work with its many features via the portal (Figure E). The basic structure of DocumentDB begins with your Azure account, which can have one or more DocumentDB database instances. Each database contains users with permissions and collections, which can contain documents with attachments. Programmatically, you can add define stored procedures, user-defined functions, and triggers.
You may be shaking your head because of its resemblance to traditional SQL, but that is kind of the point -- to offer an easy-to-use, somewhat familiar programming paradigm for non-traditional data. The online documentation provides a wealth of information and tutorials. (Note: The preview release does have some limitations.)
A newly created DocumentDB instance offers many features.
The URI shown in the upper right of Figure E is the key to working with the DocumentDB service. This URI is the RESTFul interface where you can send HTTP POST commands to create new resources and execute queries or stored procedures. An HTTP GET request is used to read data.
A cloud of NoSQL
Cloud-based computing is here to stay and, like many developers, I could not be more thrilled. Cloud allows me to use features and services without building and supporting an infrastructure.
My opinion of Microsoft Azure has improved steadily since its launch. The services continue to mature and, like Microsoft's competitors in this space (e.g., Amazon), they are easy to set up and use.
Microsoft Azure offers a number of ways to work with the DocumentDB service (PowerShell, API, Azure Web interface, etc.), so there is something for everybody. You should consider DocumentDB and the plethora of other Azure services for your next project.
- NoSQL databases eat into the relational database market
- DataStax adds graph database to its arsenal
- Netflix on how to build services that scale beyond millions of users
- Software development tools, from Stone Age to cloud age
- NoSQL: A Database for Cloud Computing
- Two new CEOs don't add up to meaningful change at Oracle
- The Power of IoT and Big Data (ZDNet/TechRepublic special feature)