

















Studia grazie alle numerose risorse presenti su Docsity
Guadagna punti aiutando altri studenti oppure acquistali con un piano Premium
Questa pagina non è visibile nell’anteprima
Non perderti parti importanti!


















Literature
◮ (^) C.S. Jensen, M.D. Soo, and R.T. Snodgrass: Unifying temporal data models via a conceptual model. Information Systems, vol. 19, no. 7, pp. 513-547, 1994.
◮ (^) DS is a set of data structures ◮ (^) QL is a language for querying the data structures
◮ (^) Different time dimensions ◮ (^) Different timestamp types ◮ (^) Attribute versus tuple timestamping
◮ (^) e.g., John has been hired on October 1, 2004 ◮ (^) Valid time captures the time-varying states of the mini-world ◮ (^) All facts have a valid time by definition, however, it might not be recoreded in the database ◮ (^) Valid time is independent of the recording of the fact in a database ◮ (^) Bounded or unbounded
◮ (^) e.g., the fact “John was hired on October 1, 2004” was stored in the DB on October 5, 2004, and has been deleted on March 31, 2005 ◮ (^) Transaction time has a duration: from insertion to deletion, with multiple insertions and deletions being possible for the same fact ◮ (^) As a consequence of this semantics, deletions of facts are purely logical ◮ (^) the fact remains in the database, but ceases to be part of the database’s current state. ◮ (^) Transaction time captures the time-varying states of the database ◮ (^) Always bounded on both ends ◮ (^) Starts when the database is created (nothing was stored before) ◮ (^) Does not extend past now (no facts are known to have been stored in the future) ◮ (^) Basis for supporting accountability and “traceability” requirements, e.g., in financial, medical, legal applications. ◮ (^) May be supplied automatically by the DBMS
◮ (^) Captures some temporal aspect, e.g., valid time, transaction time ◮ (^) Represented as one or more attributes/columns of a relation
◮ (^) Time points ◮ (^) Time intervals ◮ (^) Temporal elements
◮ (^) Tuple timestamping ◮ (^) Attribute timestamping
◮ (^) On 3rd of May, customer C101 rents tape T1234 for three days ◮ (^) On 5th of May, customer C102 rents tape T1245 for 3 days ◮ (^) From 9th to 12th of May, customer C102 rents tape T ◮ (^) From 19th to 20th of May, and again from 21st to 22nd of May, customer C102 rents tape T
3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
(1,C101,T1234) (2,C102,T1245) (3,C102,T1234) (4,C102,T1245)
(5,C102,T1245)
CheckOut SeqNo CustID TapeNum T 1 C101 T1234 [3,5] 2 C102 T1245 [5,7] 3 C102 T1234 [9,12] 4 C102 T1245 [19,20] 5 C102 T1245 [21,22]
◮ (^) Timestamps are atomic values that can be compared using Allen’s 13 basic relationships between intervals (before, meets, during, etc.) ◮ (^) more convenient than comparing the endpoints of the intervals ◮ (^) Multiple tuples are used if a fact is valid over disjoint time intervals ◮ (^) The SeqNo attribute is not needed to distinguish between different tuples. ◮ (^) The most popular model from an implementation perspective ◮ (^) Time intervals are not closed under all set operations ◮ (^) e.g., subtracting [5, 7] from [1, 9] returns a set of intervals {[1, 4], [8, 9]}
◮ (^) The following two relations are considered equivalent, i.e., contain exact the same information CheckOut CustID TapeNum T C101 T1234 [3,5] C102 T1245 [5,7] C102 T1234 [9,12] C102 T1245 [19,20] C102 T1245 [21,22]
CheckOut CustID TapeNum T C101 T1234 [3,5] C102 T1245 [5,7] C102 T1234 [9,12] C102 T1245 [19,22]
◮ (^) The relations are (syntactically) different, but snapshot equivalent, i.e., they contain the same snapshots ◮ (^) Semantically, a point-based view is adopted ◮ (^) Intervals are only used as a convenient representation of (contiguous) sets of time points ◮ (^) Coalescing of relations makes sense ◮ (^) Syntactically different relations are also semantically different ◮ (^) Impossible to distinguish two consecutive 2-day checkouts without an additional attribute
CheckOut CustID TapeNum T C101 T1234 [3,5] C102 T1245 [5,7] ∪ [19,20] ∪ [21,22] C102 T1234 [9,12]
CheckOut CustID TapeNum T C101 T1234 [3,5] C102 T1245 [5,7] ∪ [19,22] C102 T1234 [9,12]
◮ (^) The full history of a fact is stored in one tuple ◮ (^) Point-based and interval-based semantics are possible (as for the interval-based data model) ◮ (^) Under the point-based view, both relations are equivalent
◮ (^) Captures all information about a real-world object in a single tuple ◮ (^) e.g., all information about a customer in the relation below
CheckOut SeqNo CustID TapeNum [3,5] 1 [3,5] C101 [3,5] T [5,7] 2 [5,7] ∪ [9,12] ∪ [19,22] C102 [5,7] ∪ [19,22] T [9,12] 3 [9,12] T [19,20] 4 [21,22] 5 ◮ (^) Information about other objects is spread across several tuples, e.g., information about tapes. ◮ (^) A single tuple may record multiple facts ◮ (^) e.g., the second tuple records the following facts: rental information for customer C102 for the tapes T1245 and T1234, and four different checkouts ◮ (^) Non-first-normal-form data model
◮ (^) Supports valid time and transaction time ◮ (^) Both time domains are linear and discrete ◮ (^) Valid-time domain: DVT = {t 1 , t 2 ,... , tk } ◮ (^) Transaction-time domain: DTT = {t′ 1 , t 2 ′,... , tj } ∪ {UC } ◮ (^) A bitemporal chronon is a pair of a transaction-time chronon and a valid-time chronon ◮ (^) (ti , t′ j ) ∈ DTT × DVT ◮ (^) ”tiny rectangle” in the two-dimensional space ◮ (^) A bitemporal element is a set of bitemporal chronons ◮ (^) Timestamp attribute T with domain of bitemporal elements ◮ (^) Explicit (non-timestamp) attributes ◮ (^) Names: DA = {A 1 ,... , AnA } ◮ (^) BCDM schema: (A 1 , A 2 ,... , An, T ) ◮ (^) BCDM tuple: x = (a 1 , a 2 ,... , an, tb ) ◮ (^) Value-equivalent tuples (tuples with identical explicit attributes) are not allowed ◮ (^) the full history of a fact is contained in a single tuple
(^1) C.S. Jensen, M.D. Soo, and R.T. Snodgrass: Unifying temporal data models via a conceptual model. Information Systems, vol. 19, no. 7, pp. 513-547, 1994.
◮ (^) Employee Jake was hired in the shipping department for the interval from time 10 to time 15. ◮ (^) This fact become current in the database at time 5.
◮ (^) Arrows indicate that the tuple has not yet been deleted
◮ (^) Jake was not in the shipping department, but in the loading department ◮ (^) A new employee Kate is hired for the shipping department for the time from 25 to 30
◮ (^) The fact (Jake,Ship) is removed from the current state, and the fact (Jake,Load) is inserted
dept Emp Dept T Jake Ship {(5,10),... ,(5,15),... ,(9,10),... ,(9,15), (10,5),... ,(10,20),... ,(14,5),... ,(14,20), (15,10),... ,(15,15),... ,(19,10),... ,(19,15) } Jake Load {(UC,10),... ,(UC,15)} Kate Ship {(UC,25),... ,(UC,30)}