Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

General-purpose databases that never delete or update data in-place [closed]

I'm very much inspired by the approach to data management advocated by Rich Hickey, and implemented in Datomic, where the data is never mutated in-place, all the versions are always preserved and query-able, and the time is a first-class concept.

Of course, there are specialized databases matching that description, like Git, or any other source control system. The question is if there are any (more or less) general-purpose DBMS-es of relational, graph, hierarchical, document or any other flavor that can be effectively used in, say, an eCommerce Web application. Or is Datomic the only choice then?

like image 684
Ivan Krechetov Avatar asked Nov 22 '12 07:11

Ivan Krechetov


2 Answers

There is an approach to designing systems with an idea of never deleting or mutating data called Event Sourcing. Basically, the idea is to store events (or facts) that change the system state, instead of snapshots of the state. The history of events can be replayed later on to produce a certain purpose-specific projection of what the state at any point in time looked like. Multiple projections built for different purposes can coexist in the system. More information can found on the following web sites:

  • http://martinfowler.com/eaaDev/EventSourcing.html
  • http://codebetter.com/gregyoung/2010/02/20/why-use-event-sourcing/

It's in line with what you are describing, but rather than being just a database model, Event Sourcing and Command Query Responsibility Segregation (CQRS) prescribe a special way of designing the whole system including the database and business logic layers.

There are a few frameworks that follow this approach, such as:

  • http://www.axonframework.org/
  • http://qi4j.org/
  • http://en.jdon.com/

While this does not directly answer your question, it may provide a different perspective on the problem.

like image 72
Anton Beloglazov Avatar answered Sep 19 '22 20:09

Anton Beloglazov


Irmin is a distributed database that follows the same design principles as Git.

like image 35
Dzmitry Lahoda Avatar answered Sep 20 '22 20:09

Dzmitry Lahoda