Home | Previous Page | Next Page   Appendix A. The stores_demo Database > Primary-Foreign Key Relationships >

The stock and catalog Tables

The stock table and catalog table are joined by two columns: the stock_num column, which stores a stock number for an item, and the manu_code column, which stores a code that identifies the manufacturer. You need both columns to uniquely identify an item. In the catalog table, the stock_num and manu_code columns are foreign keys that reference the stock_num and manu_code columns in the stock table. Figure 10 shows this relationship.

Figure 10. Tables That the stock_num and manu_code Columns Join
begin figure description -- This figure shows data from portions of rows in the catalog table and in the stock table, where the stock_num and manu_code columns in the catalog table are foreign keys that reference the stock_num and manu_code columns in the stock table.  -- end figure description
Home | [ Top of Page | Previous Page | Next Page | Contents | Index ]