CosmosDB创建-API选项(SQL vs Graph) [英] CosmosDB creation - API option (SQL vs Graph)

查看:118
本文介绍了CosmosDB创建-API选项(SQL vs Graph)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有兴趣使用 Azure CosmosDB 图形功能. 浏览文档时,我发现它使图的顶点和边成为JSON文档(具有约定的模式),因此可以将其作为普通的旧DocumentDB进行访问.

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.

考虑到这一点,创建新实例时需要进行 API 选择的含义是什么(

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

例如:

  • 如果我将数据库创建为 SQL (DocumentDB)并且 通过客户端的图形部分(例如CreateGremlinQuery)处理数据
  • 如果我将数据库创建为 Graph 并且我会失去什么 通过客户端的DocumentDB部分处理数据(例如CreateDocumentAsync)
  • 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)

更新:我知道门户网站的区别(如下所述, Jesse Carter ).我很想知道在SQL(Document DB)与Graph之间进行选择的特定情况下,此开关是否可以驱动其他任何事情

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

推荐答案

无论是在创建时选择哪种API,从通过SQL或Graph API与Cosmos Collection进行交互的角度来看,功能上都没有差异.

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.

但是,在浏览资源时,从Azure门户的角度来看有所不同.专门使用Graph API创建的集合将被标记为此类,并在门户中启用其他UI功能以执行Gremlin查询和基本的图形可视化.

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.

如果您不关心Azure门户中的那些查询功能,则可以选择其中任一选项创建集合.

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

这篇关于CosmosDB创建-API选项(SQL vs Graph)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆