关系型数据库的 NoSQL 数据库替代方案/模式/等效项
从我在此视频中看到的内容来看...
http://www.youtube.com/watch?v =LhnGarRsKnA
几乎所有传统的 RDBM 操作(JOINS、GROUP BY、HAVING 等)都可以通过 MapReduce/非规范化技术的组合在 NoSQL 数据库中完成。
是否有任何文章/文档清楚地描述了所有这些等效项。就像... NoSQL 数据库中 JOIN 的等价物是... bla bla
我只是在任何地方都找不到这种文档:(
From what I saw in this video...
http://www.youtube.com/watch?v=LhnGarRsKnA
pretty much all the traditional RDBM operations (JOINS, GROUP BY, HAVING, etc) can be done in NoSQL databases through a combination of MapReduce/denormalization techniques.
Is there any article/document that has all these equivalences clearly described. Something like... the equivalence of a JOIN in a NoSQL database would be... bla bla
I just can't find this kind of documentation anywhere :(
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
您找不到此类文档是有原因的。首先,与 SQL 不同的是,不存在标准 NoSQL 数据库之类的东西。您是否尝试过搜索特定的 NoSQL 数据存储?
此外,尝试将关系型操作转换为非关系型系统只会给您带来麻烦。相反,您需要看看您正在尝试对这些关系操作执行什么操作。例如,分组依据是用于对具有类别的列表进行排序或用于在没有多个值字段时处理层次结构对象吗? join 是组合存储在多个表中的单个对象还是计算集合交集?
SQL 的最大优势之一是任何数据都可以用标准方式表示,并且可以对该数据运行任何查询。它不一定最适合该数据,但它是标准的,并且几乎任何问题都有一个正确的答案。 NoSQL 主要是为了能够通过牺牲 SQL 的通用性来优化您的数据存储以满足您的实际需要。这可能是性能、处理大型数据集、处理不一致的数据,或者只是更简单的代码。简而言之,您需要了解您的需求以及针对它们进行优化所涉及的权衡,而不是仅仅默认选择 SQL。
您最好的选择是选择一个适合您需要的数据存储(高级功能的良好比较位于
http://kkovacs.eu/cassandra-vs-mongodb-vs-couchdb -vs-redis )并查找一些如何使用该数据存储设计系统的示例。幸运的话,你会找到与你正在做的事情相近的东西。
There's a reason you can't find that type of documentation. For a start, unlike SQL, there is no such thing as a standard NoSQL database. Have you tried searching for specific NoSQL data stores?
Also, trying to convert relational operations to non relational systems will just get you into trouble. Instead you need to look at what you are trying to do with those relational operations. For example is group by for sorting a list with categories or for handling heirarchical objects when you don't have multiple value fields? Is join assembling a single object stored in multiple tables or calculating a set intersection?
One of the biggest strengths of SQL is that any data can be represented in a standard way and any query can be run on that data. It won't necessarily be the best fit for that data, but it is standard and there is a single correct answer for almost any question. NoSQL is mostly about being able to optimize your data store for what you actually need by sacrificing the generality of SQL. That may be performance, handling a large dataset, handling inconsistent data, or just simpler code. In short you need to understand your requirements and the tradeoffs involved in optimizing for them rather than just choosing SQL by default.
Your best option is to pick a datastore that fits what you need (a good comparison of high level features is at
http://kkovacs.eu/cassandra-vs-mongodb-vs-couchdb-vs-redis ) and look for some examples of how systems are designed using that data store. With luck you will find something close to what you are working on.
这篇文章提供了一些关于 NoSQL 与使用 SQL 的好信息
http://www.develop.com/mongoDB
This article has a some good info on NoSQL vs using SQL
http://www.develop.com/mongoDB
要非常小心...您可能不想将 1 万亿行的表与某些内容连接起来。考虑数据分区的模式。例如,使用 playOrm,您可以对数据进行分区并执行 S-SQL(可扩展 SQL),这样您就可以在分区内执行您想要的所有联接,这在许多 OLTP 应用程序中正是您所需要的,就好像您的客户是企业一样,每个企业位于它自己的分区中,您可以连接所有与该业务相关的所有表。
Be very careful... you probably don't want to join a 1 trillion row table with something. Think about patterns of partitioning your data. For example with playOrm you can partition your data and do S-SQL(Scalable SQL) so you can do all the joins you want to within a partition which in many OLTP apps is exactly what you need as if your customers are businesses, each business is in it's own partition and you can join all you want all the tables related to that one business.
这里有一个模式列表,可以帮助您在 noSql 世界中取得进展......(这是一项正在进行的工作)。
https://github.com/deanhiller/playorm/wiki/Patterns-Page
Here is a list of patterns to help you gain ground in the noSql world....(it's a work in progress).
https://github.com/deanhiller/playorm/wiki/Patterns-Page