Chinaunix首页 | 论坛 | 博客
  • 博客访问: 90783717
  • 博文数量: 19283
  • 博客积分: 9968
  • 博客等级: 上将
  • 技术积分: 196062
  • 用 户 组: 普通用户
  • 注册时间: 2007-02-07 14:28
文章分类

全部博文(19283)

文章存档

2011年(1)

2009年(125)

2008年(19094)

2007年(63)

分类:

2008-05-21 15:39:30

From PgsqlWiki

Jump to: ,

在以下的表格中,将对一些关系型数据库管理系统的基本信息和技术信息进行对比。请参考以下产品各自的条目以获得更详细的介绍。该表格不可能包罗万象,也许有些信息已过时。除非注明,以下产品为各自的稳定版本,且没有安装任何形式的扩展程序。

 基本信息

维护者 首次发行日期 最新稳定版 软件授权协议
PostgreSQL PostgreSQL Global Development Group June 1989 8.2.4 BSD
4th Dimension 4D s.a.s 1984 2004.5 专有
Adaptive Server Enterprise Sybase 1987 15.0 专有
Apache Derby Apache 2004 10.2.2.0 Apache License
DB2 IBM 1982 9 专有
DBISAM  ? 4.25 专有
ElevateDB  ? 1.01 专有
Firebird Firebird Foundation July 25, 2000 2.0.1 Initial Developer's Public License
Informix IBM 1985 10.0 专有
HSQLDB HSQL Development Group 2001 1.8.0 BSD
H2 H2 Software 2005 1.0 Freeware
Ingres Ingres Corp. 1974 Ingres 2006 II 9.0.4 GPL 与 专有
InterBase CodeGear 1985 2007 专有
MaxDB MySQL AB, SAP AG  ? 7.6 GPL 或 专有
Microsoft SQL Server Microsoft 1989 9.00.3042 (2005 SP2) 专有
MonetDB 2004 4.16 (Feb. 2007)
MySQL MySQL AB 1996年11月 5.0.41 GPL 或 专有
HP NonStop SQL Hewlett-Packard 1987 SQL MX 2.0 专有
Oracle Oracle Corporation 1979年11月 10g Release 2 专有
Oracle Rdb Oracle Corporation 1984 7.2 专有
OpenEdge Progress Software Corporation 1984 10.1B 专有
OpenLink Virtuoso 1998 4.5.3 (April 2006) GPL 或 专有
Pervasive PSQL Pervasive Software  ? 9 专有
Pyrrho DBMS University of Paisley 2005年11月 0.5 专有
SmallSQL SmallSQL April 16 2005 0.12 LGPL
SQL Anywhere Sybase 1992 10.0 专有
SQLite D. Richard Hipp August 17 2000 3.3.7 Public domain
Teradata Teradata 1984 V2R8.2 专有
Valentina Paradigma Software Febrary 1998 3.0.1 专有
维护者 首次发行日期 最新稳定版 软件授权协议

 操作系统支持

这些数据库所能支持的操作系统。

Windows Mac OS X Linux BSD UNIX z/OS 
PostgreSQL
4th Dimension
Adaptive Server Enterprise
Apache Derby 
DB2
Firebird 可能
HSQLDB 
H2  可能
Informix
Ingres 可能
InterBase 是 (Solaris)
Adabas
MaxDB 可能
Microsoft SQL Server
MonetDB
MySQL 可能
Oracle
OpenEdge
OpenLink Virtuoso
Pyrrho DBMS 是 (.NET) 是 (Mono)
SmallSQL
SQL Anywhere
SQLite 可能
Teradata
Valentina
Windows Mac OS X Linux BSD UNIX z/OS 

Open source databases listed as UNIX-compatible will likely compile and run under z/OS's built-in UNIX System Services (USS) subsystem. Most databases listed as Linux-compatible can run alongside z/OS on the same server using Linux on zSeries.

该项受该平台上Java虚拟机的可用性制约。

 基本功能

数据库系统所能实现的基本功能对比。

ACID 关联完整性 数据库事务 Unicode万国码
PostgreSQL
Adaptive Server Enterprise
Apache Derby
DB2
Firebird
HSQLDB
H2
Informix
Ingres
InterBase
MaxDB
Microsoft SQL Server
MonetDB
MySQL 是  是  是 
Oracle
OpenEdge
OpenLink Virtuoso
Pyrrho DBMS
SQL Anywhere
SQLite 否  Basic 
Teradata
Valentina
ACID 关联完整性 数据库事务 Unicode万国码

需要使用InnoDB格式数据表才能实现关联完整性约束与事务。 However, even the InnoDB table type permits storage of values that exceed the data range; some view this as violating the Integrity constraint of ACID.

外联键约束在语法上有效,但实际上并不能得到强制执行,可使用触发器替代。不支持嵌套事务。

 表与视图

临时表 物化视图(Materialized view)
PostgreSQL 否 
Adaptive Server Enterprise 是  
Apache Derby
DB2
Firebird Will be in 2.1 否 (only common views)
HSQLDB
H2
Informix
Ingres Ingres r4
InterBase
MaxDB
Microsoft SQL Server
MonetDB
MySQL 否 
Oracle
OpenEdge
OpenLink Virtuoso
Pyrrho DBMS
SQL Anywhere
SQLite
Teradata
Valentina
临时表 物化视图(Materialized view)

服务器提供临时数据库,可供会话存放公共/私有的临时表。

物化视图可用存储过程和触发器模拟。

物化视图可用PL/pgSQL,PL/Perl,PL/Python或其他过程语言的存储过程和触发器模拟。 .

 索引

数据库所支持的索引类型(除基本的B树外)

R-/R+ tree 哈希 Expression 部分索引(Partial index) 反向索引(Reverse index) 位图索引(Bitmap) GiST GIN
PostgreSQL 是  否 
Adaptive Server Enterprise
Apache Derby
DB2  ?
Firebird 是 
HSQLDB
H2
Informix
Ingres Ingres r4 Ingres r4
InterBase
MaxDB  ?  ?
Microsoft SQL Server  ? 否n/Cluster & fill factor 是  是  是 
MonetDB
MySQL 仅限MyISAM MEMORY, Cluster (NDB), 仅限InnoDB,
Oracle EE edition only Cluster Tables 是 
OpenLink Virtuoso Cluster
Pyrrho DBMS
SQL Anywhere
SQLite
Teradata
Valentina 是  是 
R-/R+ tree 哈希 Expression 部分索引(Partial index) 反向索引(Reverse index) 位图索引(Bitmap) GiST GIN

可通过索引一个经过计算的列,或使用一个已索引的视图实现

可使用索引视图实现。

InnoDB自动按需生成 adaptive hash index

一个有效的PostgreSQL索引可以用来进行倒排序。

PostgreSQL将在8.3中支持保存于磁盘的位图索引。8.2提供了一种称为"内存位图扫描(in-memory bitmap scans)"的相关技术。

在Oracle 8i及以后的办本可使用基于函数的索引(Function-based Indexes)实现。

The users need to use a function from freeAdhocUDF library or similar.

在Valentina中可使用基于函数的索引(Function-based Indexes)实现。

 其他对象

有关其他类型对象的支持情况。

数据域 游标 触发器 函数  存储过程  外部调用 
PostgreSQL
Adaptive Server Enterprise
Apache Derby 是  是  是 
DB2
Firebird
HSQLDB  ?
H2
Informix  ?
Ingres
InterBase
MaxDB  ?
Microsoft SQL Server 是 (2000 and beyond)
MonetDB
MySQL
Oracle
OpenLink Virtuoso
Pyrrho DBMS
SQL Anywhere
SQLite
Teradata
Valentina
数据域 游标 触发器 函数  存储过程  外部调用

以上函数存储过程都是指使用SQL或者过程语言(如PL/SQL、PL/pgSQL等)编写的内部程序调用。外部调用是指使用其他外部语言,如C、Java等语言编写的调用。存储过程是这类调用的笼统称呼,在不同的供应商系统中,它们往往有着不同的定义。
In Derby, users code functions and procedures in Java.

 数据表分区

范围(Range) 哈希(Hash) 混合(范围+哈希) 列表(List)
PostgreSQL 是  是  是  是 
Adaptive Server Enterprise
Apache Derby
IBM DB2
Firebird
Informix  ?  ?
Ingres
InterBase
MaxDB
Microsoft SQL Server
MonetDB 是 (M5) 是 (M5) 是 (M5)
MySQL 是 (5.1 beta) 是 (5.1 beta) 是 (5.1 beta) 是 (5.1 beta)
Oracle
OpenLink Virtuoso
Pyrrho DBMS
SQL Anywhere
SQLite
Teradata
Valentina
范围(Range) 哈希(Hash) 混合(范围+哈希) 列表(List)

PostgreSQL 8.1 提供了使用check约束实现的数据表分区。范围、列表以及哈希分区可通过PL/pgSQL或者其他过程语言模拟。[8]

 数据库与模式(Schemas)

SQL标准明确了SQL模式(SQL schema)的定义,然而,许多数据库对它的实现并不正确。SQL模式是指一个数据库内部的名字空间,此空间内部的对象可以通过成员操作符.访问。

一个完整名字的查询类似这种形式:select * from database.schema.table

The SQL specification makes clear what an "SQL schema" is; however, different databases implement it wrongly. To compound this confusion the functionality can, when wrongly implemented, overlap with that of the parent-database. An SQL schema is simply a namespace within a database, things within this namespace are addressed using the member operator dot ".". This seems to be a universal amongst all of the implementations.

A true fully (database, schema, and table) qualified query is exemplified as such:select * from database.schema.table

Now, the issue, both a schema and a database can be used to isolate one table, "foo" from another like named table "foo". The following is pseudo code:

  • select * from db1.foo vs. select * from db2.foo (no explicit schema between db and table)
  • select * from [db1.]default.foo vs. select * from [db1.]alternate.foo (no explicit db prefix)

The problem that arises is that former MySQL users will mistakenly create multiple databases for one project. In this context MySQL databases are analogous in function to Postgres-schemas, insomuch as Postgres lacks off-the-shelf cross-database functionality that MySQL has. Conversely, Postgres has rightfully applied more of the specification, in a sane-bottom-up approach, implementing cross-table, cross-schema, and then left room for future cross-database functionality.

MySQL aliases behind the scenes, schema with database, such that create schema, and create database are analogs. It can be said, that MySQL therefore, has implemented cross-table functionality, skipped schema functionality entirely and provided similar functionality into their implementation of a database. In summary, Postgres fully supports schemas, but lacks some functionality MySQL has with databases, while MySQL doesn't even attempt to support true schemas.

The end result is spin from both communities. While the Postgres community maintains that one database is all that is needed for one project; and MySQL, that schemas have no legitimate purpose when the functionality can be achieved with databases. Postgres adheres to more of the SQL specification, in a more intuitive fashion (bottom-up), while MySQL's pragmatic counterargument allows their users to get the job done without any major drawback.

外部连接

取自""
阅读(2436) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~