MariaDB Temporal Data Tables
mariadb.com
MariaDB Temporal Data Tables
1–10 of 44 posts
Re: MariaDB Temporal Data Tables
#2Re: MariaDB Temporal Data Tables
#3Re: MariaDB Temporal Data Tables
#4Could be nice to see what magic goes on behind the scene in some applications.
For example when you do some clicks in the backend of WordPress and wonder what it actually did to the data.
Re: MariaDB Temporal Data Tables
#5This feature seems to be well fitted to support some of the cases where event sourcing is introduced, I wonder if someone successfully applied event sourcing with use of temporal tables to reduce the amount of work that has to be done in the application code (Akka, etc.).
Re: MariaDB Temporal Data Tables
#6Re: MariaDB Temporal Data Tables
#7From what I'm reading there's still a lot to be fleshed out to be maximally useful to me, but even in its current state I could imagine using this.
— I'd like to have a field property that limits stored values to a single version and thus is automatically cleared whenever the row is updated. This would be useful for inlining change annotations, and for associating a user_id to specific changes.
— I'd like to be able to arbitrarily select the n-1 value of fields regardless of their time period. E.g.
select username, previous(username)
from users
— When viewing a specific version, I'd like to know whether a field's value was supplied in that revision. That's distinct from if the field was changed. I want to know if the value was supplied—even if it was identical to the previous value.— This might be possible already (it's hard to tell) but I'd like to be able to query/join on any revision. For example I might want to ask the question "show me all products that james has ever modified". That could then get more specific, e.g. "show me all products where james changed the price".
Re: MariaDB Temporal Data Tables
#8I really hope Postgres can support temporal table out of the box. Temporal table can simplify development for the feature that need audits.
Re: MariaDB Temporal Data Tables
#9I really hope Postgres can support temporal table out of the box. Temporal table can simplify development for the feature that need audits.
Essentially PostgreSQL has copy-on-write semantics, so historical records exist unless a vacuum marks them as no longer needed and subsequent insert/updates overwrite the values.
In the past when PostgreSQL had the postquel language (before SQL was added) there was special syntax to access data at specific points in time:
This is nicely outlined in "THE IMPLEMENTATION OF POSTGRES" by Michael Stonebraker, Lawrence A. Rowe and Michael Hirohama[1]. Go ahead open the PDF and search for "time travel" or read the quotes below.
> The second benefit of a no-overwrite storage manager is the possibility of time travel. As noted earlier, a user can ask a historical query and POSTGRES will automatically return information from the record valid at the correct time.
Quoting the paper again:
> For example to find the salary of Sam at time T one would query:
retrieve (EMP.salary)
using EMP [T]
where EMP.name = "Sam"
> POSTGRES will automatically find the version of Sam’s record valid at the correct time and get the
appropriate salary.Re: MariaDB Temporal Data Tables
#10I really hope Postgres can support temporal table out of the box. Temporal table can simplify development for the feature that need audits.
[0] https://www.splitgraph.com/product/data-lifecycle/research