Copyright (c) 2026 MindMesh Academy. All rights reserved. This content is proprietary and may not be reproduced or distributed without permission.

4.2.2. Selecting the Right API (SQL, Mongo, Gremlin, etc.)

💡 First Principle: Cosmos DB is a multi-model database. The API you choose determines the data model and query language. Selecting the correct API depends on whether you're migrating an existing application (match the existing API) or building new (usually Core SQL for flexibility).

API Selection Guide

Workload / RequirementCosmos DB APIData Model
New development, general purposeCore (SQL) APIDocuments (JSON)
Existing MongoDB applicationMongoDB APIDocuments (BSON)
Graph relationships (social networks)Gremlin APINodes and edges
Simple key-value storageTable APIKey-value entities
Existing Cassandra applicationCassandra APIWide-column
Visual: Cosmos DB API Selection

⚠️ Exam Trap: If a question mentions "nodes and edges" or "relationships between entities" (like friends in a social network), the answer is Gremlin API—not Core SQL.

Alvin Varughese
Written byAlvin Varughese
Founder15 professional certifications