Azure Cosmos DB APIs for NoSQL Database - Exam AZ-303 Microsoft Azure Architect Technologies

Which Azure Cosmos DB APIs can be used for a NoSQL database in an application?

Question

Your company plans to develop an application that will use a NoSQL database. The database will be used to store transactions and customer information by using

JSON documents.

Which two Azure Cosmos DB APIs can developers use for the application? Each correct answer presents a complete solution.

NOTE: Each correct selection is worth one point.

Answers

Explanations

Click on the arrows to vote for the correct answer

A. B. C. D. E.

AD

D: The SQL API supports cross-document transactions expressed as JavaScript-stored procedures and triggers. Transactions are scoped to a single partition within each container and executed with ACID semantics as "all or nothing," isolated from other concurrently executing code and user requests. If exceptions are thrown through the server-side execution of JavaScript application code, the entire transaction is rolled back.

A: Azure Cosmos DB is Microsoft's globally distributed, multi-model database service. Where multi-model means Azure Cosmos DB supports multiple APIs and multiple data models, different APIs use different data formats for storage and wire protocol. For example, SQL uses JSON, MongoDB uses BSON, Table uses

EDM, Cassandra uses CQL, Gremlin uses JSON format. As a result, we recommend using the same API for all access to the data in a given account.

Each API operates independently, except the Gremlin and SQL API, which are interoperable.

https://docs.microsoft.com/en-us/azure/cosmos-db/faq

Azure Cosmos DB is a globally distributed, multi-model database service designed for managing and scaling horizontally across different regions. It offers multiple APIs to allow developers to interact with the database using different programming models, including document, key-value, graph, and column-family models.

In this scenario, the company plans to develop an application that uses a NoSQL database to store transactions and customer information in JSON documents. Based on this requirement, the following are the two Azure Cosmos DB APIs that developers can use for the application:

B. MongoDB: Azure Cosmos DB's MongoDB API allows developers to use existing MongoDB drivers, applications, and tools to work with Cosmos DB's document data model. The MongoDB API supports the MongoDB wire protocol, which enables applications written for MongoDB to communicate natively with Cosmos DB's API. With the MongoDB API, developers can store JSON documents and use MongoDB queries, indexes, and aggregations to retrieve data.

D. Core (SQL): Azure Cosmos DB's Core (SQL) API is a document-oriented database API that allows developers to store and query JSON documents using SQL-like syntax. It supports a rich set of SQL functions, including JOINs, projections, and filtering. The Core (SQL) API also provides multi-document transactions, consistency models, and global distribution.

A. Gremlin (graph), C. Cassandra, and E. Azure Table are not appropriate APIs for this scenario since they are designed for different data models. Gremlin (graph) is used for graph data, Cassandra is used for column-family data, and Azure Table is used for key-value data.

In summary, the two Azure Cosmos DB APIs that developers can use for the application that stores transactions and customer information in JSON documents are MongoDB and Core (SQL).