Deleting a root element can leave orphaned child elements in the AFDatabase
Please review the KB article. This scenario should not be allowed by the AF software design. It is too easy to do some development work, we hit the delete key on purpose for a parent, but then realize we cannot delete the template afterwards in the GUI (error appears). We need to get SQL access, then call Tech Support to run some careful scripting just to delete an element template that is no longer needed.
for more info on a specific case, see: Case Number: 01078516
The enhancement suggestion is to add code to the next release of AF server to prevent this scenario from occuring.