<<Up     Contents

Structured Query Language

Redirected from SQL

Structured Query Language, or SQL, is a programming language for use in quasi-relational databases. Many of the original SQL features were inspired by, but in violation of, tuple 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 SQL-92. It was again revised in 1999 to become SQL:1999 (AKA SQL3). SQL:1999 supports objects, which weren't previously supported in other versions, but as of late 2001, few database management systems implement SQL:1999.

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 variant of their own. As a result in contrast to ANSI C or ANSI Fortran which can usually be ported from platform to platform without major structural changes, SQL code can rarely be ported between database systems without major modifications. Most people in the field believe that this lack of compatibility is intentional in order to force vendor lock-in in database systems.

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.

In their SQL standard, the American National Standards Institute declared that the official pronunciation is "es queue el." However, many database professionals have taken to the "slang" pronunciation sequel,that reflects the language's original name, Sequel, before trademark conflicts caused IBM to perpetrate the current moniker.

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.

Examples

Table 'X' Query Result
Y Z
1 a
2 b
Select * from X
Y Z
1 a
2 b
Y Z
1 a
2 b
Select Y from X
Y
1
2
Y Z
1 a
2 b
Select * from X where Y=1
Y Z
1 a
Given a table X, the query Select * from X will result in all the elements of all the rows of the table being shown.

With the same table, the query Select Y from X will result in the elements from the column Y of all the rows of the table being shown.

With the same table, the query Select * from X where Y=1 will result in all the elements of all the rows where the value of column Y is '1' being shown.

SQL syntax as of August 1992

Database systems using SQL

Glasglow.com

Encyclopedia Search

Add To: LinkarenaAdd To: DiggAdd To: Del.icio.usAdd To: StumbleUponAdd To: YahooAdd To: GoogleAdd To MyspaceAdd To: TwitterAdd To Facebook

Red Sox's Full House Stre
Who Should Pay to Rebuild
Toyota to put hybrid engi
Chinese children "snatche
Data: 63 percent of EU TV
THE FRANKLIN PROPHECY
Chewing gum may help afte
Chinese man again named '
Actor Rip Torn arrested d

Walmart, others cut TV prices
Actor Rip Torn arrested drunk,
Cracking down on TV fake medic
Oscar voters wrestle with best
Reality TV fashion stars find
Cinematographers use tech to b
Pa. man wins ATV in drawing
ATV Adventures offer quad bike
Restaurant owners donate ATV t
How to Purchase and Enjoy ATV
ATV spreading food crops
ATV safety tips
"Complicit" leaves good actors
Fox plans Gordon Ramsay cook-a
"Idol" creator eyes TV version
White House expects digital TV
Danny Boyle wins top director
Meryl Streep wins SAG best act
"60 Minutes" lands hero pilot'
Tom Cruise says grew up wantin
Vatican to get own YouTube cha
Fox eyes more comedies, cancel
Locklear gets probation and fi
John Travolta's Son: Meds Ulti
Spears to 'set the record stra

Guangzhou English ArticlesLanguage as a social conv
Language as a social conv
Language as a social conv
Business English Discussi
Thousands of hyphens peri
Thousands of hyphens peri
Autism gene linked to chi
Autism gene linked to chi
Study takes step toward e
English Lesson No Idioms
Thousands of hyphens perish as
France vintner turns to Intern
Mobiles to have same charging
Asia's shoppers go online as I
Hotmail POP3 From Any Country
S.Korean bio firm says dog clo
Super-rich still want to boldl
Tesco to launch own-brand clot
Human error at Google sends th
Nike CEO sees big jump in onli
Dell plots smartphone foray, e
Japan launches satellites, eye
Challenges loom as Obama seeks
Internet Explorer 7 IE7 And Go
New Yahoo CEO gets $19 million
Heroes tribute odd addition to
Heroes tribute odd addition to
Financial crisis ate your job?
China makes arrests in Interne
LG Display says market hit bot
Previous    Next

Dictionary Search

Trump's "golden" image on tria
Consumers' mood improves sligh
Consumers' mood improves sligh
Consumers' mood improves sligh
Nike CEO sees big jump in onli
Nike CEO sees big jump in onli
U.S. judge says will likely ru
U.S. working to ensure stimulu
Sewage yields more gold than t
Obama pushes economic plan
Jews struggle to come to grips
Pfizer to buy Wyeth for $68 bi
New Yahoo CEO gets $19 million
Financial crisis ate your job?
Almost all U.S. cities to lose
Citi sale could be game-change
Hotel giants seek refuge in ni
Citi breakup in sight after Mo
U.S. arrests wealth manager ac
Chrysler in asset sale talks,
Previous    Next