0
0
Azurecloud~30 mins

DTU vs vCore pricing models in Azure - Hands-On Comparison

Choose your learning style9 modes available
Understanding DTU vs vCore Pricing Models in Azure SQL Database
📖 Scenario: You are working as a cloud administrator for a small company. Your manager wants you to understand the difference between two Azure SQL Database pricing models: DTU and vCore. This knowledge will help decide which pricing model to choose for your company's database needs.
🎯 Goal: Build a simple comparison structure in code that lists the key features and pricing factors of DTU and vCore models. This will help you clearly see the differences and explain them to your team.
📋 What You'll Learn
Create a dictionary with exact keys and values describing DTU and vCore pricing models
Add a configuration variable to select the preferred pricing model
Write code to extract and display the selected pricing model details
Complete the code by adding a summary statement about the chosen pricing model
💡 Why This Matters
🌍 Real World
Cloud administrators and architects often need to understand pricing models to optimize costs and performance for databases in Azure.
💼 Career
Knowing DTU vs vCore pricing helps in making informed decisions about database provisioning, budgeting, and scaling in cloud environments.
Progress0 / 4 steps
1
Create a dictionary with DTU and vCore pricing model details
Create a dictionary called pricing_models with two keys: 'DTU' and 'vCore'. Each key should map to another dictionary with these exact entries:
'Description': 'Database Transaction Unit based model' for DTU and 'Description': 'Virtual Core based model' for vCore.
Also include 'PricingFactors' with values 'Blended compute, storage, and IO' for DTU and 'Compute, storage, and IO priced separately' for vCore.
Azure
Need a hint?

Use a dictionary with nested dictionaries for each pricing model.

2
Add a variable to select the preferred pricing model
Add a variable called selected_model and set it to the string 'vCore' to represent the preferred pricing model.
Azure
Need a hint?

Just assign the string 'vCore' to the variable selected_model.

3
Extract details of the selected pricing model
Write a line of code to create a variable called model_details that gets the dictionary value from pricing_models using the key stored in selected_model.
Azure
Need a hint?

Use the variable selected_model as the key to access pricing_models.

4
Add a summary statement about the chosen pricing model
Add a variable called summary and set it to a string that says exactly: 'The selected pricing model is vCore which uses Virtual Core based model and prices compute, storage, and IO separately.' Use the selected_model and model_details dictionary values to build this string with f-string formatting.
Azure
Need a hint?

Use an f-string and access model_details['Description'] and model_details['PricingFactors']. Use .lower() on PricingFactors for exact match.