Data model advice asked for

Thanks. Let’s move this discussion to a new thread at:

I suspect we are highjacking this one.

I have a working piece of code, that updates Title and List values and then decides if the tiddler being updated should also be removed. This logic is generic. In relational database models, we configure cascade deletes in the database foreign keys. With that in mind, I thought then each entity must be configured to support a cascade delete. In my example I previously provided, I think if any list field in an event-role was empty (after an update) it would mean the tiddler should be removed. A role-event tiddler is not valid if the people list field is empty, or if the role list field is empty or the event list field is empty. Therefore, TW filters can be used to determine if a tiddler should be removed. E.g.

[tag[event-role]!has[people]]
[tag[event-role]!has[role]]
[tag[event-role]!has[event]]

The user creates one filter for each rule. So, I can create one or more rules for any given entity. I could do anothers for role, people and events. All the rules get executed, and if any 1 of them becomes true, the tiddler is deleted.

In my app there will be entities like event-role that can be cascade deleted, and others that cannot be by definition.