Mastering SQL Server 2017
by Milos Radivojevic, Dejan Sarka, William Durkin, Christian Cote, Matija Lah
Allen's interval algebra
The theory for temporal data in a relational model started to evolve more than thirty years ago. I will define quite a few useful Boolean operators and a couple of operators that work on intervals and return an interval. These operators are known as Allen's operators, named after J. F. Allen, who defined a number of them in a 1983 research paper on temporal intervals. All of them are still accepted as valid and needed. A DBMS could help you deal with application times by implementing these operators out of the box.
Let me first introduce the notation I will use. I will work on two intervals, denoted as i1 and i2. The beginning time point of the first interval is b1, and the end is e1; the beginning time point of ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access