Why NoSQL?

NoSQL 是为了解决RDBMS的3大问题:

1、可扩展性:比如跨不同机器对数据进行分区的能力。

2、提高性能:在某些情况下,RDBMS的性能比较低。

3、固定的Schema:RDBMS有很多好处(参照完整性,关系,触发器等等),但是强迫你把所有数据存储在一个固定的模式下(Schema)。

基本来说有几种不同类型的NoSQL数据库:

1、Key-Value:如Scalaris, Tokio Cabinet, Voldemort

  store data in key/value pairs: very efficient for performance and higly scalable, but difficult to query and to implement real world problems

2、Tabular:如Cassandra, Hbase, Hypertable, Google Bigtable

  store data in tabular structures, but columns may vary in time and each row may have only a subset of the columns

3、Document-Oriented:如CouchDb, MongoDb, Riak, Amazon SimpleDb

  like Key/Value but they let you nest more values for a key. This is a nice paradigm for programmers as it becomes easy, specially with script languages (Python, Ruby, PHP...), to implement a one to one mapping relation between the code objects and the objects (documents) in the database

4、Graph:如Neo4J, InfoGrid, AllegroGraph

  stores objects and relationships in nodes and edges of a graph. For situations that fit this model, like hierarchical data, this solution can be much much faster than the other ones.

 

MongoDb is a document oriented NoSQL database. With such a database it is very easy to map the programming objects (documents) we want to store to the database. JSON is a very viable standard to do this mapping, and so MongoDb does: it stores JSON documents in the database.

To makes performance better JSON is stored by MongoDb in a efficient binary format called BSON. BSON is a binary serialization of JSON-like documents and stands for Binary JSON.

 

http://www.rackspace.com/blog/nosql-ecosystem/

posted on 2013-08-20 14:12  leungrs  阅读(278)  评论(0编辑  收藏  举报