What is temporal data?

In a table with temporal support, the header represents a predicate with at least one time parameter that represents when the rest of the predicate is valid; the complete predicate is therefore a timestamped predicate. Rows represent timestamped propositions, and the row's valid time period is expressed with one of two attributes: since (for semi temporal data) or during (for fully temporal data); the latter attribute is usually represented with two values, from and to. The following table shows the original and two additional timestamped versions of an exemplary Suppliers table:

Original Suppliers table and two tables with temporal support

From the original table header, you can read a predicate saying that a supplier with identification supplierid, named companyname, with a contact contactname, and so on is currently our supplier, or is currently under contract. You pretend that this supplier is the supplier forever. The Suppliers_Since table header has this predicate modified with a time parameter; a supplier with the identification supplierid, named companyname, with a contact contactname, and so on has been under contract since some specific point in time. In the Suppliers_FromTo table, the header has this predicate modified with an even more specific time attribute; a supplier with the ID supplierid, named companyname, with a contact contactname, and so on is (or was, or will be, depending on the current time) under contract from some specific point in time to another point in time.

There is no need to implement semi-temporal tables. You can simply use the maximum possible date and time for the to time point. Therefore, the rest of the chapter focuses on fully temporal data only.

In this section, you will learn about:

  • Types of temporal tables
  • Temporal data algebra
  • Temporal constrains
  • Temporal data implementation in SQL Server before version 2016
  • Optimization of temporal queries
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.189.186.167