Seven Databases in Seven Weeks(一)

这是笔者存在印象笔记里的笔记,比较零散,没整理,按照书中的顺序,就当头脑风暴知识点吧。

后面的待续



《七周七数据库》英文pdf下载地址:http://ishare.iask.sina.com.cn/f/33653299.html

PostgreSQL(关系型)
Riak(键-值型)
HBase(列型)
MongoDB(文档型)
CouchDB(文档型)
Neo4j 图数据库
Reddis(键-值型)

特殊数据库: Solr,Elasticsearch,Doozer

因为KV存储库对资源的要求非常少,所有这种数据库类型在一些场景中有令人难以置信的高性能,但是当你有复杂的查询和聚合需求时,它一般不会有帮助。
Riak:
支持HTTP和REST等WEB方式;
严格实现亚马逊Dynamo原理;
第一个通过mapreduce支持高级查询的数据库

Redis:
提供复杂的数据类型,如有序集合和哈希,基本消息模式,如阻塞队列
写入磁盘钱先写入内存缓存
出现硬件故障的情况下,增加了数据丢失的风险
适合用于缓存非关键数据或作为消息代理


列型数据库:HBase, Cassandra, Hypertable.
在面向列的数据库中,添加列是相当简易的,而且是逐行完成的,在结构方面,列型数据库大约介于关系型数据库和键值存储库之间。

HBase:
这个面向列的数据库与关系模型最为相似,建立在Hadoop(一个mapreduce引擎)之上。

文档型数据库,面向文档的数据库存储的就是文档。

MongoDB
设计目标是支持巨大的数据

CouchDB
设计目标是各种部署场景,从数据中心到桌面,一直到只能手机。
用Erlang编写,具有独特的坚固性,这一点在大部分其他数据库中是缺乏的。

图数据库
Neo4j
(图数据库)好处在于能够快速在节点和关系之间移动,找到相关数据。
经常应用在社交网络中,因灵活性而受到关注。



PostgreSQL

Postgres提供后台服务进程(Backend),完成所有数据处理工作,默认监听5432端口,可以用psql这个命令行工具连接。

关系数据库的关系是因为它的数学基础,不是表通过外键彼此“关联”,这样的限制是否存在并不是关键。

关系查询源于元组关系演算的数学分支,,可以转换为 关系代数

可以在表名后面直接加别名,表名和别名之间的as是可选的
如venues v 或者 venues AS v

内连接, inner join
外连接, outer join, 不论另一张表中是否存在匹配的列值,第一张表的结果总是必须返回。

鱼尾纹实体关系图

INNER JOIN中的INNER并不是必须的,可以省略

索引是一种特殊的数据结构
PostgreSQL自动在主键上创建索引,以主键的列值为索引的键,索引的值指向磁盘上的一行。

对于操作符为小于、大于、等于这样的匹配查询,希望索引比简单的哈希更灵活,如B树索引。


File Size: 1260 KB Print Length: 352 pages Publisher: Pragmatic Bookshelf; 1 edition (January 8, 2013) Sold by: Amazon Digital Services, Inc. Language: English Data is getting bigger and more complex by the day, and so are the choices in handling that data. As a modern application developer you need to understand the emerging field of data management, both RDBMS and NoSQL. Seven Databases in Seven Weeks takes you on a tour of some of the hottest open source databases today. In the tradition of Bruce A. Tate's Seven Languages in Seven Weeks, this book goes beyond your basic tutorial to explore the essential concepts at the core each technology. Redis, Neo4J, CouchDB, MongoDB, HBase, Riak, and Postgres: with each database, you’ll tackle a real-world data problem that highlights the concepts and features that make it shine. You’ll explore the five data models employed by these databases: relational, key/value, columnar, document, and graph. See which kinds of problems are best suited to each, and when to use them. You’ll learn how MongoDB and CouchDB are strikingly different, and discover the Dynamo heritage at the heart of Riak. Make your applications faster with Redis and more connected with Neo4J. Use MapReduce to solve Big Data problems. Build clusters of servers using scalable services like Amazon’s Elastic Compute Cloud (EC2). Understand the tradeoffs between consistency and availability, and when you can use them to your advantage. Use multiple databases in concert to create a platform that’s more than the sum of its parts, or find one that meets all your needs at once. Seven Databases in Seven Weeks will take you on a deep dive into each of the databases, their strengths and weaknesses, and how to choose the ones that fit your needs. What You Need: You’ll need a *nix shell (Mac OSX or Linux preferred, Windows users will need Cygwin), and Java 6 (or greater) and Ruby 1.8.7 (or greater). Each chapter will list the downloads required for that database.
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值