Databases Reference
In-Depth Information
CHAPTER 3
THE RELATIONAL
MODEL 2: SQL
LEARNING OBJECTIVES
Objectives
Introduce Structured Query Language (SQL)
Use simple and compound conditions in SQL
Use computed fields in SQL
Use built-in SQL functions
Use subqueries in SQL
Group records in SQL
Join tables using SQL
Perform union operations in SQL
Use SQL to update database data
Use an SQL query to create a table in a database
INTRODUCTION
In this chapter, you will examine the language called SQL (Structured Query Language) . Like Access and Query-By-Example
(QBE), SQL provides users with the capability of querying a relational database. However, in SQL, you must enter commands
to obtain the desired results rather than complete an on-screen form as you do in Access and QBE. SQL uses commands to
create and update tables and to retrieve data from tables. The commands used to retrieve table data are usually called queries.
SQL was developed under the name SEQUEL at the IBM San Jose research facilities as the data manipulation language
for IBM's prototype relational DBMS, System R, in the mid-1970s. In 1980, it was renamed SQL (but still pronounced “sequel,”
although the equally popular pronunciation of “S-Q-L” (“ess-cue-ell”) is used in this topic) to avoid confusion with an unrelated
hardware product called SEQUEL. Most relational DBMSs use a version of SQL as a data manipulation language. SQL is the
standard language for relational database manipulation. The SQL version used in the examples in this chapter is Microsoft
Office Access 2007. Although the various versions of SQL are not identical, the differences are relatively minor. After you have
mastered one version of SQL, you can apply your skills to learn another version of SQL.
 
Search WWH ::




Custom Search