Deleting Child records / Cascade Delete

I was surprised to find that if I deleted a linked record from the ‘Parent’ side of a relationship that the child record was still present in the other table - but orphaned.

I can see how this behaviour is desirable if the link is set up to allow links to multiple records but in a one to many I would expect the record to be deleted rather than Orphaned.

This is even more the case if the ‘parent record’ is deleted - and I note that in this case the record is orphaned as well.

This leads to a messy database and can be very confusing for users.

Could we have options in the link definition to enable cascade delete and also delete record when link deleted?

4 Likes

Im thinking this will be a ways away. We don’t even have query capability yet.

Airtable absolutely has to have this. Orphaned records aren’t acceptable…neither is asking your user to go in manually and delete child records. I wonder what kind of database underlies airtable. Is it a relational database that isn’t in 1NF?

Well, at least I know it’s an airtable issue and not my being a complete noob at airtable.

So what’s the solution until airtable fixes this? Write an api?

When trying to build something out on airtable over the last few days, and I came across this issue.

I can accept the fact that staff in our company are killing any concept of normal form for a different way to organize data. I see the power in what airtable is.

This lacking cascading deletes is thoroughly surprising and as the OP noted, prone to serious misunderstanding and erroneous data.

EDIT: forgot to mention, why isn’t this an issue for more people (like everyone)? Am I missing something?

1 Like

Could you filter your views by a rollup field to ensure a parent exists as a work-around?

1 Like

Hi Simon,

I am accessing the data via the API. Although, you gave me an idea that solved my immediate problem (not my long term issue). I found the filterByFormula parameter for the API, so I was able to use that to exclude the values that are not deleted.

Ivan

Configuring a view of orphaned records and periodically delete them is not that hard.

@Carlos_Pita - indeed it isn’t - the point is that it shouldn’t be necessary. One should be able to specify cascade delete or prevent delete options when setting up the link.

1 Like