您的位置:首页 > 数据库

NoSQL 自学指南一之not only sql

2015-09-18 10:24 316 查看

一、前言

大数据的兴起造就了nosql运动,以下省略1w字。。。。。。。。

二、分类

2.1、面向列的有序存储

google bigable

hbase

hypertable

2.2、键值存储

ehcache

membase

cassandra

redis

2.3、文档数据库

MongoDB

2.4、图型数据库

Neo4j

三、Memcache 特性

全运存运转

哈希方式存储

简单文本协议进行数据通信

只操作字符数据

其他类型由应用解析,序列化与反序列化

集群由应用进行控制,采用一致性哈希算法

 安装:

wget http://memcached.org/latest tar -zxvf memcached-1.x.x.tar.gz
cd memcached-1.x.x
./configure && make && make test && sudo make install

启动:memcache -d -p 11212 -u nobody -c 1024 -m128



测试:

telnet localhost 11212

格式:

set <key> <flag> <expires> <byte>



eg: 



基本就是这几条命令了,set 、get 、 delete  、flush_all

Command
Description
Example
get
Reads a value
get mykey
set
Set a key unconditionally
set mykey 0 60 5
add
Add a new key
add newkey 0 60 5
replace
Overwrite existing key
replace key 0 60 5
append
Append data to existing key
append key 0 60 15
prepend
Prepend data to existing key
prepend key 0 60 15
incr
Increments numerical key value by given number
incr mykey 2
decr
Decrements numerical key value by given number
decr mykey 5
delete
Deletes an existing key
delete mykey
flush_all
Invalidate specific items immediately
flush_all
Invalidate all items in n seconds
flush_all 900
stats
Prints general statistics
stats
Prints memory statistics
stats slabs
Prints memory statistics
stats malloc
Print higher level allocation statistics
stats items
stats detail
stats sizes
Resets statistics
stats reset
version
Prints server version.
version
verbosity
Increases log level
verbosity
quit
Terminate telnet session
quit

内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: