Nosql&redis

Source: Internet
Author: User
Tags cassandra riak neo4j

1. Introduction to NoSQL

NoSQL (not only SQL): It's not just SQL, it's a whole new database concept, referring to a non-relational database, where we used MySQL, Oracle, Microsoft SQL Server, and so on as relational row databases. So why do we need NoSQL? With the rise of internet web2.0 website, the development of non-relational database is rapid, the traditional relational database coping with web2.0 website, especially the web2.0 dynamic website of ultra-large-scale and high-concurrency SNS type, has been overwhelmed, especially the requirement of high concurrency and read-write of database, The need for efficient storage and access to massive databases, high scalability and high availability of databases has greatly increased, making NoSQL a new darling of the Internet.

1.1 Mainstream NoSQL Products

Tolyo cabinet/tyrant, Redis, Voldemort, Berkeley DB, Cassandra, HBase, Riak, Counchdb, MongoDB, neo4j, Infogrid, Infinite Graph

    • Key value (key-value) store database
      • Related products: Tolyo cabinet/tyrant, Redis, Voldemort, Berkeley DB
      • Typical application: Content caching, primarily for high-access workloads that handle large amounts of data
      • Data Model: A series of key-value pairs
      • Advantages: Quick Query
      • Disadvantage: stored data lacks structural
    • Column Store Database
      • Related products: Cassandra, HBase, Riak
      • Typical applications: Distributed File systems
      • Data Model: Store the same column of data together in a clustered type
      • Benefits: Fast Lookup, scalability, and distributed expansion
      • Disadvantage: The relative limitation of function
    • Document Type Database
      • Related products: Counchdb, MongoDB
      • Typical applications: Web applications
      • Data Model: A series of key-value pairs
      • Advantage: Data structure requirements are not strict
      • Disadvantage: Query performance is not high, and the lack of unified query syntax
    • Graphics database
      • Related databases: neo4j, Infogrid, Infinite Graph
      • Typical applications: Social networks
      • Data Model: Graph structure
      • Advantages: Using graph structure correlation algorithm
      • Disadvantage: The whole graph needs to be calculated to produce results, it is not easy to do distributed cluster scheme
1.2NoSQL Features

1. Easy to expand

    • There are many kinds of nosql databases, but a common feature is to remove the relational characteristics of relational databases. There is no relationship between the data, and there is a virtually scalable capability at the architectural level.

2. Large data volume, high performance

    • NoSQL databases have very high read and write performance, especially in the case of large data volumes. Thanks to its independence, the database is simple to structure

3. Flexible Data Model

    • NoSQL can store custom data formats at any time without having to create fields for stored data in advance. In the relational database, adding or deleting fields is a very troublesome thing. If a table with very large amounts of data, adding fields is simply a nightmare.

4. High Availability

    • NoSQL can easily implement a highly available framework without compromising performance. such as the Cassandra,hbase model, high availability can also be achieved by copying the model
2. What is Redis

Redis is an open source high-performance key-value pair (Key-value) database developed in C language, because C language is developed so it is necessary to use GCC to compile this instruction under Linux because it is not guaranteed high performance under Windows operation, currently The key value data types supported by Redis are as follows:

    • String type
    • Hash type
    • List type
    • Collection type
    • Ordered collection types

It's not here. The installation process of Redis requires a virtual machine environment, installation of a Linux system, transmission of the installation package via SSH, decompression, use of the make command to compile, use of make prefix=/installation path/redis install Install because the direct/installation path/redis/bin/redis-server start the execution program will be in the foreground, we can copy the configuration file redis.conf to your/installation path/redis, modify the redis.conf configuration file daemonize fix changed to Yes can turn into back end boot

2.1Redis Instructions for use
    • Start with back-end mode
      • Redis-/bin/redis-server redis.conf
    • View Redis Port Default 6379
      • Ps-ef | Grep-i Redis
    • Force Redis to stop
      • Kill-9 Port number
    • Normal stop
      • CD/Installation path/redis
      • ./BIN/REDIS-CLI shutdown
    • Connecting clients
      • ./bin/redis-cli
    • Input data set username haha
    • Output data Get username
    • Delete Data del username
    • View all key values in the current library keys *

Nosql&redis

Related Article

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.