1 Definition
Nosql= not only sql
Philippine relational database
2 need a reason
High concurrent read and write
Efficient storage and access of massive data
High scalability and high availability
3 categories
Four categories of Nosql database
key-value pair
column store
document database
graph database
4 Compare
5 Benefits
Nosql
Easy to expand
Flexible data model
Big data, high performance
High availability
6 basic types
string
list
gather
hash
Sorted collection type
7 Basic Types - Basic Operating Methods
type name |
string |
hash |
list |
set |
zset |
put |
set |
hset |
lset |
sadd |
zadd |
Pick |
get |
hget |
lpush/rpush |
srandmember |
zrank |
delete |
the |
del |
Lrem/rpop |
Srem/sspop |
zrem |
7.1 Basic types - extension methods
method name |
illustrate |
String |
|
incr/incrby |
Increment / specify increase |
Decr/decyby |
Decrement / Specify decrease |
Mset/mget |
Multi- key set / value |
hset |
|
Hmset/hmget |
Multi- key set / value |
hexists |
determine whether there is |
hlen |
length |
list |
|
rpoplpush |
Move elements from one list to another |
lindex |
index |
llen |
length |
set |
|
sdiff |
difference |
sinter |
intersection |
sunion |
union |
zset |
|
zrank |
Get the rank of elements sorted in positive order |
zrevrank |
reverse order |
ZREMRANGEBYSCORE |
Remove elements by range |
Zremrangebyscore |
Remove elements by score |
8 key general operator
Keys *
Keys col_name?
The
Exists 0 does not exist 1 exists
Get
Rename original value new value
Expire sets the expiration time
Ttl remaining timeout
Type key Get the type of the key
9 Persistence implementation
method name |
rdb |
aof |