2013年10月3日 星期四

5 Redis Data Types

There are 5 Redis data types, String, List, Set, Hash, Sorted Set, and Pub And Sub

 

Redis String

String is the most basic and versatile data type for Redis values

String Commands

image

image

image

image

image

 

Redis List

List is jut a sorted list of strings, sorted by insertion order. Lists can easily act like a queue or stack

List Commands

image

image

image

image

image

image

 

Redis Set

Set contains a collection of unique strings. When using a set, you don’t have to worry about adding the same item twice

image

Good for Union, Intersection actions

Sets Commands

image

image

image

image

 

Redis Hash

Hash is a maps between string fields and string values. A very efficient way to store data.

Hash Commands

image

image

image

image

image

 

Redis Sorted Set

Sorted sets have excellent performance characteristics for adding, removing and updating.

Sorted Set Commands

image

image

image

image

 

Redis Pub And Sub

Redis can be used as a message bus

image

image

image

image

image

image

 

Redis Transactions

Redis has limited support for transactions, no rollback

image

image

image

image

沒有留言:

張貼留言