Cascading deletes

I wonder what the idea is about doing deletes and particular cascading deletes in Karbon?

It seems there’s no “Delete related records in the table when a record is deleted in the other table” in the Kontroller file, how come? Why is there in the data file? I don’t really know the idea behind having relationships in the data file at all are - I’m thinking there should be no relationships there at all?

I’m thinking cascading deletes could be controlled by scripting and data (meta data tables TABLE & TABLERELATION) - is that a concept you could be a supporter of?

If you choose to enforce referential integrity in the model, it should be enforced in the data file. Relationships in the data file are primary relationships between tables, and more closely resembles an ERD.

It’s not appropriate to handle this with cascading deletes in the graph in the Kontroller file, because that graph is designed for transactional processing. That said, if you choose to handle all deletes transactionally, then you would leverage the transactional delete option that’s already supported by Kontroller, and disable cascading deletes in the data file. If you need an audit trail, that would be a good use case for this approach.