Sometimes, your SaaS app has to keep track of every change that was made to a specific resource and support some interesting historical questions on it.
Let's take a more concrete example.
Let's say you're building a HRMS system that have to keep records of employees. As part of the record, you'll maintain the employee-manager relationship. In a large-enough company, there would be frequent reporting changes. Your app has to support these two business requirements:
You need to know who made what changes to what record when asked by an auditor
You need to produce a manager-wise headcount report as of midnight UTC every day. Note that your reporting query might run a few minutes or even a few hours late - however, your headcount report should still be accurate. How do you run the report at 2am UTC while still getting the headcount as of midnight UTC?
As you can imagine, a simple table structure will no longer suffice to be able to handle such scenarios. You need time-traveling capabilities.
Intrigued?
Do watch this SaaS Engineering talk by Vivek, CTO of Everstage on how to use temporal DB techniques to answer these and other similar questions.
If you’d like to attend such talks in the future, please register using this link!