I've been trying to add some constraints to my database to ensure referential integrity. I've got cascading deletes to work, but now I'm trying to restrict a record being deleted if there is a related record in another table. How do I go about specifying this?