Azure Cosmos DB是多模型意味着什么? [英] What does it mean that Azure Cosmos DB is multi-model?

查看:108
本文介绍了Azure Cosmos DB是多模型意味着什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

看看新的Azure宇宙数据库,我对它的多模型本质有些困惑.具体来说,它的意思是:

Looking at the new Azure cosmos database, I'm a bit confused about the multi-model nature of it. Specifically, does it mean:

a)可以同时通过多种方式查询同一个基础数据库/存储,这样我就可以针对相同的集合同时使用gremlin图查询和mongodb api.

a) That the same underlying database/store can be queried multiple ways concurrently so that I can use both gremlin graph queries and mongodb api against the same collections.

  • 或-

b)这是否意味着您在配置Cosmos DB时可以选择不同的模型(图形,键值,列,文档),这就是从那时起存储数据的方式.

b) Does it mean that you can choose a different model (graph, key value, column, document) at the time of provisioning your Cosmos DB and that is how the data will be stored from then on.

这本小册子听起来像a),但是使用Azure仪表板创建一个宇宙实例,就好像b),因为您必须在创建时选择模型类型.

The brochure makes it sound like a), but using the Azure dashboard to create a cosmos instance it makes it seem like b) since you have to choose a model type at creation.

另外,文献引用了柱状数据,但是在创建时我看不到它的选项.

Additionally, the literature makes reference to columnar data, but I don't see the option for it at create time.

推荐答案

Cosmos DB是单个NoSQL数据引擎,它是Document DB的演变.创建容器(数据库实例")时,请为您的用例选择最相关的API,以优化与基础数据存储库交互的方式以及如何将数据持久存储到该存储库中.

Cosmos DB is a single NoSQL data engine, an evolution of Document DB. When you create a container ("database instance") you choose the most relevant API for your use case which optimises the way you interact with the underling data store and how the data is persisted in to that store.

因此,根据选择的API,它将所需的模型(图形,列,键值或文档)投影到基础存储上.

So, depending on the API chosen, it projects the desired model (graph, column, key value or document) on to the underlying store.

您只能对一个容器使用一个API,由于存储和检索数据的方式,不可能使用多个API.该API规定了存储模型-图形,键值,列等,但是它们全都映射到后台的相同技术.

You can only use one API against a container, multiple are not possible due to the way the data is stored and retrieved. The API dictates the storage model - graph, key value, column etc, but they all map back on to the same technology under the hood.

由于@Jesse Carter在下面的注释,因此您可以混合使用图形和DocumentSQL API.

Thanks to @Jesse Carter's comment below it appears you are however able to mix and match the graph and DocumentSQL APIs.

从文档中获取:

多模型,多API支持

Azure Cosmos DB本机支持多种数据模型,包括文档,键值,图形和列族. Cosmos DB数据库引擎的核心内容模型基于原子记录序列(ARS).原子由少量基本类型组成,例如字符串,布尔型和数字.记录是由这些类型组成的结构.序列是由原子,记录或序列组成的数组. 数据库引擎可以有效地将不同的数据模型转换并投影到基于ARS的数据模型上. Cosmos DB的核心数据模型可以通过动态类型化的编程语言进行本地访问,并且可以按JSON形式公开.

Azure Cosmos DB natively supports multiple data models including documents, key-value, graph, and column-family. The core content-model of Cosmos DB’s database engine is based on atom-record-sequence (ARS). Atoms consist of a small set of primitive types like string, bool, and number. Records are structs composed of these types. Sequences are arrays consisting of atoms, records, or sequences. The database engine can efficiently translate and project different data models onto the ARS-based data model. The core data model of Cosmos DB is natively accessible from dynamically typed programming languages and can be exposed as-is as JSON.

该服务还支持流行的数据库API,用于数据访问和查询. Cosmos DB的数据库引擎当前支持DocumentDB SQL,MongoDB,Azure表(预览)和Gremlin(预览).您可以继续使用流行的OSS API来构建应用程序,并获得经过反复测试和全面管理的全球分布式数据库服务的所有好处.

The service also supports popular database APIs for data access and querying. Cosmos DB’s database engine currently supports DocumentDB SQL, MongoDB, Azure Tables (preview), and Gremlin (preview). You can continue to build applications using popular OSS APIs and get all the benefits of a battle-tested and fully managed, globally distributed database service.

这篇关于Azure Cosmos DB是多模型意味着什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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