Event trigger for Query tag when db table record is added and deleted

hi
I have a View in DB which is linked to Query tag. I believe its good idea not to trigger it based on time but rather an event - right?
My idea is as follow:
1 When record is added in the table or deleted we need to update the query tag so a trigger will be created in the table to toggle the binary flag kept in other table to True
2 Binary flag is linked via transaction manager to memory tag which will become True
3 Memory Flag will be used as event to trigger query tag expression

Does it sound right?
1 Does storing just one single bit flag in separate table not seem very strange?
2 how to reset the memory flag back to FALSE - as a tag event ? if yes then would it not prevent query tag event from triggering?

@pturmel Would you be so kind to suggest anything?
@bkarabinchak.psi you also helped me in the past :slight_smile:
Regards