Java Reference
In-Depth Information
Table 1-4: Inventory Table
Item_Number
Name
Description
Qty
Cost
1002
Rice Krispies
Cereal
97
1.87
1003
Shredded Wheat
Cereal
103
2.05
1004
Oatmeal
Cereal
15
0.98
1005
Chocolate Chip
Cookies
217
1.26
1006
Fig Bar
Cookies
162
1.57
1007
Sugar Cookies
Cookies
276
1.03
1008
Cola
Soda
144
0.61
1009
Lemon
Soda
96
0.57
1010
Orange
Soda
84
0.71
Notice that the Inventory Table includes an Item_Number column, which is the
primary key for this table.
When a customer places an order, two additional tables come into use. The first of
these is the Ordered Items Table, which lists the inventory items and quantities in
each order. This is shown in Table 1-5 .
Table 1-5: Ordered Items Table
ID
Order_Number
Item_Number
Qty
5000
2
1001
2
5001
2
1004
1
5002
2
1005
4
5003
2
1010
6
5004
3
1006
4
5005
3
1009
2
5006
4
1002
5
5007
4
1003
2
5008
5
1006
3
5009
5
1007
1
5010
5
1008
2
Search WWH ::




Custom Search