SQL is a support language for relational databases, but it's much more. SQL is also the industry standard, which means dozens of vendors produce products-from desktop applications to the largest mainframe systems-that use SQL.
SQL Server, the subject of Chapter 8, is a relational database system that Microsoft distributes. It uses a vendor-specific version of SQL, known as Transact-SQL. SQL Server is not SQL; SQL is a language. If you're unfamiliar with database systems and languages, it can be easy to confuse the two because the names are similar. SQL is a language that almost all relational database systems support. SQL Server is an RDBMS.
SQL is the language of choice for almost every relational database in use today because it provides a standardized method for storing and retrieving data. At this point, you're probably wondering just how one language can speak to so many systems.
A relational or SQL database is composed of tables that store data in a column/row format. Each system tracks these tables by indexing them in a sort of data dictionary or catalog that contains a list of all the tables in the database. The list also stores pointers to each table's location. The dictionary can store additional information as well, such as table definitions and even data specific to the database itself.
Chapter 5 provides more information on relational databases and relational database theory.
When you send a request to the database using SQL, the database locates the requested table in the dictionary-without any additional instructions from you. All you need to do is specify the name of the table, and the database will do the rest. SQL works independently of the internal structure of the database.
The database then processes the request, sometimes called a query-a term you have already run into many times in this book. In generic terms, a query is simply a question. In SQL terms, a query is a structured request to the database. You can think of a query as a type of sentence, with nouns, verbs, clauses, and predicates. For example, let's turn the English request, "Show me all the employees in the Employees table that live in the southwest region," into a query. The subject in this case is the database. The verb is, "show me." The phrase "in the Employees table" is a clause, and "that live in the southwest region" is a predicate. The resulting SQL statement resembles the following:
SELECT * FROM Employees WHERE Region = 'Southwest'
Processing the request usually entails returning data, which, in SQL terms, we call a view. A view can best be defined as a virtual table based on the parameters you passed to the database via your SQL statement.
Chapter 5 includes a short discussion about Dr. E. F. Codd, who began the relational database revolution with his paper on relational database theory. At the time, Dr. Cobb worked for IBM as a researcher. On the strength of this paper, IBM created a new research group known as System/R. This group produced a relational database known as System/R, which eventually evolved into SQL/Data System (SQL/DS) and later DB2.
The support language written for and implemented with this new technology was called Structured English Query Language, or SEQUEL. That's why some developers pronounce SQL as sequel, instead of S-Q-L. You could say they're showing their age, but the truth is, they're exposing their experience. More than likely, these developers have been using SQL for a long time, or they were trained by someone who did. Eventually, the product was named SQL to avoid a legal conflict with another product whose name was pronounced sequel.