Programming
AI/ML
Automation (RPA)
Software Design
JS Frameworks
.Net Stack
Java Stack
Django Stack
Database
DevOps
Testing
Cloud Computing
Mobile Development
SAP Modules
Salesforce
Networking
BIG Data
BI and Data Analytics
Web Technologies
All Interviews

Top 32 Cosmos DB Interview Questions and Answers

08/Dec/2024 | 10 minutes to read

database

Here is a List of essential Cosmos DB Interview Questions and Answers for Freshers and mid level of Experienced Professionals. All answers for these Cosmos DB questions are explained in a simple and easiest way. These basic, advanced and latest Cosmos DB questions will help you to clear your next Job interview.


Cosmos DB Interview Questions and Answers

All questions are targeted for Azure Cosmos DB. We have a separate document for NoSQL DataBase Interview Questions. You must know have knowledge of these questions will help you to clear Azure Cosmos DB interview.


1. Explain the differences between NoSQL and relational databases.

There are two types of database systems are implemented Relational and NoSQL. There are lot of differences in these systems.

  • Relational Database provide store of related tables while NoSQL stores the unstructured or semi-structured data in the form of key/value or JSON documents.
  • Relational DB has fixed schema while NoSQL DB has dynamic schema.
  • Relational DB use SQL (Structured Query Language) to manage the data, NoSQL DB have many models for managing and accessing the data.
  • Relational Tables provide ACID guarantees but NoSQL does not provide ACID guarantees beyond the scope of single DB partition.
  • Relational DBs are mature, proven and widely used where as NoSQL is high performance database with ease-of-use, resilience, scalability and availability characteristics.

2. What is Cosmos DB?

Azure Cosmos DB is a multi model database service by Microsoft, that is globally distributed. It provides the capability of scale the throughput and storage across any number of azure regions with a single button click. You can manage and access the data using your favorite API including (MongoDB, SQL, Cassandra, Tables, Gremlin).
Cosmos DB provides some SLA (service level agreements) for consistency guarantee, throughput, availability and latency.

3. Explain the common use cases for Azure Cosmos DB.

Azure Cosmos DB is a good choice for any Mobile, Web, Gaming or IOT applications that needs:

  • low and fast order of millisecond response times.
  • predictable performance
  • to automatic scale rapidly and globally
  • ability to query over schema-free data.

4. How does Azure Cosmos DB provide predictable performance?

5. What do you think about HIPAA compliances for Azure Cosmos DB ?

HIPAA establishes the standards to use, safeguarding and disclose the identifiable health information of any individual. Azure Cosmos DB fully supports HIPAA Compliance or it's HIPAA compliant. For more about HIPAA compliance visit What is HIPAA.

6. Is there any storage limit of Cosmos DB?

There is no storage limit for a Cosmos container. It can store any amount of data.

7. Can I use multiple APIs to access the data in Cosmos DB?

8. How does Cosmos DB provide support for various data models like key/value, columnar, document and graph?

9. How does Cosmos DB cost is calculated?

10. Explain the throughput.

11. Describe the throughput limits of Azure Cosmos DB.

12. Does Azure Cosmos DB provide free account?

13. Explain the connection mode. Are Direct and Gateway connection modes encrypted?

For more you can refer Connection Mode

14. Explain the indexing in Cosmos DB.

For more you can refer Indexing in Azure Cosmos DB

15. Describe the Indexing policies in Cosmos DB.

For more you can refer Indexing policies in Azure Cosmos DB

16. What Indexing modes Azure Cosmos DB supports?

17. Describe the change feed in Azure Cosmos DB.

18. Describe the Partitioning in Azure Cosmos DB.

19. How Azure Cosmos DB is globally distributed database?

For more you can refer Global distribution in Cosmos DB

20. How will you implement Azure Cosmos DB security?

For more you can refer Security in Azure Cosmos DB

21. Explain the ACID in Cosmos DB.

For more you can refer ACID in Cosmos DB

22. Explain common clauses (Select, From, Where, Order By, Group By, Offset Limit) in Azure Cosmos DB.

23. Explain the SQL subquery and it's types.

A subquery is a query which is nested within another query. A query or statement that contains sub query is called as outer query. Sometimes subquery is known as inner query. There are two types of subqueries.
Azure Cosmos DB supports only Correlated subqueries.

  • Correlated - This type of subquery is evaluated once for each row processed by outer query and this subquery reference values from outer query.
  • Non-correlated - This type of subquery does not depend on outer query. It can be run on its own without referencing values from outer query.

Subqueries can be further classified into three categories based on the number of rows and columns returned by the subquery as below.

  • Table - returns multiple rows and multiple columns.
  • Multi-value - returns multiple rows and single column.
  • Scalar - returns single row and single column.
For more you can refer SQL subquery in Azure Cosmos DB

24. Explain Joins.

25. How Azure Cosmos DB SQL query execution works?

26. What APIs Azure Cosmos DB offers?

27. What are the benefits of using server-side programming in Azure Cosmos DB?

For more you can refer server-side programming in Cosmos DB

28. What is Container in Cosmos DB?

29. What is _etag in Azure Cosmos DB?

Some General Interview Questions for Cosmos DB

1. How much will you rate yourself in Cosmos DB?

When you attend an interview, Interviewer may ask you to rate yourself in a specific Technology like Cosmos DB, So It's depend on your knowledge and work experience in Cosmos DB. The interviewer expects a realistic self-evaluation aligned with your qualifications.

2. What challenges did you face while working on Cosmos DB?

The challenges faced while working on Cosmos DB projects are highly dependent on one's specific work experience and the technology involved. You should explain any relevant challenges you encountered related to Cosmos DB during your previous projects.

3. What was your role in the last Project related to Cosmos DB?

This question is commonly asked in interviews to understand your specific responsibilities and the functionalities you implemented using Cosmos DB in your previous projects. Your answer should highlight your role, the tasks you were assigned, and the Cosmos DB features or techniques you utilized to accomplish those tasks.

4. How much experience do you have in Cosmos DB?

Here you can tell about your overall work experience on Cosmos DB.

5. Have you done any Cosmos DB Certification or Training?

Whether a candidate has completed any Cosmos DB certification or training is optional. While certifications and training are not essential requirements, they can be advantageous to have.

Conclusion

We have covered some frequently asked Cosmos DB Interview Questions and Answers to help you for your Interview. All these Essential Cosmos DB Interview Questions are targeted for mid level of experienced Professionals and freshers.
While attending any Cosmos DB Interview if you face any difficulty to answer any question please write to us at info@qfles.com. Our IT Expert team will find the best answer and will update on the portal. In case we find any new Cosmos DB questions, we will update the same here.