Incremental computing on the derived variables

Incremental computing [] is important for performance. When the base variables are updated, there is a need to efficiently update the derived varables, rather than simply recalculate them from scratch.

In database systems where views are materialised [], this is called view maintenance.

A view can be maintained immediately, as a part of the transaction that updates the base variables. Immediate maintenance imposes a signi cant overhead on update transactions that cannot be tolerated in many applications.

In contrast, deferred maintenance allows a view to be stale, it is only eventually consistent.

Incremental computation can be achieved by building a dependency graph of all the data elements that may need to be recalculated, and their dependencies.

Literature