Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Evaluation of multi-chronon valid times #108

Open
bruth opened this issue Mar 21, 2015 · 0 comments
Open

Evaluation of multi-chronon valid times #108

bruth opened this issue Mar 21, 2015 · 0 comments

Comments

@bruth
Copy link
Contributor

bruth commented Mar 21, 2015

In his paper "Temporal Databases"[1], Snodgrass discusses the three ways time can be modeled. He uses the term chronon to denote a unit-less value of time since the resolution (milliseconds, seconds, etc.) is application specific.

  • Discrete chronon - such as a fixed timestamp
  • Chronon interval - two chronons denoting the interval of when a fact was true
  • Chronon set - a set of discrete chronons or intervals in which the fact was true

In Origins fact model, all three of these models can be emulated since there is no technical restriction having more than one entity/attribute/value triple for different valid times. For example, the following is a perfectly valid set of facts (time depicted as a string for readability).

entity attribute value time
joe eats breakfast 8:00 am
joe eats breakfast 9:00 am

These facts can be interpreted in a two ways:

  • Joe eats breakfast at both 8 am and 9 am
  • Joe eats breakfast between 8 am and 9 am

The former is an interpretation of the time for a single chronon model, while the latter represents an interval. If a third fact was included (say at 10 am), we would have a set.

Where a single chronon denotes an discrete time point, an interval denotes a set of chronons that the fact is true (typically due to indeterminacy). A set of chronons can include both intervals and discrete chronon values.

Transaction time can be used to distinguish three models. Below are example depicting each model:

Discrete chronon

  • Qualification: Different transaction times
  • Interpretation: Joe eats breakfast at 8 and 9 am
entity attribute value time tx
joe eats breakfast 8:00 am 1
joe eats breakfast 9:00 am 2

Chronon interval

  • Qualification: Same transaction time
  • Interpretation: Joe eats breakfast between 8 and 9 am
entity attribute value time tx
joe eats breakfast 8:00 am 1
joe eats breakfast 9:00 am 1

Chronon set

  • Qualification: More than one valid set of facts across multiple transactions
  • Interpretation: Joe eats breakfast between 8 and 9 am (interval) or at 10 am (discrete)
entity attribute value time tx
joe eats breakfast 8:00 am 1
joe eats breakfast 9:00 am 1
joe eats breakfast 10:00 am 2

To clarify, non-discrete chronons are only used to convey an indeterminate valid time for a fact. For example, Origins stores information at a millisecond time resolution, but asserting what time Joe eats is likely to be only at a minute time resolution. That means there is indeterminism up to a 60,000 chronons (milliseconds in this case).

Given the following facts we can claim that Joe began eating breakfast at 8 am and stopped eating breakfast at 8:30.

operation entity attribute value time tx
assert joe eats breakfast 8:00 am 1
retract joe eats breakfast 8:30 am 2

If a query looked for all events that occurred at 8:30:20 (8:30 am + 20 seconds), Joe eating would not be included. This is due to the difference in resolution. To account for this the query could specify the resolution of time. For example:

origins facts --since=8:30am --resolution=1min

This translates to an exclusive interval of time (8:29, 8:31).

[1]: Snodgrass, Richard T. Temporal Databases. Department of Computer Science, University of Arizona.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant