Database Reference
In-Depth Information
Clearly every table needs a primary key, but how do you know which tables need foreign
keys as well? In the Invoices database, why did we put an Invoice Number field in the Line
Items table? Why not create a Line Item ID key field in the Line Items table, and put it in the
Invoices table? Wouldn't that accomplish the same thing? At first glance, it might seem like
either method would produce the same relationship. After all, they sure look similar in a pic-
ture ( Figure 5-9 ).
Search WWH ::




Custom Search