In the Azure portal, click the Plus Sign, select Azure SQL Database, complete the wizard for creating a new Azure SQL database.
In the Azure portal, click on the green plus sign on the left-hand side of the screen where it says new. We will use this to create a new resource in our Azure subscription. The new resource we want to create is an Azure SQL database. You see at the moment where it says marketplace a list of the types of resources that we can deploy into our subscription. Our Azure SQL database is listed under the databases section.
Click on databases. The first option under the featured apps in this example is the SQL database. This is the one we want to deploy. Click on SQL database and notice a blade shows up with several questions about our Azure SQL database. We will fill in all of the fields with relevant information and then the Azure resource manager will deploy our database for us. The database name in this case will be learning.
We will use the current subscription, which is a free trial subscription; and we will create a new resource group. The resource group is a container, sort of like a folder, that allows us to set permissions and see summaries of the cost of our resources. In this case, we will name it learning Azure SQL querying. Notice the underscore. There are various rules about naming conventions here. I'm following the rules for a resource group. You do need to pay attention to the validation in this form.
We are looking for a green check mark. We will select a blank database. We will start by creating content in the database for the course. In this example, please note you can also have Azure deploy a sample database for you and, of course, restore from a backup. In this case, we will stay with blank database. Under server, notice the arrow on the right-hand side. I will click on server, and an extra blade shows up where we provide the details of what this would look like as a SQL server to connect to, in this case, learning Azure SQL Querying is going to be the name of our database server.
And, thus, that is the DNS name, the name on the internet that you will use to connect to. I would also need a login name. This is the name we will use as our user name for connecting to the SQL server. This is our identity. Followed by password and notice the red exclamation mark. It says our passwords have to match. Once I fill in a matching password, we will be able to continue.
Notice also there is a location option. You can choose in which region we place the Azure SQL database. This allows you to select a region closest to you based on your geographic or legal requirements. Now that we filled in the form, we have green check marks next to all of the options; so we will click select, which will allow us to proceed with our database deployment. Notice, on the left-hand side where it says server, it now displays our server name, the name that we have typed in to the server details panel.
For you, well, you will have to create a new name. Because I am using this one, you will get a naming conflict. Next step is to select the size of database we would like to use. The size is under pricing tier. This is essentially how much power you want to have for your database, how much storage space, and how much CPU and memory essentially will be available. Now, there is cost implications; so in the example and for your learning purposes, you may pick the basic option, which will limit our database performance and still give us a significant amount of space for our experimentation.
Notice on the top right-hand side, the premium tier is unavailable because of the type of subscription I am using. If you have a paid subscription with your credit card or otherwise, then you will have all of the options available. Now, the next step is to click on create, but do pay attention to the next option that I am skipping over; it is collation. If you have specific sorting and character fit requirements, that is something to study up on, see which character shapes you might need, how you would like to do comparisons and so forth.
Collation is an advanced topic, which we will skip for this course. Next click on create and now the creation process will start. Take a look at the top right corner of your screen. You'll notice there is a notification that the deployment has started; and if you miss it, notice there is little alarm bell with an alert, notifications. Click on the alarm bell, and you'll see the list of notifications currently active. Now we wait for the deployment to complete. It should take just a few seconds.
- Creating a new Azure SQL database
- Using basic SQL statements such as SELECT and INSERT
- Using SQL statements to update, modify, and delete data
- Adding functions to your SELECT statement to modify how numbers are displayed
- Filtering and formatting results
- Saving and sharing your work by creating views
- Sharing access to your database with other users