User Guide

Table Of Contents
448 Chapter 19: Introduction to Databases and SQL
For example, a table might contain the ID, name, title, and other information for individuals
employed by a company. Each row, called a data record, corresponds to one employee. The value
of a column within a record is referred to as a record field.
The following figure shows an example table, named employees, containing information about
company employees:
The record for employee 4 contains the following field values:
LastName field is “Smith
FirstName field is “John
Title field is “Engineer”
This example uses the EmpID field as the tables primary key field. The primary key contains a
unique identifier to maintain each record's unique identity. Primary keys field can include an
employee ID, part number, or customer number. Typically, you specify which column contains
the primary key when you create a database table.
To access the table to read or modify table data, you use the SQL programming language. For
example, the following SQL statement returns all rows from the table where the department ID
is 3:
SELECT * FROM employees WHERE DEPTID=3
Note: In this chapter, SQL keywords and syntax are always represented by uppercase letters. Table
and column names use mixed uppercase and lowercase letters.
employees table