• +91 9723535972
  • info@interviewmaterial.com

Cosmos DB Interview Questions and Answers

Cosmos DB Interview Questions and Answers

Question - 21 : - How Do I Create A Database?

Answer - 21 : - You can create databases by means of using the Azure portal, as defined in Add a set, one of the Azure Cosmos DB SDKs, or the REST APIs.

Question - 22 : - How Do I Set Up Users And Permissions?

Answer - 22 : - You can create users and permissions by way of the usage of one of the Cosmos DB API SDKs or the REST APIs.

Question - 23 : - Does The Documentdb Api Support Sql?

Answer - 23 : - The SQL query language is an enhanced subset of the question capability it's supported with the aid of SQL. The Azure Cosmos DB SQL query language offers wealthy hierarchical and relational operators and extensibility through JavaScript-based, user-defined features (UDFs). JSON grammar permits for modeling JSON files as bushes with categorised nodes, that are used by both the Azure Cosmos DB computerized indexing techniques and the SQL question dialect of Azure Cosmos DB.

Question - 24 : - Does The Documentdb Api Support Sql Aggregation Functions?

Answer - 24 : - The DocumentDB API supports low-latency aggregation at any scale through aggregate functions COUNT, MIN, MAX, AVG, and SUM through the SQL grammar.

Question - 25 : - How Does The Documentdb Api Provide Concurrency?

Answer - 25 : - The DocumentDB API supports positive concurrency manage (OCC) thru HTTP entity tags, or ETags. Every DocumentDB API resource has an ETag, and the ETag is about at the server each time a file is updated. The ETag header and the modern-day value are protected in all response messages. ETags can be used with the If-Match header to permit the server to determine whether or not a resource ought to be updated. The If-Match price is the ETag cost to be checked in opposition to. If the ETag cost matches the server ETag price, the resource is up to date. If the ETag is no longer cutting-edge, the server rejects the operation with an "HTTP 412 Precondition failure" response code. The consumer then re-fetches the useful resource to gather the contemporary ETag fee for the aid. In addition, ETags can be used with the If-None-Match header to decide whether or not a re-fetch of a useful resource is needed.

Question - 26 : - How Do I Perform Transactions In The Documentdb Api?

Answer - 26 : - The DocumentDB API helps language-included transactions through JavaScript-saved techniques and triggers. All database operations internal scripts are finished under image isolation. If it is a single-partition collection, the execution is scoped to the gathering. If the collection is partitioned, the execution is scoped to files with the same partition-key value inside the series. A picture of the document versions (ETags) is taken on the start of the transaction and devoted best if the script succeeds. If the JavaScript throws an errors, the transaction is rolled back.

Question - 27 : - How Can I Bulk-insert Documents Into Cosmos Db?

Answer - 27 : - You can bulk-insert documents into Azure Cosmos DB in both of two ways: The statistics migration device, as defined in Database migration tool for Azure Cosmos DB. Stored techniques, as described in Server-aspect JavaScript programming for Azure Cosmos DB.

Question - 28 : - Does The Documentdb Api Support Resource Link Caching?

Answer - 28 : - Yes, due to the fact Azure Cosmos DB is a RESTful provider, useful resource hyperlinks are immutable and can be cached. DocumentDB API customers can specify an "If-None-Match" header for reads in opposition to any aid-like document or series and then replace their local copies after the server model has modified.

Question - 29 : - Is A Local Instance Of Documentdb Api Available?

Answer - 29 : - Yes. The Azure Cosmos DB Emulator presents a excessive-fidelity emulation of the Cosmos DB provider. It helps capability that is equal to Azure Cosmos DB, which include guide for creating and querying JSON documents, provisioning and scaling collections, and executing saved tactics and triggers. You can increase and take a look at programs by means of the use of the Azure Cosmos DB Emulator, and set up them to Azure at a international scale by making a unmarried configuration trade to the connection endpoint for Azure Cosmos DB.

Question - 30 : - What Is The Azure Cosmos Db Api For Mongodb?

Answer - 30 : - The Azure Cosmos DB API for MongoDB is a compatibility layer that lets in programs to easily and transparently talk with the native Azure Cosmos DB database engine by means of using existing, community-supported Apache MongoDB APIs and drivers. Developers can now use present MongoDB device chains and skills to construct packages that take gain of Azure Cosmos DB. Developers enjoy the unique competencies of Azure Cosmos DB, which include automobile-indexing, backup renovation, financially backed provider level agreements (SLAs), and so on.


NCERT Solutions

 

Share your email for latest updates

Name:
Email:

Our partners