SQL API vs MongoDB API

Ahsan Habib 126 Reputation points
2020-08-11T11:49:14.14+00:00

Hello !!!

I am in a dilemma between the SQL API and the MongoDB API. I have 2 major questions
1) I like MongoDB. But as I can see from the Documentation, I cannot leverage the Azure Function trigger with MongoDB API. I would like to know what other Azure Service Integrations/Facilities I will be missing If I choose Mongo over SQL?
2) In the case of SQL API, Does node.js SDK support all the latest features/functionalities of CosmosDB?

We have 2 special requirements:

  1. We need real-time Change Feed functionality for full CRUD operation. But currently, Cosmos does not support delete but It will support soon for the SQL API I guess.
  2. We need multi Document ACID transaction between 2 Collections/Containers/Tables resides in 2 different Databases. But this is not supported I believe.

Note: My Application is on node.js and we are migrating from CouchDB Database

Azure Cosmos DB
Azure Cosmos DB
An Azure NoSQL database service for app development.
1,632 questions
0 comments No comments
{count} votes

Accepted answer
  1. KalyanChanumolu-MSFT 8,331 Reputation points
    2020-08-12T13:22:37.123+00:00

    @Ahsan Habib Thank you for your interest in Azure and Azure CosmosDB.

    If you do not have an existing workload in MongoDB, I would recommend considering the SQL API.

    To answer your questions,

    1) Yes, Azure Cosmos DB bindings are only supported for use with the SQL API.
    2) Yes, the SDK is updated very frequently and is well documented

    To your questions on special requirements

    1) Yes, Delete is not currently supported in Change feed, however you can use a soft-delete flag within your items until this is officially supported.
    2) Currently CosmosDB supports transactions within the same partition only.

    Please let us know if you have any further questions.


    If an answer is helpful, please "Accept answer" or "Up-Vote" for the same which might be beneficial to other community members reading this thread.


0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.