SQL Standards:
One of the most important developments in the market acceptance of SQL is the
emergence of SQL standards. References to "the SQL standard" usually mean the
official standard adopted by the American National Standards Institute (ANSI) and the
International Standards Organization (ISO). However, there are other important SQL
standards, including the de facto standard SQL defined by IBM's DB2 product family.
The ANSI/ISO Standards:
Work on the official SQL standard began in 1982, when ANSI charged its X3H2
committee with defining a standard relational database language. At first the committee
debated the merits of various proposed database languages. However, as IBM's
commitment to SQL increased and SQL emerged as a de facto standard in the market,
the committee selected SQL as their relational database language and turned their
attention to standardizing it.
The resulting ANSI standard for SQL is largely based on DB2 SQL, although it contains
some major differences from DB2. After several revisions, the standard was officially
adopted as ANSI standard X3.135 in 1986, and as an ISO standard in 1987. The
ANSI/ISO standard has since been adopted as a Federal Information Processing
Standard (FIPS) by the U.S. government. This standard, slightly revised and expanded in
1989, is usually called the "SQL-89" or "SQL1" standard.
Many of the ANSI and ISO standards committee members were representatives from
database vendors who had existing SQL products, each implementing a slightly different
SQL dialect. Like dialects of human languages, the SQL dialects were generally very
similar to one another but were incompatible in their details. In many areas the committee
simply sidestepped these differences by omitting some parts of the language from the
standard and specifying others as "implementor-defined". These decisions allowed
existing SQL implementations to claim broad adherence to the resulting ANSI/ISO
standard but made the standard relatively weak.
To address the holes in the original standard, the ANSI committee continued its work,
and drafts for a new more rigorous SQL2 standard were circulated. Unlike the 1989
standard, the SQL2 drafts specified features considerably beyond those found in current
commercial SQL products. Even more far-reaching changes were proposed for a followon
SQL3 standard. In addition, the draft standards attempted to officially standardize
parts of the SQL language where different "proprietary standards" had long since been
set by the various major DBMS brands. As a result, the proposed SQL2 and SQL3
standards were a good deal more controversial than the initial SQL standard. The SQL2
standard weaved its way through the ANSI approval process and was finally approved in
October, 1992. While the original 1986 standard took less than 100 pages, the SQL2
standard (officially called "SQL-92") takes nearly 600 pages.
The SQL2 standards committee acknowledged the large step from SQL1 to SQL2 by
explicitly creating three levels of SQL2 standards compliance. The lowest compliance
level ("Entry-Level") requires only minimal additional capability beyond the SQL-89
standard. The middle compliance level ("Intermediate-Level") was created as an
achievable major step beyond SQL-89, but one that avoids the most complex and most
system-dependent and DBMS brand-dependent issues. The third compliance level
("Full") requires a full implementation of all SQL2 capabilities. Throughout the 600 pages
of the standard, each description of each feature includes a definition of the specific
aspects of that feature which must be supported in order to achieve Entry, Intermediate,
or Full compliance.
Despite the existence of a SQL2 standard, no commercial SQL product available today
implements all of its features, and no two commercial SQL products support exactly the
same SQL dialect. Moreover, as database vendors introduce new capabilities, they are
expanding their SQL dialects and moving them even further apart. The central core of the
SQL language has become fairly standardized, however. Where it could be done without
hurting existing customers or features, vendors have brought their products into
conformance with the SQL-89 standard, and the same will slowly happen with SQL2. In
the meantime, work continues on standards beyond SQL2. The "SQL3" effort effectively
fragmented into separate standardization efforts and focused on different extensions to
SQL. Some of these, such as stored procedure capabilities, are already found in many
commercial SQL products and pose the same standardization challenges faced by SQL2.
Others, such as proposed object extensions to SQL, are not yet widely available or fully
implemented, but have generated a great deal of controversy. With most vendors far from
fully implementing SQL2 capabilities, and with the diversity of SQL extensions now
available in commercial products, work on SQL3 has taken on less commercial
importance.
The "real" SQL standard, of course, is the SQL implemented in products that are broadly
accepted by the marketplace. For the most part, programmers and users tend to stick
with those parts of the language that are fairly similar across a broad range of products.
The innovation of the database vendors continues to drive the invention of new SQL
capabilities; some products remain years later only for backward compatibility, and some
find commercial success and move into the mainstream.