Specific explanation of NoSQL database usage examples

Source: Internet
Author: User
Tags cassandra neo4j couchdb

First, the basic knowledge of NoSQL

1. About NoSQL

In the word "NoSQL". is actually created by a colleague called Racker, when John Evanseric to organize an event to discuss open source distributed databases.

This is the name and concept.

Some people oppose the NoSQL term because it sounds like we define what we are. To a certain extent, but the long-term is still valuable. Since when a relational database is the only tool you know, each problem looks like a thumb.

NoSQL is about letting people know where other choices are. But we are not opposed to relational databases because when this is really the best tool for work.

One of the real concerns with the NoSQL name is that it is a very large tent. There are very different design spaces. Suppose this is not a result of confusion in the discussion, it's in various products. So I'm going to suggest thinking along three axes very many database options: extensibility, data and query model and persistence design.

Unprecedented data volumes are driving companies to focus on traditional relational database technologies. has served a good alternative for more than 30 years. Overall. These alternatives have been called "NoSQL databases." ”

The fundamental problem is that relational databases cannot handle very much modern workloads. There are three detailed questions: expand to the website like Digg News Review (3TB green badge) or Facebook (search in 50TB Inbox) or ebay (overall 2PB),

Per server performance and rigorous architecture design.

Note: (Digg's concept comes from Digg, USA.) It relies entirely on the true power of the netizens. All the content on the site is published by netizens themselves, and the location of the content is determined by netizens themselves. When the content of the topness, comments, etc. reached a certain number. It is possible that this content will stand out from the multitude of messages.

I recently wrote an email to Cassandra about the resources of the non-relational database. After we commit, there are other non-relational databases at work that we call "the NoSQL movement." ”

2. A simple NoSQL instance

I chose some as the sample NoSQL database. This is not an exhaustive list, but the concept of discussion is also critical to measuring others.

Scalability

Zoom read and copy easy when we are zooming in this area. We mean to write data that scales to multiple machines on their own initiative partition. We call for a system that is not sound. Such a "distributed database."

"This includes cassandra,hbase. Riak,scalaris,voldemort, wait.

Suppose you write volumes or data volumes more than one machine can handle. So these are your only options, assuming you don't want to manually partition management.

There are two things to look at in the distributed database: 1) support for multiple data centers and 2) the transparency of applications that can join new machine onsite clusters.

Second, NoSQL database use

1. NoSQL Data and query model

A non-distributed NoSQL database contains COUCHDB. Mongodb,neo4j,redis. and Tokyo Cabinet.

These can be used as the persistence layer of distributed system; MongoDB offers limited sharing support, making a separate rest room for the COUCHDB project. And Tokyo cabinet can be used as a Voldemort storage engine.

Data and Query models

In NoSQL there are very many different data models and query APIs for databases.

Some highlights:

The columnfamily model Cassandra shared and HBase is made up of Google's bigtable files. The 2nd section describes the revelation of narration. (Cassandra Drop, historical version number, and join the Super column.) In both systems, you have to be accustomed to rows and columns like yours, but sparse rows: each row can have as many or as few columns as needed. and columns do not have to be pre-defined.

The key/value model is the simplest and easiest to implement, but inefficient, and only has interest when you are part of a query or updated value. This is also a more complex structure/value of the hard-to-run distributed ring top.

The document database is basically the next phase of focus/value. Agree that nested values are associated with each key.

The efficiency of a file database to support queries is simpler than returning an entire blob at a time.

NEO4J has a truly unique data model, where objects are stored in graphs and nodes and edge relationships.

For the query to fit this model (e.g.. Hierarchical data), they can be 1000 times times faster than alternatives.

The scalaris is unique. Provides distributed transactions across multiple keys. (The tradeoff between discussion and trade is beyond the scope of this position, but there is another aspect to keep in mind in evaluating distributed systems.) )

Durable design

By continuing the design I mean, "How is the data stored internally?" "The persistence model tells us so much about what kind of workloads these databases can be good at.

The In-memory database is very. Soon (Redis reaches more than 100,000 operations per second on a single computer), but cannot work with datasets that exceed the available RAM. Durability (Preserves data. Even if the server crashes or loses power) it will also be an issue of the amount of data that can be expected to be dashed between losses (copying data to disk) may be large.

Scalaris, other memory databases, on our list. Intent to handle the problem with replication durability, but because it does not support multiple data center data will still be easy to get off the same thing as a power outage.

Memtables and Sstables cache are written in memory (1 "memtable"). The written addition is only a promise for the durability journal.

When writing enough to be accepted memtable sort and write to disk all at once as "sstable."

"This provides near-memory performance because there is no requirement involved. The same time avoids the sheer durability of the problem in the memory method. (This is a concrete description of the document described in Section 5.3 and previously mentioned 5.4 bigtable, as well as the merging tree in the log structure.)

The B-tree has been used to actually be the starting point of time from the database.

Index they provide strong support. But poorly performing spin discs (which are still by far the most cost-effective because of the many) require reading or writing what work.

An interesting variant is the addition of COUCHDB, which simply has a B-tree, which avoids the purpose of managing expenses in limiting Couchdb to write one-time costs.

Conclusion

The NoSQL campaign has exploded over the past 2009 years as more and more companies are grappling with massive amounts of data. The Rackspace Cloud is delighted to play the early role of the NoSQL movement. and continue to devote resources to Cassandra like NoSQL support events.


This paper draws on http://database.51cto.com/art/201004/192283.htm

Specific explanation of NoSQL database usage examples

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.