Cascade Delete Action

When you create add a Related Row data type to a table and select the Strict option, it would be awesome if you could also select the type of foreign key constraint or action.

My current understanding is that “Strict” refers only to the data type (format), but is not related to the idea of a foreign key. Maybe you have a checkbox called “Foreign Key” which when checked, enforces the relational integrity by preventing deletes in a Customers table if there are related rows in the Orders table.

But, the main effect I’m looking for is a Cascade Delete action … so that when you delete a row from the Customers table, you could choose to have it delete all related rows from the Orders table. This is actually an example where you would want to prevent deleting (because you may want to preserve order information even if the customer was deleted).

But, the generic example where you want to use cascading delete is when you have an Items table and a Items_Meta table with a one-to-many relationship. When you set up the Related Row in the Items_Meta table, if there is a “Cascading Delete” checkbox, that would be simply awesome. That is not something you can do with a regular spreadsheet without writing macros!

Check out this related post on airtable:

For the Cascade Delete to make sense, you’d also need a way to enforce the uniqueness of a primary key. So maybe there is a “Unique” checkbox option in the Data Type definition for the Primary Key. So, Cascade Delete will only take place if the primary key is unique.

Interesting ideas here. We do plan to enable actions such as this (e.g. cascade delete) but may lean toward doing so as part of our workflow & automation effort: i.e. ability to define a workflow process visually based on certain trigger conditions that can invoke actions such as multi-row deletions. Look forward to connecting on this when we are further along planning this feature set.