What Is SQL?
SQL stands for "Structured Query Language." SQL started out as the query language for the System/R project at IBM's Santa Teresa laboratories in the mid-1970s. System/R was a project that grew out of Ted Codd's pioneering work on relational databases and was the forerunner of DB2. A relational database is a database organized around the table model, where rows correspond to what are commonly called records and columns correspond to fields. The logical model of a relational database is of a collection of tables, with no pointers only key values. The database engine maintains pointers, to be sure, but these pointers are hidden from the developer. Having no explicit pointers and having an ability to dynamically modify its own structure (new tables, rows and even columns can be added at any time) makes a relational database conceptually simple and very flexible.
SQL is a simple database manipulation language built around a small number of statements. WHERE introduces a condition, as in WHERE Inventory < 30. SELECT retrieves data, as in SELECT MachineID FROM MACHINE which retrieves all the values of the column MachineID from the table MACHINE. UPDATE updates data, as in UPDATE MACHINE SET Capacity = 33 WHERE Inventory < 30 which sets the value of Capacity to 33 in all the rows of the table MACHINE where the value of Inventory is less than 30. DELETE deletes data, as in DELETE FROM MACHINE WHERE Inventory < 50, which deletes from the table MACHINE all rows where the value of Inventory is less than 50. In addition, SQL has statements to add or delete columns, to generate totals or sort rows, to join different tables to create a temporary table for query purposes, and to nest queries within queries. Most DBMSs include an interactive SQL processor, so that someone with no programming experiences can query and update a database. Of course, the DBMS also incorporates security safeguards to prevent the inexperienced and adventurous from having free reign of the company data.
The Growth of SQL
SQL's growth from a restricted query language to a full-scale database manipulation language has led to an explosive growth in the number of relational database engines. All of these engines attempt strict adherance to the ever-evolving ANSI/ISO SQL standards, but some engines also differentiate themselves by adding proprietary "improvements." SQL's strengths (flexibility and conceptual simplicity) are the sources of its weaknesses: inflexibility and lack of speed. Pointers buried deep in the inaccessible database structure are unavailable to programmers, and often go unexploited. It is the database engine and not the programmer who decides on an access plan. SQL's stubborn insistence on seeing the world in terms of independent context-free rows and columns makes it difficult to fully take advantage of structures as repeating groups. Still, you can't argue with success. None of the major DBMS vendors have strayed from SQL, and it seems likely to remain with us in its various standard forms for some time to come. Oracle, Ingres, Access, Paradox, Sybase, SQL Server, SQLBase, and other SQL DBMS vendors overwhelmingly dominate the marketplace.
Making SQL More Accessible
Embedded SQL was an early attempt at making SQL accessible from other languages. The programmer would embed SQL statements in his program and a preprocessor would translate them into something the language compiler (usually Cobol but sometimes C) could handle. Embedded SQL is very highly vendor specific, since each vendor supplies different interface functions and no attempt at portability has been made.
Microsoft published the ODBC specification in 1992, ostensibly in response to the call of the SQL Access Group (a vendor group) for a call-level interface to SQL. In 1993 Apple and Microsoft agreed to support ODBC on Windows and Macintosh, in effect ensuring ODBC's status as the standard call-level SQL interface.
Learning SQL
Most DBMS vendors include an introduction to SQL in their documentation. These books are usually well suited to those who are already familiar with the subject. You can also try your local computer bookstore. I have used and like The LAN TIMES Guide to SQL, by James R. Groff and Paul N. Weinberg, Osborne McGraw-Hill, 1994 [3].