Jump to content

SQL

From Wikipedia, the free encyclopedia

This is an old revision of this page, as edited by Bryan Derksen (talk | contribs) at 23:50, 7 August 2002 (bypassing C disambiguation). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

SQL stands for Structured Query Language and is a language for use in relational databases. Much of the original SQL features were inspired by tuple relational calculus, but recent extensions to SQL include a more relational algebra flavour.

SQL was originally created by IBM, but many vendors developed dialects of it. It was adopted as a standard by ANSI in 1986 and ISO in 1987.

SQL was revised in 1992, and that version is known as SQL2. It was again revised in 1998 to become SQL3. SQL3 supports objects, which weren't previously supported in other versions, but as of late 2001, few database management systems implement SQL3.

SQL, although defined by both ANSI and ISO, has many variations and extensions, most of which are of a proprietary nature, such as Oracle Corporation's PL/SQL or Sybase and Microsoft's Transact SQL. It is also not uncommon for commercial implementations to omit support for basic features of the standard, such as the DATE or TIME data types, preferring some strange variant of their own.

As the name implies, SQL is designed for a specific, limited purpose -- querying data contained in a relational database. As such, it is a set-based programming language rather than a procedural language such as C or BASIC, which are designed to solve a much broader set of problems. Language extensions such as PL/SQL are designed to address this by adding procedural elements to SQL while maintaining SQL's advantages. Another approach is to allow procedural language code to be embedded in and interact with the database. For example, Oracle and others include Java in the database, while PostgreSQL allows functions to be written in Perl, Tcl, or C, among other languages.

The official pronunciation of SQL is "sequel" (2 syllables) and not S-Q-L (3 syllables). Despite this, many users use the latter pronunciation.

One joke about SQL is that "SQL is neither Structured, nor a Language." This is (in part) founded on the notion that SQL isn't a Turing complete language.

SQL syntax as of August 1992