Redis --- 00 overview

1. What is Redis?

  1. Concept:

    It is a key-value storage system written by Salvatore Sanfilippo. Is a typical NoSQL database,

  2. Features:

    ①: The data is stored in memory

    ②: is a key-value structure, the value (value) can be a string (String), hash (Hash), list (list), sets (sets) and sorted sets (sorted sets) and other types

    ③: There are 16 databases by default. The connection uses the 0 database by default, through the select index (database subscript). Example: select 8, select the ninth database.

Second, the data type

  1.String

    ① Brief description:

      A: The String type is binary safe and can store any data, such as jpg pictures or serialized objects;

      B: String type is the most basic data type of Redis. A Redis string value can be up to 512M

    ②Common operations:

      

  2.List

    ① Brief description:

      A: Single-key multi-value; you can add the head (left) or tail (right) of an element guide list in the order of insertion

      B: The bottom layer is actually a doubly linked list

      (From the Internet, invading and deleting)

    ②Common operations:

      

  3.Set

    ①Overview:

      A: Similar to list; the special thing is that set can automatically rearrange weight

      B: It is an unordered collection of string type. The bottom layer is actually a hash table with null value, so the complexity of adding, deleting, and searching are all O (1)

    ②Common operations:

      

  4.Hash

    ① Brief description:

      A: hash is a collection of key-value pairs

      B: Similar to Map <String, Object> in Java

      (Invasion)

    ②Common commands:

      

  5.zset (sorted set)

    ① Brief description:

      A: Very similar to set, it is a collection of strings without repeating elements

      B: The difference is that each member of the ordered set is associated with a score. This score is used to sort the members in the set from the lowest score to the highest score. The members of the collection are unique, but the ratings can be repeated

     ②Common operations:

      

  6. Common commands

      

 

Guess you like

Origin www.cnblogs.com/jenne-blog/p/12688767.html