As modern, cloud-based apps have evolved, they’ve required data storage to adapt with them. Often the exact schema needed is not known up front and will probably change over time. Services such as Azure Table Storage have risen to the challenge to meet this need, providing structured NoSQL data storage that is flexible, scalable, and globally distributed. In this hands-on lab scenario, you are the DBA for Awesome Company. A new mobile app is being developed that will require key/attribute storage in the cloud. The needed table will be storing information about the company’s training division and should be partitioned by membership in the Staff or Student groups, be keyed by the individual’s numeric ID, and contain their full names and area of study. Performing the actions of this lab will help you become familiar with how to create, insert into, and select from an Azure Storage Table.
Learning Objectives
Successfully complete this lab by achieving the following learning objectives:
- Log in to the Azure Portal
Log in to the Azure Portal using the provided credentials. Be sure to use an InPrivate or incognito window and use the lab credentials and not your work or personal credentials.
- Create a Storage Account
- Click the three-line menu icon in the top left corner of the page, and click Storage accounts.
- Click Add.
- Select the resource group the lab created for you.
- Provide a storage account name (must be globally unique).
- For Region (location), use the same location as the lab-provided resource group location. This is important.
- Leave all other defaults. Click Review + create.
- Verify all is well, and click Create.
- Once the deployment is complete, click Go to resource.
- Create an Azure Storage Table
- On the resource overview page, click Table Service on the main page or in the left-hand menu select Tables.
- Click +Table.
- Provide the Table name
actraining
, and click OK.
- Insert Data into the Table
- In the left-hand menu, scroll to the top section and click Storage Browser.
- Expand TABLES, and click on actraining.
- Click +Add to add an entity.
- Enter the following values:
- PartitionKey: Staff
- RowKey: 7777
- Click Add Property, and enter the following values:
- Property Name: FullName
- Value: Landon Fowler
- Click Add Property, and enter the following values:
- Property Name: FieldOfStudy
- Value: Databases
- Click Insert.
- Repeat the steps above, but with the following values:
- PartitionKey: Students
- RowKey: 8888
- FullName: Jesse Hoch
- FieldOfStudy: Linux
- Query for Students
- Under the Query Builder header, select Add Filter.
- Filter by a PartitionKey of Students.
- Execute the query by clicking the Apply button.
- Notice it brought back only our student.