Quote
... what happens if we delete an account that might have 25 account rates attached to it? I only see 2 options, either delete all those rates with the account being deleted or leave all the rates with no account name?
If we're talking about foreign key constraints here, then I almost always go with Option #3: Don't allow the account to be deleted! (IIRC, that's the "restrict" option).
If a process really,
really wants to get rid of an account then it should do so from the "bottom up"; get rid of all the things that "hang off" the account, then trash the account itself.
However ...
If there's money involved, I would suggest that actually deleting accounts is
not a Good Idea. Remember that Auditors can walk in at any time and demand to see what trade you've done, with any company, ever! Simply
flagging the account as "deleted" might be a safer option (
and removes any need to delete anything at all!).
Regards, Phill W.