The-Inevitable-Event-Centric-Book icon indicating copy to clipboard operation
The-Inevitable-Event-Centric-Book copied to clipboard

Problem: dealing with referential integrity

Open ylorph opened this issue 2 years ago • 0 comments

Triggered by : https://discuss.eventstore.com/t/appending-an-event-to-multiple-streams/4401

Quick thoughts In RDBMS it's handled ( most of the time ) by PK -FK constraints. That's fine as they support and are used mostly in current state only systems. That implementation breaks down though as soon as temporal aspect are added. ( I.e the PK-FK relations will be relaxed , if not removed entirely)

Since Eventsourcing & the database used are temporal by their very intrinsic nature , referential integrity can only be enforced at certain point in time.

Hypothesis: referential integrity is through a process manager and only valid at certain point in time 

referential integrity can only be enforced

Is it enforced though or acted upon ?

  • Enforced : canonical money transfer sample
  • Acted: moving boxes in a warehouse.

=> Enforced: the system is the system of record => Acted: the system keeps records of real world events & might need reconciliation processes

only valid at certain point in time

point or ranges of time ? The integrity may only be necessary between 2 events or at 1 particular event

https://twitter.com/ylorph/status/1568947966618075136

ylorph avatar Sep 11 '22 12:09 ylorph