本文介绍了什么是一些真正的用例使用NoSQL文档存储db?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在过去几天里,我一直在阅读文档并观看特定于Mongo DB的屏幕录像,而当这样的解决方案比典型的pg或mysql环境更好时,我感到很失望。

I have been reading documentation and watching screencasts specific to Mongo DB over the past few days and I am at a loss for when a solution like this would be better than a typical pg or mysql environment.

具体来说,我的问题是在什么情况下(w / use case会不错)你想去nosql路由吗?

Specifically, my question is under what circumstance (w/ use case would be nice) would you want to go the nosql route?

谢谢!

推荐答案


  1. 许多不同的作家。特别是当写入者可能由于网络中的断开而被分段时,并且稍后将需要重新同步已经写入到分叉的两侧的数据。这会打断ACID,虽然你可以解决显式业务逻辑的问题,你现在在NoSQL领域。这在军事情况下是非常常见的,但是每个人都是多产作者的任何系统将在ACID系统上有一些写争用锁。

  1. Many disparate writers. Especially when the writers can get segmented due to disconnections in the network, and will later need to resync data that has been written to on both sides of the bifurcation. This breaks ACID, and while you can solve the problem with explicit business logic, you're now in NoSQL territory. This is very common in military situations, but any system in which everyone is a prolific writer is going to have some write-contention lock on an ACID system.

流体模式。更改传统DB中的模式是一种昂贵的操作,通常需要某种类型的服务器停机时间或其他复杂的过程。对于大多数NoSQL系统,它是微不足道的。因此,如果你有来自许多不同来源的数据要合并和/或有可能想在以后开始跟踪新信息的情况下,NoSQL系统将更容易处理。合并两个数据源,以便它们可以相互绘制图表是我能想到的一个很好的例子。

Fluid schemas. Changing a schema in a traditional DB is an expensive operation that often requires some sort of server downtime or other complicated processes. With most NoSQL systems it's trivial. So if you've got data from a lot of disparate sources to merge and/or have situations where you may want to start tracking new information at a later date, NoSQL systems will be a lot easier to deal with. Merging two data sources so they can be charted with each other is a good example I can think of.

低带宽复制。一旦你打破了ACID,你可以在一个网络图的叶节点上有读者和写者,而部分数据不需要数据库的完整副本。我自己公司的产品,陆军未来的指挥所使用这个。

Low-bandwidth replication. Once you've broken ACID you can have readers and writers on leaf nodes of a network graph with partial data which don't need full replicas of the database. My own company's product, the Army's Command Post of the Future uses this.

数据互操作性。大多数NoSQL数据库允许您在提前知道模式的情况下内省数据,允许不同系统之间的连接更容易实现。

Data interoperability. Most NoSQL databases allow you to introspect the data without knowing the schema ahead of time, allowing connections between disparate systems to happen easier.

大规模扩展。这是最常被辩论的,最常被NoSQL支持者滥用的。如果这是您选择NoSQL的唯一原因,请从MySQL开始,然后缩放。

Massive scaling. This is the one that is most-often debated, and most often abused by NoSQL proponents. If this is the only reason you're choosing NoSQL, start with MySQL instead and scale later.

这篇关于什么是一些真正的用例使用NoSQL文档存储db?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-11 16:41