NoSQL数据库比较整理-不断更新
四类 NoSQL数据库存储类型:
1. Key-values 存储. 其主要思想是应用哈希表,是一种最简单和最早的应用,适用于一次写入多次读取的场景。
虽然key-value分布式存储具有极高的性能,但是只能做类似于MySQL的SELECT * FROM table WHERE id = 123;简单主键查询。
典型库 | Tokyo Cabinet/Tyrant, Redis, Voldemort, Oracle BDB |
典型应用 | Content caching (Focus on scaling to huge amounts of data, designed to handle massive load), logging, etc. |
数据模型 | collection of Key-Value pairs |
有点 | 快速查询 |
缺点 | 存储的数据没有一个模式 |
2. Column Family Stores.
These were created to store and process very large amounts of data distributed over many machines. There are still keys but they point to multiple columns. The columns are arranged by column family.
Examples | Cassandra, HBase, Riak |
Typical applications | Distributed file systems |
Data model | Columns → column families |
Strengths | Fast lookups, good distributed storage of data |
Weaknesses | Very low-level API |
3. Document Databases. These were inspired by Lotus Notes and are similar to key-value stores. The model is basically versioned documents that are collections of other key-value collections. The semi-structured documents are stored in formats like JSON. Document databases are essentially the next level of Key/value, allowing nested values associated with each key. Document databases support querying more efficiently.
Examples | CouchDB, MongoDb |
Typical applications | Web applications (Similar to Key-Value stores, but the DB knows what the Value is) |
Data model | Collections of Key-Value collections |
Strengths | Tolerant of incomplete data |
Weaknesses | Query performance, no standard query syntax |
4. Graph Databases. Instead of tables of rows and columns and the rigid structure of SQL, a flexible graph model is used which, again, can scale across multiple machines. NoSQL databases do not provide a high-level declarative query language like SQL to avoid overtime in processing. Rather, querying these databases is data-model specific. Many of the NoSQL platforms allow for RESTful interfaces to the data, while other offer query APIs.
Examples | Neo4J, InfoGrid, Infinite Graph |
Typical applications | Social networking, Recommendations (Focus on modeling the structure of data – interconnectivity) |
Data model | “Property Graph” – Nodes |
Strengths | Graph algorithms e.g. shortest path, connectedness, n degree relationships, etc. |
Weaknesses | Has to traverse the entire graph to achieve a definitive answer. Not easy to cluster. |
参考:http://blog.monitis.com/index.php/2011/05/22/picking-the-right-nosql-database-tool/
参考及进一步阅读
NoSQL介绍:
http://kkovacs.eu/cassandra-vs-mongodb-vs-couchdb-vs-redis
- High level的NoSQL介绍 nosql-comparison
- 另一篇NoSQL分析介绍的文章 nosql-if-only-it-was-that-easy/
- NoSQL对比分析 cassandra-vs-mongodb-vs-couchdb-vs-redis
NoSQL性能测试对比: