This is something we've been discussing at work, and I wonder if there's any formal theory or other approaches we might be missing... It is quite common to have a concept of "state" in a database ...