I have a normalized app wherein I want to delete a record that potentially is the head of a 4 level deep relational string of records. Is there anyway to "Temporarily" turn on cascade deletes?
I have a normalized app wherein I want to delete a record that potentially is the head of a 4 level deep relational string of records. Is there anyway to "Temporarily" turn on cascade deletes?
sure - go into relationships window and set the relationship accordingly. Do your deletes, then change the relationship back again
Providing the existing data meets the rules it should not be a problem. But I don't understand why you only want to set it temporarily - unless it is to save writing an extra 3 queries - relationships form part of normalisation - or to be more precise help to manage data to ensure it remains normalised.
To big of a risk to enable deletion cascades permanently. Even If I prompt for confirmation, I can almost guarantee the user will accidentally "cut" a wrong record and wipe out an entire group of records. I'm really weary of a backlash if one of the more naive users doesn't understand a confirmation prompt.
What might be worth considering is to gather some information regarding the relational chain and present that information to the user as part of the confirmation prompt. That way, they'll at least be forewarned regarding the magnitude of their request.
This probably isn't the place for an extended discussion regarding application design, so I'll just conclude here by saying the app does have a builtin password capability that is presented to the user in order to run privileged functions. I'll use that as a requirement before allowing the running of a few delete queries when the apps delete function is invoked. Seems that's the best I can do.