什么是“面向文档” vs. Key-Value在谈论MongoDB和Cassandra时的平均值? [英] What does "Document-oriented" vs. Key-Value mean when talking about MongoDB vs Cassandra?

查看:171
本文介绍了什么是“面向文档” vs. Key-Value在谈论MongoDB和Cassandra时的平均值?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用基于文档的NoSQL选项如何处理KV商店,反之亦然?

What does going with a document based NoSQL option buy you over a KV store, and vice-versa?

推荐答案

键值存储提供了最简单的可能的数据模型,并且正是名称所暗示的:它是一个存储系统,存储由键索引的值。您限制为按键查询,并且值为不透明,商店不知道有关这些商品的任何 。这允许非常快速的读写操作(一个简单的磁盘访问),我认为这个模型是一种非易失性缓存(即,如果你需要快速访问长期数据的密钥)。

A key-value store provides the simplest possible data model and is exactly what the name suggests: it's a storage system that stores values indexed by a key. You're limited to query by key and the values are opaque, the store doesn't know anything about them. This allows very fast read and write operations (a simple disk access) and I see this model as a kind of non volatile cache (i.e. well suited if you need fast accesses by key to long-lived data).

以文档为导向的数据库扩展了以前的模型,并且值以结构化格式(文档,因此名称)数据库可以理解。例如,文档可以是博客帖子评论以非规范化方式存储的代码。由于数据透明,商店可以做更多的工作(如文档的索引字段),并且不限于按键查询。正如我暗示的,这样的数据库允许通过单个查询获取整个页面的数据,非常适合面向内容的应用程序(这就是为什么像Facebook或亚马逊这样的大型网站喜欢它们)。

A document-oriented database extends the previous model and values are stored in a structured format (a document, hence the name) that the database can understand. For example, a document could be a blog post and the comments and the tags stored in a denormalized way. Since the data are transparent, the store can do more work (like indexing fields of the document) and you're not limited to query by key. As I hinted, such databases allows to fetch an entire page's data with a single query and are well suited for content oriented applications (which is why big sites like Facebook or Amazon like them).

其他种类的NoSQL数据库包括面向列的存储器,图形数据库甚至对象数据库

Other kinds of NoSQL databases include column-oriented stores, graph databases and even object databases. But this goes beyond the question.

  • Comparing Document Databases to Key-Value Stores
  • Analysis of the NoSQL Landscape
  • Thinking about NoSQL databases (classification and use cases)

这篇关于什么是“面向文档” vs. Key-Value在谈论MongoDB和Cassandra时的平均值?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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