Using an RDBMS as event sourcing storage

前端 未结 6 1683
灰色年华
灰色年华 2020-12-07 07:02

If I were using an RDBMS (e.g. SQL Server) to store event sourcing data, what might the schema look like?

I\'ve seen a few variations talked about in an abstract sens

6条回答
  •  心在旅途
    2020-12-07 07:47

    Possible hint is design followed by "Slowly Changing Dimension" (type=2) should help you to cover:

    • order of events occurring (via surrogate key)
    • durability of each state (valid from - valid to)

    Left fold function should be also okay to implement, but you need to think of future query complexity.

提交回复
热议问题