Database Reference
In-Depth Information
Overview of SQL
The Structured Query Language (SQL) has become the universal language of choice
for DBMS products. A study of this language is therefore imperative for the student of
computer science or computer information systems. This and the next few chapters will
help you acquire a working knowledge of the language, as implemented in the Oracle
environment (Oracle 10G or 11G). One fact you need to be immediately cognizant of is
that there are different implementations of SQL. However, the implementations usually
have more in common than differences; therefore once you have mastered the language
in one DBMS environment, adjusting to another environment is a trivial matter.
The chapter proceeds under the following subheadings:
•
Important Facts
•
Advantages of SQL
•
Summary and Concluding Remarks
10.1 Important Facts
Structure Query Language (SQL) is an example of a DSL — consisting of DDL, DCL, and
DML as defined in chapter 2. First developed by IBM in the 1970s, SQL is the universal
language of databases.
SQL may be described as an interactive query language as well as a database
programming language. Commands can be entered directly at the command prompt,
or embedded in application programs, written in some other language. Examples of
languages that support embedded SQL include COBOL, BASIC, RPG IV, Java, Oracle
PLSQL, Pascal, C++, Visual Basic, FoxPro, etc. The latest set of standards for SQL that is
available for public access is SQL-2007. SQL-2007 is an enhancement of SQL-2003 to
allow for better compatibility with the Extensible Markup Language (XML), and other
refinements. In this text, we essentially concentrate on core SQL statements; these
statements are also consistent with SQL-2003. The standards are updated roughly every
four years. For more information, please see the references listed in section 10.5.
SQL is a non-procedural (descriptive) language that closely mirrors the relational
calculus as discussed in chapter 8; there are also features that mirror the relational
algebra of chapter 7. Although the language was originally introduced by IBM, no
organization has a monopoly on it. Different implementations of SQL have their own
idiosyncrasies and flavors. Some of the major DBMS suites are Oracle, DB2, Informix,
Sybase, Ingres, Delphi, MS SQL Server, and MySQL.