Subject Re: [firebird-support] Fast Temporal data in Firebird
Author Paul Vinkenoog
Hi,

> We need to design a system, that keeps past/present/future data based on a time axis.
>
> ie. The system needs to know what price a product will be at times in future, was in time in past, and is currently.
>
> see this link for further details.
>
> http://www.databasejournal.com/features/db2/article.php/3914031/Lets-Do-the-Time-Warp-Temporal-Data-Comes-To-IBM-DB2.htm
>
> I want to know if anyone has attempted to meet this type of requirement in firebird?
>
> The simple way would be to add a TIMESTAMP to the primary key. I don't like this as it would make access of the data inordinately difficult and slow.

It depends. If the historical records outnumber the current records, I'd create a separate history table. Otherwise, keep the history in the main table. In both cases, you need two timestamp fields (for start and end). The end field may be null if you use a single table; the start field (or both fields, in the case of a separate history table) can be part of a unique key.

I must say that this new DB2 feature doesn't strike me as the solution to a burning problem. Sure, it can be practical if you need to develop just that kind of application, but then, should we invent new SQL extensions for everything? Why not also "AS IN" for geographical information, and special syntax for male/female, to name but a few?


Paul Vinkenoog