首页/Home 数据库

 

Lighter, faster!



NoSQL: Cassandra, MongoDB, CouchDB, Redis, Riak, HBase, Membase, Neo4j Print E-mail
Tuesday, 25 October 2011 20:05
While SQL databases are insanely useful tools, their monopoly of ~15 years is coming to an end. And it was just time: I can't even count the things that were forced into relational databases, but never really fitted them.

But the differences between "NoSQL" databases are much bigger than it ever was between one SQL database and another. This means that it is a bigger responsibility on software architects to choose the appropriate one for a project right at the beginning.

In this light, here is a comparison of Cassandra, Mongodb, CouchDB, Redis, Riak, Membase, Neo4j and HBase:

查看全文...
 
mysqldump 使用查询语句 Print E-mail
Monday, 02 August 2010 03:30

命令

mysqldump

用途

部分导出 MySQL 数据内容 / 导出时使用查询语句(with query)

示例

mysqldump --databases X --tables Y --where="1 limit 1000000"

mysqldump --databases X --tables Y -w"1 limit 1000000"
 
悼念萨师煊 Print E-mail
Tuesday, 13 July 2010 20:43

学习过数据库课程的同行们都不会陌生。

sa

查看全文...
 
MySQL常见安装问题及解决(Linux) Print E-mail
Wednesday, 28 April 2010 21:29

../depcomp: line 512: exec: g++: not found

解决方法

yum install -y gcc-c++ 
查看全文...
 
MySQL 按指定字段自定义列表排序 Print E-mail
Thursday, 01 January 2009 12:40

问题描述

大家都知道, MySQL 中按某字段升序排列的 SQL 为 (以 id 为例, 下同):

SELECT * FROM `MyTable` 
WHERE `id` IN (1, 7, 3, 5)
ORDER BY `id` ASC

降序排列的 SQL 为:

SELECT * FROM `MyTable` 
WHERE `id` IN (1, 7, 3, 5)
ORDER BY `id` DESC

有时以上排序并不能满足我们的需求. 例如, 我们想要按 id 以 5, 3, 7, 1 的顺序排列, 该如何实现. 这也是很多国内外同行经常遇到的问题之一.

下面我们给出按表中某字段, 以我们想要的列表方式排序的解决方案.

查看全文...
 
数据库最佳实践 Print E-mail
Sunday, 16 November 2008 02:19

始终要有主键 (Primary Key).

永远不要直接修改模式 (Schema) 如果你还计划对某字段配置更多的模式, 或者你维护着从生产环境分离出来的并行环境.

如果你有一个表每个 "入口" 要插入多个值, 给 "入口" 建立唯一的标识, 不管有没有单独的表存储 "入口".

查看全文...
 
INT(1) Or INT(11) Matters Print E-mail
Monday, 25 August 2008 05:40

I asked several people, even the PHP mailing-list,  about the difference between int(1) and int(11) when creating a MySQL table, The answer is little difference: 1 and 11 (in this case), are used to specify the display width. However, there is a little more.

查看全文...
 
«StartPrevious12NextEnd»

Page 1 of 2