目 录
1NoSQL 简述.................................................................................................................................. 4
2MongoDB 简介............................................................................................................................. 4
3 术语介绍..................................................................................................................................... 5
4MongoDB 资源消耗..................................................................................................................... 6
5 交互式 shell................................................................................................................................. 6
6 一般功能..................................................................................................................................... 7
6.1 插入.................................................................................................................................. 7
6.2 查询.................................................................................................................................. 7
6.3 删除.................................................................................................................................. 8
6.4 索引.................................................................................................................................. 8
6.5map/reduce....................................................................................................................... 8
7 模式设计..................................................................................................................................... 8
8 嵌入与引用................................................................................................................................. 9
9GridFS......................................................................................................................................... 11
9.1GridFS 表示的对象信息.................................................................................................. 12
9.2GridFS 管理...................................................................................................................... 13
10Replica&on(复制)................................................................................................................ 13
10.1master-slave 模式.......................................................................................................... 13
10.2replica pairs 模式........................................................................................................... 14
10.3 受限的 master-master 复制.......................................................................................... 14
11Sharding(分片).................................................................................................................... 15
11.1sharding 介绍................................................................................................................. 15
11.2sharding 的配置和管理................................................................................................. 16
12Java API 简介............................................................................................................................ 16
13MongoDB 实例分析................................................................................................................. 17
13.1 图片保存在文件系统中............................................................................................... 18
13.2 图片保存在数据库中................................................................................................... 20
14MongoDB 常用 API 总结........................................................................................................... 24
15Redis 简介................................................................................................................................ 27
15.1Redis 特性...................................................................................................................... 28
16Redis 数据类型......................................................................................................................... 29
16.1String 类型..................................................................................................................... 29
16.2List 类型......................................................................................................................... 29
16.3Set 类型......................................................................................................................... 30
16.4ZSet 类型....................................................................................................................... 30
16.5Hash 类型...................................................................................................................... 30
17All data in memory, but saved on disk....................................................................................... 30
18Redis 的 Master-Slave 模式....................................................................................................... 31
19Redis 虚拟内存管理................................................................................................................. 32
20Redis 实例分析......................................................................................................................... 32
21Redis 命令总结......................................................................................................................... 33