Tables are related by a foreign key

Several tables in the asiqdemo database refer to other tables in the database. For example, in the sales_order table, the sales_rep column indicates which employee is responsible for an order. Only enough information to uniquely identify an employee is kept in the sales_order table. The sales_rep column in the sales_order table is a foreign key to the employee table.

Foreign key

A foreign key is one or more columns that contain candidate key values from another table. (For more about candidate keys, see Chapter 5, “Working with Database Objects” in Sybase IQ System Administration Guide.) Each foreign key relationship in the employee database is represented graphically by an arrow between two tables. You can see these arrows in the diagram of the Sample Database, Figure 1-1 on page 12, in Introduction to Sybase IQ. The arrow starts at the foreign key side of the relationship and points to the candidate key side of the relationship.