I understand the technical differences between the different solutions. But I can't seem to find concrete examples of the pros/cons of the different types of NoSQL solutions, and when to use one type over the other.
我理解不同解决方案之间的技术差异。但我似乎找不到不同类型的NoSQL解决方案的优缺点的具体示例,也找不到何时使用一种类型而不是另一种类型。
All of the information I find online gives very vague suggestions of when to use one type vs the other. And they all seem to be able to be interchangeably used without a clear indication of the advantage of using one over the other.
我在网上找到的所有信息都给出了非常模糊的建议,告诉我什么时候应该使用一种类型而不是另一种类型。而且它们似乎都可以互换使用,而不清楚使用其中一种的好处。
2 个解决方案
#1
3
This is an excerpt of a blog post I wrote a while ago.
这是我不久前写的一篇博文的摘录。
Document-oriented
Examples: MongoDB, CouchDB
例子:MongoDB,CouchDB
Strengths: Heterogenous data, working object-oriented, agile development
优势:异构数据,面向对象工作,敏捷开发
Their advantage is that they do not require a consistent data structure. They are useful when your requirements and thus your database layout changes constantly, or when you are dealing with datasets which belong together but still look very differently. When you have a lot of tables with two columns called "key" and "value", then these might be worth looking into.
它们的优点是不需要一致的数据结构。当您的需求和数据库布局不断变化时,或者当您处理属于一起但看起来仍然非常不同的数据集时,它们是有用的。当您有很多表时,有两列叫做“key”和“value”,那么这些表可能是值得研究的。
Graph databases
Examples: Neo4j, GiraffeDB
例子:Neo4j GiraffeDB
Strengths: Data Mining
优点:数据挖掘
Their focus is at defining data by its relation to other data. When you have a lot of tables with primary keys which are the primary keys of two other tables (and maybe some data describing the relation between them), then these might be something for you.
他们的重点是通过数据与其他数据的关系来定义数据。当您有很多主键的表时,它们是另外两个表的主键(可能还有一些描述它们之间关系的数据),那么这些表可能是您需要的。
Key-Value Stores
Examples: Redis, Cassandra, MemcacheDB
例子:复述,卡桑德拉,MemcacheDB
Strengths: Fast lookup of values by known keys
优点:通过已知键快速查找值
They are very simplistic, but that makes them fast and easy to use. When you have no need for stored procedures, constraints, triggers and all those advanced database features and you just want fast storage and retrieval of your data, then those are for you.
它们非常简单,但这使它们快速和易于使用。当您不需要存储过程、约束、触发器和所有这些高级数据库特性时,您只需要快速地存储和检索数据,那么这些都是适合您的。
Unfortunately they assume that you know exactly what you are looking for. You need the profile of User157641? No problem, will only take microseconds. But what when you want the names of all users who are aged between 16 and 24, have "waffles" as their favorite food and logged in in the last 24 hours? Tough luck. When you don't have a definite and unique key for a specific result, you can't get it out of your K-V store that easily.
不幸的是,他们认为你知道你想要的是什么。你需要User157641的资料吗?没问题,只需微秒。但是,当你想要所有年龄在16岁到24岁之间的用户的名字时,有“华夫饼”作为他们最喜欢的食物,并且在过去的24小时内登录了吗?艰难的运气。当您没有一个特定结果的确定的和唯一的键时,您就不能那么容易地将它从K-V存储中取出。
#2
1
There is an excellent article describing the types of nosql databases and when to use what.. read this
有一篇优秀的文章描述了nosql数据库的类型以及何时使用什么。读到这
You will get a good understanding.
你会得到很好的理解。
#1
3
This is an excerpt of a blog post I wrote a while ago.
这是我不久前写的一篇博文的摘录。
Document-oriented
Examples: MongoDB, CouchDB
例子:MongoDB,CouchDB
Strengths: Heterogenous data, working object-oriented, agile development
优势:异构数据,面向对象工作,敏捷开发
Their advantage is that they do not require a consistent data structure. They are useful when your requirements and thus your database layout changes constantly, or when you are dealing with datasets which belong together but still look very differently. When you have a lot of tables with two columns called "key" and "value", then these might be worth looking into.
它们的优点是不需要一致的数据结构。当您的需求和数据库布局不断变化时,或者当您处理属于一起但看起来仍然非常不同的数据集时,它们是有用的。当您有很多表时,有两列叫做“key”和“value”,那么这些表可能是值得研究的。
Graph databases
Examples: Neo4j, GiraffeDB
例子:Neo4j GiraffeDB
Strengths: Data Mining
优点:数据挖掘
Their focus is at defining data by its relation to other data. When you have a lot of tables with primary keys which are the primary keys of two other tables (and maybe some data describing the relation between them), then these might be something for you.
他们的重点是通过数据与其他数据的关系来定义数据。当您有很多主键的表时,它们是另外两个表的主键(可能还有一些描述它们之间关系的数据),那么这些表可能是您需要的。
Key-Value Stores
Examples: Redis, Cassandra, MemcacheDB
例子:复述,卡桑德拉,MemcacheDB
Strengths: Fast lookup of values by known keys
优点:通过已知键快速查找值
They are very simplistic, but that makes them fast and easy to use. When you have no need for stored procedures, constraints, triggers and all those advanced database features and you just want fast storage and retrieval of your data, then those are for you.
它们非常简单,但这使它们快速和易于使用。当您不需要存储过程、约束、触发器和所有这些高级数据库特性时,您只需要快速地存储和检索数据,那么这些都是适合您的。
Unfortunately they assume that you know exactly what you are looking for. You need the profile of User157641? No problem, will only take microseconds. But what when you want the names of all users who are aged between 16 and 24, have "waffles" as their favorite food and logged in in the last 24 hours? Tough luck. When you don't have a definite and unique key for a specific result, you can't get it out of your K-V store that easily.
不幸的是,他们认为你知道你想要的是什么。你需要User157641的资料吗?没问题,只需微秒。但是,当你想要所有年龄在16岁到24岁之间的用户的名字时,有“华夫饼”作为他们最喜欢的食物,并且在过去的24小时内登录了吗?艰难的运气。当您没有一个特定结果的确定的和唯一的键时,您就不能那么容易地将它从K-V存储中取出。
#2
1
There is an excellent article describing the types of nosql databases and when to use what.. read this
有一篇优秀的文章描述了nosql数据库的类型以及何时使用什么。读到这
You will get a good understanding.
你会得到很好的理解。