Microsoft Azure Data FundamentalsDescribe how to work with non-relational data on AzureMedium
A company is developing a new social media application that needs to store highly interconnected data, such as user friendships, likes, and comments. This data requires efficient traversal of relationships. Which Azure Cosmos DB API should they choose?
- AAzure Cosmos DB for Cassandra API
- BAzure Cosmos DB for MongoDB API
- CAzure Cosmos DB for Gremlin (Graph) API
- DAzure Cosmos DB for NoSQL (Core) API
Show answer & explanationAnswer & explanation
Correct answer: C. Azure Cosmos DB for Gremlin (Graph) API
Graph databases are specifically designed for data with rich relationships, making traversal operations highly efficient. The Gremlin (Graph) API in Azure Cosmos DB supports this model, which is ideal for social media networks.
Why the other options are wrong
- A. The Cassandra API is designed for column-family data, not optimal for graph structures.
- B. The MongoDB API is suitable for document data, not primarily for graph relationships.
- D. The NoSQL API is general-purpose for document data but less efficient for complex relationship traversals.
Azure Cosmos DB Gremlin (Graph) API
A graph database API in Azure Cosmos DB designed for storing and querying highly interconnected data, ideal for relationships and network analysis.
- Uses the Gremlin query language.
- Optimized for efficient traversal of relationships.
- Suitable for social networks, recommendation engines, and fraud detection.
Memory trick: NoSQL documents, Gremlin graphs connections, Mongo is familiar, Cassandra wide columns.