This set entered on 5-12-2014
5.2.14.3
connect to MANY JOIN RECORDS, each of which connects to ONE INVOICE. So YOU GET MANY RELATED records in BOTH DIRECTIONS.
TWO FOREIGN KEYS, one from EACH TABLE it is JOINING.
your database already has a REAL TABLE that can act as a JOIN TABLE.
Your database tracks ORDERS for the PRODUCTS YOU SELL. You have a PRODUCTS TABLE (PRIMARY KEY: PRODUCT SKU FIELD) and an ORDERS TABLE (PRIMARY KEY: ORDER NUMBER FIELD).
LINE ITEMS TABLE.
it holds the PRODUCT SKU (FOREIGN KEY), the ORDER NUMBER (FOREIGN KEY), plus other quantitative fields, such as QUANTITY, PRICE, EXTENDED PRICE, etc.
a. Which PRODUCTS were on each order
b. How many
c. At what price.
holds the LINE ITEMS, which are REAL ENTITIES.
by CREATING JOIN TABLES, so that instead of a MANY TO MANY RELATIONSHIP, you have TWO ‘ONE TO MANY’ RELATIONSHIPS.