Exam Ref AZ-204 Chapter 2 - D306 Azure
Developer Associate With Correct Answers
What is Cosmos DB - CORRECT ANSWER It is a premium storage service that Azure
provides for a globally distributed, low latency, highly responsive, and always online
Database. Has scalability and throughput in mind.
What are the 4 ways you can store your data in Cosmos DB? - CORRECT ANSWER
Key-Value
Column Family
Documents
Graph Approaches
What are the current APIs that can access CosmosDB? - CORRECT ANSWER SQL,
Cassandra, Table, Gremlin, and MongoDB
What is SQL API? - CORRECT ANSWER It is the core and default API for accessing
data in CosmosDB. You can query JSON objects using SQL syntax, Uses Javascript.
This is a Data Structure based on Documents.
What is Table API - CORRECT ANSWER It is like the evolution of Azure Table
Storage. It has High Performance, low latency, and highly scalable features. Can
migrate from Azure table storage with no code modifications. You can define your own
indexes. This is a data structure based on Documents.
What is Cassandra API? - CORRECT ANSWER This is a wire protocol Apache Data
Base. How this is implemented means you do not have to worry about operations or
performance management tasks related to managing this DB. Can migrate from a
Cassandra DB to this DB merely by changing the connection string. Compatible with
CQLv4 wire protocol. This is a Column Based DB that stores info in a Key-Value
approach.
What is MongoDB API? - CORRECT ANSWER This is a NoSQL DB with a Document
based Structure. CosmosDB enables a wire protocol to connect but this API must be
version 3.2 or higher.
What is Gremlin API? - CORRECT ANSWER Based on Apache TinkerPop Graph
transversal language. This uses a Graph structure. This stores entities but also:
1. Vertices - (entity such as person, device or event)
2. Edges - Relationships between vertices
3. Properties - each of the attributes that are assigned to a vertex or edge.
, Can you use multiple APIs in a single CosmosDB account? - CORRECT ANSWER No
you can only choose one.
What is a logical partition for Cosmos DB - CORRECT ANSWER When you divide a
CosmosDB container into smaller pieces, each piece is a logical partition. All items
stored on this partition share the same partition key.
What is a physical partition for CosmosDB? - CORRECT ANSWER A group of replicas
of data that is physically stored on servers. Azure manages this group of replicas. Can
contain one or more Logical partitions.
By default what is the storage limit for a logical partition? - CORRECT ANSWER 20GB
What is a "hot" partition? - CORRECT ANSWER It is when you select a partition key
with few possible values and the partition receives most of the requests reaching the
throughput limit.
What is the min throughput for DB's - CORRECT ANSWER 100 request units per
second (R/Us)
What is the min throughput for Containers? - CORRECT ANSWER 400 request units
per second (R/Us)
When choosing partition keys what should you look for? - CORRECT ANSWER
Something with a wide range of values and access patterns.
What do you do if none of the properties in your DB are appropriate for partition keys? -
CORRECT ANSWER You can create a Synthetic Key.
What is a Synthetic Key? - CORRECT ANSWER A key compound of two concatenated
properties.
Once you have chosen a Partition key, can it be changed? - CORRECT ANSWER No
What are two commands to create a DB in SQL API? - CORRECT ANSWER
CreateDatabaseIfNotExistsAsync
CreateContainerIfNotExistsAsync
Where is the Connection String Panel for MongoDB? - CORRECT ANSWER Under the
settings section in your AZ CosmosDB account.
5 consistency levels for CosmosDB - CORRECT ANSWER From most consistent to
most performance
1. Strong