Initial knowledge of cache database

Source: Internet
Author: User
Tags cassandra riak neo4j couchdb value store

First, the Cache database introduction

NoSQL (NoSQL = not-only sql), meaning "not just SQL", refers to non-relational databases, With the rise of internet web2.0 website, the traditional relational database in coping with web2.0 website, especially the web2.0 pure dynamic website of ultra-large-scale and high-concurrency SNS type, has been unable to overcome, exposing a lot of difficult problems, and the non-relational database has been developed very rapidly because of its own characteristics. NoSQL databases are created to address the challenges of multiple data types in large-scale data sets, especially big data application challenges.

Ii. four types of cached data

1. Key value (key-value) Storage database

This type of database primarily uses a hash table that has a specific key and a pointer to the specific data. The advantage of the Key/value model for IT systems is simplicity and ease of deployment. But if the DBA only queries or updates part of the value, Key/value becomes inefficient. such as: Tokyo cabinet/tyrant, Redis, Voldemort, Oracle BDB. 2. Columnstore DatabaseThis part of the database is often used to deal with massive amounts of data for distributed storage. Keys still exist, but they are characterized by pointing to multiple columns. These columns are arranged by the column family. such as: Cassandra, HBase, Riak. 3. Document-based databaseThe document database is inspired by Lotus Notes Office software and is similar to the first key-value store. This type of data model is a versioned document, and semi-structured documents are stored in a specific format, such as JSON. A document database can be considered an upgraded version of a key-value database, allowing for the nesting of key values. and the document database is more efficient than the key-value database query. such as: CouchDB, MongoDb. Domestic also has the document type database SEQUOIADB, already open source. 4. Graph Database (graph)The graphical structure of the database is different from the other columns and the rigid structure of the SQL database, it is using a flexible graphical model, and can be extended to multiple servers. NoSQL databases do not have a standard query language (SQL), so database queries require a data model. Many NoSQL databases have rest-type data interfaces or query APIs. such as: neo4j, Infogrid, Infinite Graph.  Therefore, we summarize the NoSQL database in the following cases, the comparison is applicable: 1, the data model is relatively simple, 2, the need for more flexible IT systems, 3, the database performance requirements are high, 4, does not require a high degree of data consistency, 5, for a given key, more easily map complex values of the environment. Iii. differences between relational and NoSQL databases 1. Scenarios using a relational database
    The
    • is well-formed and suitable for list scheduling (rows and columns) in a relational database. Typical example: bank account information, customer order information, customer information, employee information, departmental information, etc. Another aspect of the
    • above view is the schema-oriented data model.
    • is important: consider whether the data is inherently transactional. in other words, in the provided transaction context acid semantics, Span class= "TGT" data-group= "2-1" > data is stored, accessed, updated, or can be compromised.
    • Correctness is also important, and any compromises are unacceptable. This stems from the fact that, in most NoSQL databases, consistency is discarded to support performance and scalability.
    • does not have a strong/urgent need to expand the database requirements; scales a database (horizontal scale) linearly to a database of multiple nodes in the cluster. The
    • use case is not used for high-speed data ingestion.
    • If a client application expects to quickly stream large amounts of data to a database, relational databases may not be a good choice because they are not actually designed to write heavy workloads.
    • in order to implement the ACID properties, many additional background work is done in the writer (insert, UPDATE, DELETE) code path. This will certainly affect performance.
    • This use case is not meant to "store large amounts of petabytes of data."

2. Using a NoSQL database:

    • No fixed (and pre-determined) pattern for data
    • Scalability, performance (high throughput and low operational latency), and continuous availability are very important requirements that the database infrastructure needs to meet.
    • The best choice for "high-speed data ingestion". such applications, such as the IoT style, generate millions of data points per second, requiring an extreme write database that provides scalability
    • The intrinsic capabilities of a landscape-scale NoSQL database allow large amounts of data to be stored across commodity servers in a cluster. They typically use low-cost resources, and as demand grows, they can linearly increase computing and storage capacity.

Analysis of four classification forms of 3.NoSQL database
category Examples Example Typical application Scenarios Data Model Advantages Disadvantages
Key value (Key-value) Tokyo cabinet/tyrant, Redis, Voldemort, Oracle BDB Content caching, which is used primarily for high-access loads that handle large amounts of data, for some log systems, and so on. Key-value pairs that point to value, usually with hash table Fast Search Speed Data is unstructured and is usually used only as a string or binary data
Column Store Database Cassandra, HBase, Riak Distributed File Systems To store the same column of data in a clustered type Find Fast, scalable, and easily distributed extensions function relative limitation
Document Type Database CouchDB, MongoDb Web applications (similar to Key-value, value is structured, but the database is able to understand the contents of value) Key-value corresponding key-value pairs, value is structured data Data structure requirements are not strict, table structure is variable, do not need to be like a relational database need to pre-defined table structure Query performance is not high, and the lack of uniform query syntax.
Graph Database (graph) Neo4j, Infogrid, Infinite Graph Social networks, referral systems, and more. Focus on building a relationship map Graph structure Using graph structure correlation algorithm. such as shortest path addressing, N-degree relationship lookup, etc. Many times need to calculate the entire graph to get the information needed, and this structure is not very good for the distributed cluster scheme.

Initial knowledge of cache database

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.