FileMaker's Edit Relationship dialog offers the option "Delete related records in this table when a record is deleted in the other table". This enforces referential integrity by not permitting orphan child records to remain in the database when a record in the parent table is deleted. This is a great feature and it's great that it is built into the database. Sometimes it's necessary to perform a cascade delete to enforce referential integrity but sometimes the child records must not be deleted and it is necessary to restrict the deletion of the parent record. I wish FileMaker went one step further and added a feature where the user could prevent the deletion of a record on one side of the relationship if related records exist in the other.
What is the best way to restrict the deletion of a parent record if child records already exist? Ideally the solution should be part of the database rather than a script called by a script trigger.