Microsoft Azure DocumentDB与Azure表存储 [英] Microsoft Azure DocumentDB vs Azure Table Storage

查看:53
本文介绍了Microsoft Azure DocumentDB与Azure表存储的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

几年来,Microsoft提供了一种名为表存储"的"NoSQL"键/值存储(

For several recent years, Microsoft offers a "NoSQL" key/value storage, called "Table Storage" (http://azure.microsoft.com/en-us/documentation/articles/storage-dotnet-how-to-use-tables/)

表存储提供了高性能,可伸缩性(通过分区)和相对较低的成本.表的主要缺点是只能对分区键和行键进行索引-因此对值进行查询效率很低.

Table Storage offers a high performance, scalability (via partitioning) and relatively low cost. A primary drawback of Tables that only Partition and Row keys can be indexed - so making queries on values is very inefficient.

最近,Microsoft宣布了一项名为"DocumentDB"的新"NoSQL"服务( http://azure.microsoft.com/zh-CN/documentation/services/documentdb/)

Recently Microsoft announced a new "NoSQL" service, called "DocumentDB" (http://azure.microsoft.com/en-us/documentation/services/documentdb/)

DocumentDB而不是存储属性列表(如Tables一样),而是存储JSON对象.正在对整个对象建立索引-因此可以根据存储对象的每个属性和任何嵌套属性来创建高效的查询.

Instead of storing a list of properties (like Tables do), DocumentDB stores JSON objects. The whole object being indexed - so efficient queries may be created based on every property and any nested property of stored objects.

Microsoft表示DocumentDB也提供了高性能和可伸缩性.

Microsoft says that DocumentDB provides high performance and scalability as well.

如果是这样-为什么有人会在DocumentDB上使用表存储?听起来DocumentDB提供了与Tables相同的功能,但是具有附加功能,例如可以对任何内容建立索引.

If that's so - why anyone would use Table Storage over DocumentDB? It sounds like DocumentDB provides the same functionality as Tables, but with additional capabilities such as the ability to index anything.

如果有人可以在DocumentDB和Table Storage之间进行比较,我会很高兴,并强调每个优点和缺点.

I will glad if someone could make a comparison between DocumentDB and Table Storage, highlighting cons and pros of each one.

推荐答案

两者都是NoSQL技术,但是它们有很大的不同. Azure表是简单的键/值存储,不支持复杂的功能,例如复杂的查询(无论如何,大多数查询都将需要对分区/表进行全面扫描,这会降低性能并节省成本),自定义索引(索引基于仅限于PartitionKey和RowKey,当前您无法在任何其他实体属性上建立索引,并且搜索PartitionKey/RowKey组合以外的其他内容将需要对分区/表进行扫描)或存储过程.您也不能批量读取多个实体的请求(如果所有实体都属于同一个分区,则支持通过批量写入请求).有关Azure Tables的实际应用程序,请参见在这里.

Both are NoSQL technologies, but they are massively different. Azure Tables is a simple Key/Value store and does not support complex functionality like complex queries (most of them will require a full partition/table scan anyway, which will kill your performance and your cost savings), custom indexing (indexing is based on PartitionKey and RowKey only, you currently can't index on any other entity property and searching for anything other than PartitionKey/RowKey combination will require a partition/table scan), or stored procedures. You also can't batch read requests for multiple entities (through batch write requests are supported if all the entities belong to the same partition). For a real-life application of Azure Tables, see HERE.

如果您的数据需求(特别是围绕查询的需求)很简单(如上面的示例中所示),则Azure表提供了您所需要的东西,由于价格,性能和存储容量,您最终可能会倾向于使用DocDB.例如,Azure表性能目标是每秒20.000次操作.尝试在DocDB上获得相同级别的性能,将会大大提高服务成本给你.另外,Azure表受您的Azure存储帐户的容量限制(

If your data needs (particularly around querying them) are simple (like in the example above), then Azure Tables provide what you need, you might end up using that in favor of DocDB due to pricing, performance and storage capacity. For example, Azure Tables performance target is 20.000 operations per second. Trying to get that same level of performance on DocDB will have a significantly higher service cost for you. Also, Azure tables are limited by the capacity of your Azure storage account (500TB), whereas DocDB storage is limited by the capacity units you buy.

这篇关于Microsoft Azure DocumentDB与Azure表存储的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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