CHAPTER 3 Managing the Database
DataWindow Designer User’s Guide 53
In the following illustration there is a join on the
dept_id column, which is a
primary key for the
department table and a foreign key for the employee table:
For more information, see “Working with keys” on page 75.
Indexes
An index is a column or set of columns you identify to improve database
performance when searching for data specified by the index. You index a
column that contains information you will need frequently. Primary and
foreign keys are special examples of indexes.
You specify a column or set of columns with unique values as a unique index,
represented by an icon with a single key.
You specify a column or set of columns that has values that are not unique as a
duplicate index, represented by an icon with two file cabinets.
For more information, see “Working with indexes” on page 79.
Database views
If you often select data from the same tables and columns, you can create a
database view of the tables. You give the database view a name, and each time
you refer to it the associated
SELECT command executes to find the data.
Database views are listed in the Objects view of the Database painter and can
be displayed in the Object Layout view, but a database view does not physically
exist in the database in the same way that a table does. Only its definition is
stored in the database, and the view is re-created whenever the definition is
used.
Database administrators often create database views for security purposes. For
example, a database view of an Employee table that is available to users who
are not in Human Resources might show all columns except Salary.
For more information, see “Working with database views” on page 81.