Home  >  Article  >  Database  >  What kind of database is redis?

What kind of database is redis?

(*-*)浩
(*-*)浩Original
2019-06-04 14:48:203799browse

Redis is a new, non-relational, does not support SQL syntax, does not support things, || Open source, written in C language, supports the network, is based on memory, can be persisted, and is stored in the form of Key-Value Data, NoSql database.

What kind of database is redis?

Features and advantages

k, v key value storage and data structure storage (such as list, dictionary)

All data (including data storage) operations are completed in memory (recommended learning: Redis video tutorial)

Single-threaded service (this means there will be more blocking situation), using the epoll model for request response, compared with nginx

supports master-slave replication mode, and also provides high-availability master-slave replication mode (Sentinel)

Decentralized distributed cluster

Rich programming interface support, such as Python, Golang, Java, php, Ruby, Lua, Node.js

Rich functions, in addition to supporting a variety of data structures, it also supports transactions and publishing /Subscription, message queue and other functions

Support data persistence (AOF, RDB)

Data types (five types):

String string

The string type is the most basic data storage type in Redis. It is binary safe in Redis, which means that this type can accept data in any format, such as JPEG image data or Json object description information, etc. In Redis, the maximum data length that the string type Value can hold is 512M.

Hash hash

It can be understood that there is first a main key. Under this main key, the data is stored in the form of key-value, and the type of the value is also String

List list

The element type of the list is string, sorted according to the insertion order, and the elements have indexes

set set

The elements are of type string. The elements are unique, not repeated, and have no modification operations.

Ordered set zset

Ordered set, the elements are of type string. The elements are unique. Each element is associated with a double (double precision) type score, which represents the weight. The elements are sorted from left to right by the weight.

For more Redis-related technical articles, please visit the Introduction to Using Redis Database Tutorial column to learn!

The above is the detailed content of What kind of database is redis?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Previous article:What is redis sentry modeNext article:What is redis sentry mode