CosmosDB creation - API option (SQL vs Graph)

拟墨画扇 提交于 2020-04-10 03:27:08

问题


I'm interested in using the Azure CosmosDB for it's Graph capability. Looking through the docs i saw that it sores graph vertices and edges as JSON documents (with an agreed schema) and so it can be accessed as a plain old DocumentDB.

Taking this into consideration what is the meaning of the API selection you need to make when creating a new instance (link)?

eg :

  • what am i losing if i create the DB as SQL (DocumentDB) and manipulating data via the graph part of the client (eg CreateGremlinQuery)
  • what am i losing if i create the DB as Graph and manipulating data via the DocumentDB part of the client (eg CreateDocumentAsync)

UPDATE : I am aware of the portal difference (as described below by Jesse Carter). I am interested if this switch drives anything else under the hood in the specific scenario of choosing between SQL(Document DB) vs Graph


回答1:


There is no functional difference from the perspective of interacting with your Cosmos Collection through either SQL or Graph APIs regardless of which API you choose at creation time.

HOWEVER, there is a difference from the perspective of the Azure portal when navigating your resources. Collections created specifically using the Graph API will get tagged as such and enable additional UI features in the portal for executing Gremlin queries and basic graph visualization.

If you don't care about those querying abilities in the Azure portal, then you're fine to create the collection with either option.




回答2:


API selection is to avoid confusion for users who are only familier with gremlin and don’t want to learn documentDB.

If you are an advanced user, using both graph and documentDB will give you more power.

Note that we are committed to making the gremlin and documentDB SQL integration even more seamless.

Please drop us a note askcosmosdbgraphapi@microsoft.com, if you want to lean more or set up a time to talk to us.

Jayanta



来源:https://stackoverflow.com/questions/47045818/cosmosdb-creation-api-option-sql-vs-graph

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!