I have business logic which needs to be notified as soon as data is added, changed or deleted. Are there any approaches available how to do this?
I could restructure my table layout and add a column “deleted” and use a creation and modification date for these purposes, but maybe there is already a listener concept available.
I addition I have find a way how to detect the latest changes, i.e. I cannot iterating over the full database but have to look for changes since the last check. Is it safe to use for this last check a timestamp? I assume not all clocks of all nodes are synchronized, but if I take the granularity of one minute, is it a good idea to query then “all rows deleted after”, “all rows modified after”, "“all rows created after”?