2014年4月4日 星期五

大資料資料庫儲存--What is NoSQL(II)

在上一篇大資料資料庫儲存--傳統的解決方案(I)介紹了在傳統在大資料量的解決方法,而前幾年開始熱門的NoSQL又是什麼東西?對於大資料量又有什麼不一樣的解決方式呢?

The CAP Theorem

在聊NoSQL之前有必要先介紹有名的CAP理論。Wiki是這樣說的:
In theoretical computer science, the CAP theorem, also known as Brewer's theorem, states that it is impossible for a distributed computer system to simultaneously provide all three of the following guarantees:[1][2]
  • Consistency (all nodes see the same data at the same time)
  • Availability (a guarantee that every request receives a response about whether it was successful or failed)
  • Partition tolerance (the system continues to operate despite arbitrary message loss or failure of part of the system)
簡單來說就是在一個分散式的系統裡面只可能同時間滿足consistency, availability和partition tolerance中的其二。

What is NoSQL?

 較早之前有人會以為NoSQL就是字面上的意思e.g. 不要SQL。事實上,NoSQL應該被解釋為not only relational database。意思是說有別於關聯式資料庫的資料庫。

NoSQL要解決的是傳統的Relational Database比較難解決(非不能解決)的scalability-尤其是scale-out的方式。當資料量及Request一多的時候怎麼存放這麼多的資料及應付龐大的資料存取問題。而另外一個很大的差別則是schemaless,也就是不像Relational Database在Insert data之前一定要有定義好的schema。


下一篇我們將開始介紹常見的NoSQL

沒有留言: