Referential integrity and cascading deletes

Hi all.
I’d like to connect a notes table to jobs table, so that any job can have multiple notes attached. So far - so good. I have connected the two tables in a one to many relationship and all goes well, but when I delete a parent record that has one or more child records, the parent (job) gets deleted but not the connected child (note) records. Instead of being deleted as I had expected, the attached notes have the connecting field blanked and they remain.

Is there a way to have the dependent child pages automatically deleted when the parent records are deleted as is standard practice with relational databases?

Hey @MarkC! Welcome to the community!

This comes up a bunch espeically with clients who are familiar wtih database architcure. At Tadabase we have a unique way we deal with the relationship and therefore don’t cascade delete records ever.

What we recommend is to filter these notes and manually delete any records that are orphaned. Another option is to soft delete the Job (new field that gets marked as deleted), then create a record rule that will update the connected Notes and mark them as deletable.

Let me know if I can clarify anything further.