Soru

Zorluk: ZorAzure Database Services (Relational, Non-Relational, and Cosmos DB)

A developer is designing a globally distributed application that requires storing semi-structured data. They want to use the Cosmos DB API for NoSQL for some queries and the Cosmos DB API for MongoDB for other queries on the same dataset.

Is it true or false that a single container in Cosmos DB can be accessed and queried using different API types simultaneously?

Cevap: Cevap

Cevap

False
The statement is false because Cosmos DB API configurations are set at the account level. A container inherits this API and cannot be accessed or queried using another API simultaneously.

Adım Adım Çözüm

1
Analyze how APIs are configured and isolated in Cosmos DB.
Cosmos DB requires you to select a specific API (such as API for NoSQL, API for MongoDB, or API for Cassandra) when creating the account.
The selected API determines the wire protocol and how the database engine interprets and indexes the storage container's documents.
2
Evaluate the capability of accessing a single container through multiple APIs.
Containers created within an account inherit that account's API and cannot be queried using a different API.
Cosmos DB does not support cross-API projection or translation on a single container.
3
Determine the correct answer based on the evaluation.
Since simultaneous access via different APIs on a single container is not supported, the statement is false.
To use different APIs, you must create separate Cosmos DB accounts, which results in separate datasets.

Anahtar Kavram

API isolation at the Cosmos DB account level prevents multi-API access to the same database container.
Bu soruyu puanla