PostgreSQL |
PostgreSQL is a free software object-relational database server (database management system), released under a flexible BSD license. It offers an alternative to other open-source database systems (such as MySQL and Firebird (database server)), as well as to proprietary software systems such as Oracle database, Sybase, IBM s DB2 and Microsoft SQL Server. Similar to other open-source projects such as Apache HTTP Server and Linux, PostgreSQL is not controlled by any single company, but relies on a community of global developers and companies to develop it.
PostgreSQL s unusual-looking name gives some readers pause in trying to pronounce it, especially those who pronounce SQL as sequel . PostgreSQL s developers pronounce it post-gress-Q-L . ([http://www.postgresql.org/files/postgresql.mp3 Audio sample], 5.6k MP3). It is also common to hear it abbreviated as simply postgres.
=Features=
==Functions==
Functions allow blocks of code to be executed by the server. Although these blocks can be written in SQL, the lack of basic programming operations such as control flow and looping, has driven the adoption of other languages inside of functions. Some of the languages can even execute inside of triggers. Functions in PostgreSQL can be written in the following languages:
*A built-in language called PL/pgSQL resembles Oracle s procedural language PL/SQL *Scripting languages are supported through [http://www.postgresql.org/docs/current/interactive/plperl.html PL/Perl], [http://plphp.commandprompt.com/ plPHP], [http://www.postgresql.org/docs/current/interactive/plpython.html PL/Python], [http://raa.ruby-lang.org/project/pl-ruby PL/Ruby], [http://developer.postgresql.org/~petere/pgplsh/ PL/sh], and [http://www.postgresql.org/docs/current/interactive/pltcl.html PL/Tcl] *Compiled languages C programming language, C plus plus, or Java (via [http://gborg.postgresql.org/project/pljava/projdisplay.php PL/Java]) *The statistical language R programming language through [http://www.joeconway.com/plr/ PL/R]
Functions can be defined to execute with the privileges of either the caller or the user who defined the function. Functions are sometimes referred to as stored procedures , although there is a slight technical distinction betwen the two.
==Indexes==
User-defined indexes can be created, or the built-in B-tree and R-tree indexes can be used. Indexes in PostgreSQL also support the following features:
*Expressional indexes can be created which index the result of an expression or function, instead of simply the value of a column. *Partial_index, which only index part of a table, can be created by adding a where clause clause to the end of the CREATE INDEX statement. This allows a smaller index to be created. *PostgreSQL is capable of scanning indexes backwards as needed.
==Triggers==
Triggers are fully supported and can be attached to tables and to views. Multiple triggers are fired in alphabetical order. In addition to calling functions written in the native PL/PgSQL, triggers can also invoke languages written in Pl/Perl.
==MVCC==
PostgreSQL manages concurrency through a system known as Multi-Version Concurrency Control (MVCC), which gives each user a snapshot of the database, allowing changes to be made without being visible to other users until a transaction is commited. This largely eliminates the need for read locks, and ensures the database maintains the ACID principles in an efficient manner.
==Rules==
Rules allow the query tree of an incoming query to be rewritten. One common usage is to implement updateable views.
==Data types==
A wide variety of native data types are supported, including: *IP addresses and IPv6 addresses *Classless Inter-Domain Routing blocks, and MAC address data types *Arrays
In addition, users can create their own data types which can usually be made fully indexable via PostgreSQL s GiST infrastructure.
==User-defined objects==
New types of almost all objects inside the database can be created, including:
==Inheritance==
Tables can be set to inherit their characteristics from a parent table. While the data is not shared between the tables, adding a column in the parent table will cause that column to appear in the child table as well. This feature is not fully supported yet -- in particular, table constraints are not currently inheritable.
==Other features==
*Referential integrity constraints including foreign key constraints, column constraints, and row checks *View (database)s *Full, inner, and outer (left and right) join (SQL)s *Sub-select (SQL)s *database transactions *Strong compliance with the SQL:2003 standard *Encrypted connections via Secure Sockets Layer *Binary and textual large-object storage *Online backup *Domains *Tablespaces *Savepoints *Point-in-time recovery
==Add-ons==
*Geographic objects via PostGIS. GPL license. *Full text search via OpenFTS. GPL license. *Several asynchronous master/slave replication packages, including [http://www.slony.info Slony-I] (BSD license) and [http://www.commandprompt.com/products/mammothreplicator Mammoth Replicator] (closed source, max 50 slaves, US$1,000 for one master and one slave).
=History=
PostgreSQL has had a lengthy evolution, starting with the Ingres project at UC Berkeley. The project lead, Michael Stonebraker had left Berkeley to commercialize Ingres in 1982, but eventually returned to academia. After returning to Berkeley in 1985, Stonebraker started a post-Ingres project to address the problems with contemporary database systems that had become increasingly clear during the early 1980s. The code bases of Postgres and Ingres started (and remain) completely separated.
The resulting project, named Postgres, aimed at introducing the minimum number of features needed to add complete support for types. These features included the ability to define types, but also the ability to fully describe relationships – up until this time widely used but maintained entirely by the user. In Postgres the database understood relationships, and could retrieve information in related tables in a natural way using rules .
Starting in 1986 the team released a number of papers describing the basis of the system, and by 1988 the project had a prototype version up and running. The team released version 1 to a small number of users in June 1989, followed by version 2 with a re-written rules system in June 1990. 1991 s version 3 re-wrote the rules system again, but also added support for multiple storage managers and for an improved query engine. By 1993 a huge number of users existed and began to overwhelm the project with requests for support and features. After releasing a Version 4 -- primarily as a cleanup -- the project ended.
Although the Postgres project had officially ended, the BSD license (under which Berkeley had released Postgres) enabled Open Source developers to obtain copies and to develop the system further. In 1994 two University of California, Berkeley graduate students, Andrew Yu and Jolly Chen, added a SQL language interpreter to replace the earlier Ingres-based QUEL system, creating Postgres95. The code was subsequently released to the web to find its own way in the world. 1996 saw a re-naming of the project: in order to reflect the database s new SQL query language, Postgres95 became PostgreSQL.
The first PostgreSQL release formed version 6.0. Subsequently a group of database developers and volunteers from around the world, coordinating via the Internet, have maintained the software. Since version 6.0, many subsequent releases have appeared, and many improvements have occurred in the system; on as of 2005 version 8.0 became the current release.
Although the license allowed for the commercialization of Postgres, the Postgres code did not develop commercially with the same rapidity as Ingres -- somewhat surprisingly considering the advantages Postgres offered. The main offshoot originated when Paula Hawthorn (an original Ingres team member who moved from Ingres) and Michael Stonebraker formed Illustra Information Technologies to commercialize Postgres.
In January 2005, PostgreSQL received its first backing by a database vendor. [http://www.pervasivepostgres.com Pervasive Software], well known for their applications, notably including the [http://www.bizgres.org/ BizGres] project.
In October 2005, John Loiacono, executive vice-president of software at Sun Microsystems, [http://www.computerworld.com.au/index.php/id;116679278;fp;16;fpid;0 commented] that We re not going to OEM Microsoft but we are looking at PostgreSQL right now, although no specifics have yet been released.
=See also=
*List of SQL database management systems *List of object-relational database management systems *Comparison of SQL database management systems *Comparison of object-relational database management systems
=External links=
*[http://www.postgresql.org/docs/faqs.FAQ.html PostgreSQL FAQ] (Frequently Asked Questions) *[http://www.postgresql.org/ PostgreSQL Website] *[http://www.postgresql.org/docs/ PostgreSQL Documentation] *[http://blogs.ittoolbox.com/database/soup/ Database Soup: A PostgreSQL Core Team Member s Blog] *[http://www.varlena.com/varlena/GeneralBits/Tidbits/perf.html Tuning PostgreSQL for performance] *[http://www.powerpostgresql.com/Downloads/annotated_conf_80.html Annotated POSTGRESQL.CONF Guide for PostgreSQL] *[http://sourceforge.net/softwaremap/trove_list.phpform_cat=525 SourceForge PostgreSQL-related projects] *[http://www.pgfoundry.org/ PgFoundry PostgreSQL-related projects] *[http://osdb.org/ Open Source Database Network] *[http://www.databasejournal.com/features/postgresql/ Database Journal articles on PostgreSQL]|
|