SPATIO-TEMPORAL DATABASES Temporal Databases. Temporal Data. Modeling Temporal Data Temporal Semantics Temporal density: the time is seen as being: 

Slides:



Advertisements
Similar presentations
History Data Service1 Good Design for Historical source based Databases History Data Service Hamish James.
Advertisements

From Handbook of Temporal Reasoning in Artificial Intelligence By Jan Chomicki & David Toman Temporal Databases Presented by Leila Jalali CS224 presentation.
Temporal Databases S. Srinivasa Rao April 12, 2007
Chapter 3 : Relational Model
1 3D_XML A three-Dimensional XML-based Model Khadija Ali, Jaroslav Pokorný Czech Technical University Prague - Czech Republic.
©Silberschatz, Korth and Sudarshan4.1Database System Concepts Lecture-1 Database system,CSE-313, P.B. Dr. M. A. Kashem Associate. Professor. CSE, DUET,
BCDM Temporal Domains - Time is linear and totally ordered - Chronons are the basic time unit - Time domains are isomorphic to subsets of the domain of.
Advanced Databases Temporal Databases Dr Theodoros Manavis
Temporal and Real-Time Databases: A Survey by Gultekin Ozsoyoglu and Richard T. Snodgrass Presentation by Didi Yao.
Time in Databases CSCI 6442 With thanks to Richard Snodgrass, 1985 ACM /85/005/0236.
Multiversion Access Methods - Temporal Indexing. Basics A data structure is called : Ephemeral: updates create a new version and the old version cannot.
SPATIO-TEMPORAL DATABASES
Temporal Indexing Snapshot Index. Transaction Time Environment Assume that when an event occurs in the real world it is inserted in the DB A timestamp.
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 3 The Basic (Flat) Relational Model.
SPATIO-TEMPORAL DATABASES Intro. “Space by itself, and time by itself, are doomed to fade away into mere shadows, and only a kind union of the two will.
CS240A: Databases and Knowledge Bases Time Ontology and Representations Carlo Zaniolo Department of Computer Science University of California, Los Angeles.
Spatio-Temporal Databases
Temporal Databases. Outline Spatial Databases Indexing, Query processing Temporal Databases Spatio-temporal ….
Spatio-Temporal Databases. Outline Spatial Databases Temporal Databases Spatio-temporal Databases Multimedia Databases …..
Temporal Indexing MVBT. Temporal Indexing Transaction time databases : update the last version, query all versions Queries: “Find all employees that worked.
CS240A: Databases and Knowledge Bases A Taxonomy of Temporal DBs Carlo Zaniolo Department of Computer Science University of California, Los Angeles.
Temporal Databases. Outline Spatial Databases Indexing, Query processing Temporal Databases Spatio-temporal ….
Time Chapter 10 © Worboys and Duckham (2004)
CHAPTER 3 COLLECTIONS SET Collection. 2 Abstract Data Types A data type consists of a set of values or elements, called its domain, and a set of operators.
Chapter 1 An Overview of Database Management. 1-2 Topics in this Chapter What is a Database System? What is a Database? Why Database? Data Independence.
CS240A: Databases and Knowledge Bases Time Ontology and Representations Carlo Zaniolo Department of Computer Science University of California, Los Angeles.
IST Databases and DBMSs Todd S. Bacastow January 2005.
INTRODUCTION TO DATABASE USING MS ACCESS 2013 PART 2 NOVEMBER 4, 2014.
CS370 Spring 2007 CS 370 Database Systems Lecture 2 Overview of Database Systems.
11 1 Object oriented DB (not in book) Database Systems: Design, Implementation, & Management, 6 th Edition, Rob & Coronel Learning objectives: What.
Concepts and Terminology Introduction to Database.
THE RELATIONAL DATA MODEL CHAPTER 3 (6/E) CHAPTER 5 (5/E) 1.
Architecture for a Database System
Recent research : Temporal databases N. L. Sarda
© 2007 by Prentice Hall 1 Introduction to databases.
The protection of the DB against intentional or unintentional threats using computer-based or non- computer-based controls. Database Security – Part 2.
Lecture2: Database Environment Prepared by L. Nouf Almujally & Aisha AlArfaj 1 Ref. Chapter2 College of Computer and Information Sciences - Information.
Copyright © 2010 Pearson Education, Inc. All rights reserved Sec
9/7/2012ISC329 Isabelle Bichindaritz1 The Relational Database Model.
Geographic Information Systems Temporal GIS Lecture 8 Eng. Osama Dawoud.
Now, please open your book to page 60, and let’s talk about chapter 9: How Data is Stored.
INFO1408 Database Design Concepts Week 15: Introduction to Database Management Systems.
1 CS 430 Database Theory Winter 2005 Lecture 4: Relational Model.
CSE314 Database Systems Lecture 3 The Relational Data Model and Relational Database Constraints Doç. Dr. Mehmet Göktürk src: Elmasri & Navanthe 6E Pearson.
Mr.Prasad Sawant, MIT Pune India Introduction to DBMS.
Temporal Databases. Outline Spatial Databases Indexing, Query processing Temporal Databases Spatio-temporal ….
Temporal Data Modeling
Data The fact and figures that can be recorded in system and that have some special meaning assigned to it. Eg- Data of a customer like name, telephone.
CPT-S Advanced Databases 11 Yinghui Wu EME 49.
LECTURE TWO Introduction to Databases: Data models Relational database concepts Introduction to DDL & DML.
SPECIAL PURPOSE DATABASES 13/09/ Temporal Database Concepts  Time is considered ordered sequence of points in some granularity Use the term choronon.
Databases and DBMSs Todd S. Bacastow January
A Generalized Modeling Framework for Schema Versioning Support
Temporal Indexing MVBT.
Accomplished by: Usmanova g.
Chapter 2 Database Environment Pearson Education © 2009.
Chapter 2 Database Environment.
Chap 2: A Prelude to Parametric Data
Spatio-Temporal Databases
Temporal Databases.
Temporal Databases.
Data Model.
Graphs, Linear Equations, and Functions
Introduction to Data Structures
John Barnden Professor of Artificial Intelligence
Author: Miran Miklič Comparison and advantages of the Bitemporal and Temporal databases over Tuple-versioning (point-in-time) database.
Chapter 2 Database Environment Pearson Education © 2009.
CS240A: Databases and Knowledge Bases A Taxonomy of Temporal DBs
INTRODUCTION A Database system is basically a computer based record keeping system. The collection of data, usually referred to as the database, contains.
Unit – V Data Controls.
Presentation transcript:

SPATIO-TEMPORAL DATABASES Temporal Databases

Temporal Data. Modeling Temporal Data Temporal Semantics Temporal density: the time is seen as being:  discrete,  dense or  continuous [BM+98]. This feature is determined by the isomorphism established between the temporal domain and the set of natural (N), rational (Q), or real (R) numbers. In modeling time as a discrete domain, each time instance has a successor and a predecessor, and the time intervals are composed of contiguous points, where t i+1 is the successor of t i. From a mathematical point of view, if the temporal axis is represented as Q or R,, between two time instances there is an infinity of other instances.

Time structure: most of the applications consider time as being linear (naturally, as a collection, partially or totally ordered, of temporal primitives), but it can also be modeled as periodic or cyclic (e.g. schedule), or branched (e.g. planning applications). Time instance: one point on a temporal axis, one moment of time. Time interval: time between two instances of time, given as the set of contiguous time instances. Time data types: a time value associated with an item is represented as a point (time instance) or interval. Period (or duration) of time: a quantitative property of a time interval; the length of a time interval for which the ends are not known.

Valid time: the time (point or interval) associated with an item or the lifespan of an object in modeled reality; it can have any value in the past or future and can be modified anytime and any times in the database. Transactional time: the time (point or interval) which defines the lifespan of an item within the database (from insertion to logical removal); it may have a value not greater than the current time and its value can not be modified; it is used mainly to track the operations performed on the DB, as a log file. User-defined time: is a value of time (generally, time instance) whose meaning is determined by the human factor (user of the application or data model designer). Decisional time is a particular case of user- defined time, meaning the time when a particular decision has been taken in some organization. Example: changing the salary for an employee: E, 100, [1/1/2009, 31/3/2009] = valid time, [20/12/2008, UC] = transactional time, 15/12/2008 = decisional time.

Timestamp: a value of time (point or interval) associated to an object, attribute or relationship; it can be of type valid or transactional. Absolute time: an independent timestamp, it does not depend on the timestamp of another item or on the present time. Relative time: the timestamp is depending on another moment of time, like the timestamp of another item or the current time.

Event: something that is happening somewhere, at a moment in time, or having duration. It may cause changing in one’s or more objects’ states. State: for a specific object, we are interested in some set of properties; one state for that object is given by the set of values, for its properties. History, evolution: the set of states for an object; the changes of the object’s state. Remark. The evolution of an object can be seen as an oriented graph, composed of states and events. Figure 1.5. Part of an object’s evolution (three states and two events that cause the changes)

Lifespan: the time interval when an object exists in the modeled reality or in the database. Time attribute: attribute of which values are of type time instance or time interval (valid time or transactional time). Static attribute (non time-varying): attribute for which we don’t want to store its evolution in time; we store only the current value. Time-varying attribute: attribute for which we want to store its evolution in time. Temporal attribute = time-varying attribute + time attribute Now: a special variable that represents the current time (“until-changed”, “current”, “∞” or other notations). A DBMS should offer such a variable.

Objects’ evolution Evolution of object O (function of evolution): EvO : T → DO, EvO(t) = the state of O at time t, where T = temporal domain and DO = set of all possible states for object O.

Types of evolutions discrete evolution:  point-based when the states of an object are recorded at certain moments in time and they are timestamped with time instances.  interval-based when one state of an object stays unchanged during a certain time interval; the timestamp is a time. continuous evolution: changes are usually represented by functions of time, defined on time intervals:  linear: the evolution is represented or approximated by linear functions of time (linear interpolation can be applied).  non-linear: the evolution is represented by non-linear functions of time, usually – polygonal.

Table 1.3. Discrete evolution; timestamps = VT, time instances TemperatureTime instance 37.7°08: °10: °12: °14: °16: °18: °20:00

Table 1.4. Discrete evolution; timestamps = VT, intervals SalaryTime 1010[01/02/2006, 01/07/2006) 1570[01/07/2006, 01/09/2006) 1250[01/09/2006, 01/12/2006) 1800[01/12/2006, 01/04/2007) 2110[01/04/2007, Now)

Figure 1.6. (a) point-based discrete evolution, (b) interval-based discrete evolution, (c) continuous evolution represented by linear functions of time, (d) continuous evolution represented by non-linear functions of time

Temporal Databases Usually, the traditional databases are called “snapshot databases”, because they contain only the current state of the modeled reality (and not its history also). In temporal databases, the data is (usually) not deleted, but the data is “versioned”. The past states are only logically deleted, therefore their evolution in time is preserved. From here – one of the temporal databases’ disadvantages: the great amount of data that must be managed.

Databases – According to Time Management snapshot databases: traditional (classical) databases which do not contain temporal attributes; the previous states cannot be known; historical databases: databases which contain at least one VT temporal attribute, and no TT temporal attributes; the timestamps represent the objects’ existence in time, in reality; for one object, the timestamps cannot overlap; the timestamps can represent any moment of time (past, present, future); rollback databases: databases which contain at least one TT temporal attribute, and no VT temporal attributes; usually – used in recovery processes, or logging information about the performed operation on the database; usually – the timestamps are automatically managed by the DBMS; they can represent at one moment only the current time; bi-temporal databases: databases which contain at least one VT temporal attribute and one TT temporal attribute; these databases have the characteristics of historical and rollback databases.

What do we mark with timestamps? Usually – the timestamped elements are objects. Let’s consider a table with the following structure:  (OID, A1, A2, … Ap, TA1, TA2, …, TAq), where OID represents the object’s id, the attributes A1, …, Ap are non-varying attributes, and TA1, …, TAq are time-varying attributes. If we add a single time attribute, T, then we obtain (OID, A1, A2, … Ap, TA1, TA2, …, TAq, T), which means that every time something is changing for an object, we have to record this change by adding a new record (in which the attributes for which nothing changed are simply copied – at least all the non-time-varying attributes). Therefore – we could split this structure:  (OID, A1, A2, … Ap) – static data  (OID, TA1, TA2, …, TAq, T) – time-varying data

What do we mark with timestamps? If the time-varying attributes are changing their values with the same frequency (or – almost the same), then this is a good structure. Otherwise, we could split again the last structure, depending on the changing frequency of the time-varying attributes. In the “worst” case we will obtain:  (OID, TA1, T) – time-varying data  (OID, TA2, T) – time-varying data  …  (OID, TAq, T) – time-varying data

Timestamps of type time interval One time interval can be any kind of interval: [t1, t2], [t1, t2), (t1, t2], or (t1, t2). Usually, these are used: [t1, t2] – for discrete time, [t1, t2) – for dense time (but this is not a rule).

Temporal Representational Schemas Let’s consider the notations:  AV = VT attribute, instance of time  AT = TT attribute, instance of time  AVs, AVe, ATs, ATe = time attributes representing time intervals (the starting and ending point of such an interval), VT or TT  Ai (i:=1..n) = thematic attributes (not time attributes)

Temporal Models  grouped temporal data model (also called non- 1NF data model): timestamping at attribute level; for each attribute – we may have more than one time value; the correlated events are grouped and represented within a single tuple;  non-grouped temporal data model (also called 1NF data model): timestamping at tuple level; each tuple represents one change.

Temporal Models As an example, we consider a few cinema rooms, and movies. Next – it is showed which movie could be seen in each cinema room, with the corresponding VT and TT data. Table 1.5. Bi-temporal relation RoomMovieAV s AV e AT s AT e R1Toy Story R1Toy Story192610Now R2Toy Story16206 R1Monsters Inc Now R3Finding Nemo R2Finding Nemo16Now21Now

Non-grouped temporal data models Ariav representational schema: R [A1, A2, …, An, AV, AT] It uses only instances of time, representing VT and TT. It is considered that one state is valid until we record another change for the same object. See Table 1.6. Table 1.6. Temporal information, according to the Arial schema RoomMovieAVAT R1Toy Story121 R1Toy Story1910 R2Toy Story166 R1Monsters Inc.2111 R3Finding Nemo126 R2Finding Nemo1621

Non-grouped temporal data models Jensen representational schema: R [A1, A2, …, An, AVs, AVd, AT, Op], The Op attribute represents the type of the performed operation (insertion or logical deletion), and AT represents the time when that operation was performed. This model uses a mixed timestamping (interval VT and instance TT). See Table 1.7. The operations that are executed in this case are (only) insertions. RoomMovie AV s AV e ATOp R1Toy Story 12181I R2Toy Story 16206I R3Finding Nemo 12156I R1Toy Story 12189D R1Toy Story I R1 Monsters Inc I R2Toy Story 1620 D R3Finding Nemo D R2Finding Nemo 16Now21I Table 1.7. Temporal information, according to the Jensen schema

Non-grouped temporal data models Ben-Zvi representational schema:  Tes – beginning of the VT interval,  Trs – moment of time when Tes was recorded (beginning of the TT interval),  Tee – end of the VT interval,  Tre – moment of time when Tee was recorded  Td – moment of time when the tuple was logically deleted (end of the TT interval). If Td = “ – “ then the tuple still exists in the current state of database. See Table 1.8. RoomMovie T es T rs T ee T re TdTd R1Toy Story R1Toy Story – R2Toy Story R1Monsters Inc – R3Finding Nemo R2Finding Nemo 1621Now21– Table 1.8. Temporal information, according to the Ben-Zvi schema

Non-grouped temporal data models Ben-Zvi representational schema: Remark. In Table 1.8. – if VT interval for the last tuple is ended with the value 22, at TT time 25, then the tuple will contain: R2Finding Nemo –

Grouped temporal data models McKenzie representational schema: R [AT, R’], where R’ = [A1AV1, …, AnAVn] Each value of AT is associated to a VT relation, and AVi, i:=1..n, are sets of VT (finite) instances. See Table 1.9. (for R2, Finding Nemo, VT considered is [16, 22]). Table 1.9. Temporal information, according to the McKenzie schema ATR’ 0  1{( R1, {12, …, 18}, Toy Story, {12, …, 18})} 6{( R1, {12, …, 18}, Toy Story, {12, …, 18}), (R2, {16, …, 20}, Toy Story, {16, …, 20}), (R3, {12, …, 15}, Finding Nemo, {12, …, 15})} 10{(R2, {16, …, 20}, Toy Story, {16, …, 20}), (R3, {12, …, 15}, Finding Nemo, {12, …, 15}), (R1, {19, …, 26}, Toy Story, {19, …, 26})} 11{(R2, {16, …, 20}, Toy Story, {16, …, 20}), (R3, {12, …, 15}, Finding Nemo, {12, …, 15}), (R1, {19, …, 26}, Toy Story, {19, …, 26}), (R1, {21, …, 25}, Monsters Inc., {21, …, 25})} 21{(R1, {19, …, 26}, Toy Story, {19, …, 26}), (R1, {21, …, 25}, Monsters Inc., {21, …, 25}), (R2, {16, …, 22}, Finding Nemo, {16, …, 22})}

Grouped temporal data models Gadia representational schema: R [{(A1, V  T)}, …, {(An, V  T)}], where V = [AVs, AVe) şi T = [ATs, ATe) In our example, the Gadia model is applied according to one or both thematic attributes. See Table (a) if it is structured according to cinema room values, and Table (b) if it is structured according to cinema room and movie values.

Grouped temporal data models RoomMovie R1 [12, 18]  [1, 9] R1 [19, 26]  [10, Now) R1 [21, 25]  [11, Now) Toy Story [12, 18]  [1, 9] Toy Story [19, 26]  [10, Now) Monsters Inc. [21, 25]  [11, Now) R2 [16, 20]  [6, 20] R2 [16, Now)  [21, Now) Toy Story [16, 20]  [6, 20] Finding Nemo [16, Now)  [21, Now) R3 [12, 15]  [6, 20]Finding Nemo [12, 15]  [6, 20] Table (a) Temporal information, according to the Gadia schema Table (b) Temporal information, according to the Gadia schema RoomMovie R1 [12, 18]  [1, 9] R1 [19, 26]  [10, Now) Toy Story [12, 18]  [1, 9] Toy Story [19, 26]  [10, Now) R2 [16, 20]  [6, 20]Toy Story [16, 20]  [6, 20] R1 [21, 25]  [11, Now)Monsters Inc. [21, 25]  [11, Now) R3 [12, 15]  [6, 20]Finding Nemo [12, 15]  [6, 20] R2 [16, Now)  [21, Now)Finding Nemo [16, Now)  [21, Now)