Introduction to Azure SQL DB, Part 1: Overview

My immersion into the world of JavaScript began during a time of great flux for databases. The emergence of document-based, key-value, and graph databases (among a variety of others), all providing specializations based on their models and engines can be mind-boggling. Evolving right along with the rest of these, however, is the tried and true relational DBMS. In fact, adoption of cloud-based relational DBMS is rapidly accelerating as platforms and cloud technologies mature, and as this adoption increases, we'll continue to see powerful developments under the hood of database PaaS (or DBaaS). The writing is on the wall – the popularity of cloud-based Relational DBMS has increased ten-fold over the last four years from 0.1% to 1.6% of all DBMS. It isn't difficult to imagine that growth continuing and breaching 10% within only a matter of years.

Enter Azure SQL Database

"Azure SQL Database is a relational database-as-a-service using the Microsoft SQL Server Engine. SQL Database is a high-performance, reliable, and secure database you can use to build data-driven applications and websites in the programming language of your choice, without needing to manage infrastructure." - Azure SQL Documentation

Azure SQL DB seems to be the premiere option in terms of cloud-based Relational DBMS; ranking the highest in popularity among cloud-based Relationship DBMS; not to mention that the database engine it is using (Microsoft SQL Server) is currently the third most popular in the world. It certainly behooves us to explore some of the capabilities of Azure SQL DB; especially with respect to JavaScript. Awesomely, it only costs about $5/month to get started on Azure SQL DB using a fully isolated database for testing and development, complete with a 99.99% uptime SLA.

Azure SQL DB supports connections via Node.js and has a mature (but actively developed) driver through Tedious.

Side note: Azure SQL DB has built-in functionality for ingesting and returning JSON data; meaning it is unnecessary to write client or server-side code to reformat results from tables to JSON. A win for Azure SQL DB. : )

The architecture behind Azure SQL DB is fascinating but extends beyond the scope of this article. If you're interested though, I'd recommend beginning with "What is the Azure SQL database service?".

I've been spoiled by the simplicity of setting up and using other types of databases like MongoDB and Firebase, so I came into my testing of Azure SQL Database with pretty high expectations. I expect to be able to just "switch on" a product, and by all means – Azure SQL DB does not disappoint. My experience with Azure SQL DB so far has shown that nearly all of the setup and database administration is abstracted away and simply not a concern. Setting up Azure SQL DB via the Azure Portal takes only minutes, but there are a couple other methods available to deploy it programmatically – such as via Azure CLI or PowerShell. And of course – we can't turn down the opportunity to do something programmatically.

Another side note: Check out "Build an app using SQL Server" to get a walkthrough of setting up SQL Server 2016 Developer on your local machine. The process is incredibly simple.

Next up: Setting up Azure SQL Database...