A time entity represents the moment an event happens, such as a reading from a sensor or a price quote. It must contain only identifier attributes and must participate with minimum cardinality 1. Only one entity in a relationship can be the time entity.
In the translation stage, a relationship with a time entity is translated with the bucket pattern: one document per owner and time window, with an array of events inside. The time entity does not become its own collection; its timestamp is stored on each event.
A bucket can be closed by one of two criteria. The Bucket tutor asks whether data arrives at regular intervals or irregularly and suggests the matching one:
| Criterion | Choose it when | Advantages | Drawbacks |
|---|---|---|---|
| Time interval (month, day, hour, minute) | Data arrives at regular intervals | Predictable bucket size; efficient time-range queries | Sparse buckets if events slow down; uneven fill level across buckets |
| Maximum number of events (50 to 5000) | Data is captured irregularly | Bounded document size; no sparse buckets | Buckets span unpredictable time ranges; time-range queries scan more buckets |