>My question is of normalization:
>
>If I have an Invoices table which is related to a Clients table, is it
>proper to store the Client's name in the invoice table, or the primary
>key from the Client table?
>
>I'v always beleived in storing the primary key. The problem is, you can
>then no longer delete the client record, because you would have a dangling
>reference in the Invoice table.
>
>If you store the client's name, you can at any time remove the client record
>and still know who the invoice was for, but if the client's name changes, you
>have to go through all table and change the name.
>
>Anyone have any thoughts on this?
>
>Thanks
Really, it doesn't make sense to delete a client if you have information for the client in other tables. So, RI is no bad idea.
Save the client name only if you think it will change, and you want the historical information.
Hilmar.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)