SlideShare une entreprise Scribd logo
1  sur  29
Temporal Databases
ADBMS
By:
Dabbal S. Mahara
2018
Introduction
 Typically, databases model only one state - the current state- of the
real world, and do not store information about past states, except
perhaps as audit trails.
 When the state of the real world changes, the database gets updated,
and information about the old state gets lost.
 Applications usually require the knowledge of the information’s
evolution, implying the storage of different states of information,
including past values and future previews.
 For example, a patient database must store information about the
medical history of a patient.
2
Introduction
 A factory monitoring system may store information about current and
past readings of sensors in the factory, for analysis.
 This led to the development of researches concerning temporal aspects
in information systems.
 Databases that store information about states of the real world across
time are called temporal databases.
 Temporal databases, in the broadest sense, encompass all database
applications that require some aspect of time when organizing their
information.
3
 There are many other examples of applications (reservation systems,
scientific databases, company database, university database etc.)
where some aspect of time is needed to maintain the information in a
database.
 Insurance, where claims and accident histories are required as well as
information about the times when insurance policies are in effect;
 Reservation systems in general (hotel, airline, car rental, train, and so
on), where information on the dates and times when reservations are in
effect are required;
 Scientific databases, where data collected from experiments includes
the time when each data is measured; and so on.
4
Introduction
Introduction
 In the COMPANY database, we may wish to keep SALARY, JOB, and
PROJECT histories on each employee.
 In the UNIVERSITY database, time is already included in the
SEMESTER and YEAR of each SECTION of a COURSE, the grade
history of a STUDENT, and the information on research grants.
 In fact, it is realistic to conclude that the majority of database
applications have some temporal information.
 However, users often attempt to simplify or ignore temporal aspects
because of the complexity that they add to their applications.
5
Introduction
 Temporal databases allow the storage and the recovery of all the
states assumed by an object during its lifetime, thus recording its
evolution with time.
 When considering the issue of time in database systems, we must
distinguish between time as measured by the system and time as
observed in the real world.
 The valid time for a fact is the set of time intervals during which the
fact is true in the real world.
 The transaction time for a fact is the time interval during which the fact
is current within the database system.
6
 This latter time is based on the transaction serialization order and is
generated automatically by the system.
 Note that valid-time intervals, being a real-world concept, cannot be
generated automatically and must be provided to the system.
 A temporal relation is one where each tuple has an associated time
when it is true; the time may be either valid time or transaction time.
 When both timestamps are used the result is a bitemporal relation.
7
Introduction
Time Representation
 For temporal databases, time is considered to be an ordered sequence
of points in some granularity that is determined by the application.
 Temporal database researchers have used the term chronon instead of
point to describe the minimal granularity for a particular application.
 A calendar organizes time into different time units for convenience.
 Various calendars are used by various cultures (such as Gregorian
(western), Chinese, Islamic, Hindu, Jewish, Coptic etc.).
8
Time Representation in SQL
 In SQL2, temporal data types include DATE, TIME, TIMESTAMP,
INTERVAL, and PERIOD.
 DATE: The type date contains four digits for the year (1–9999), two
digits for the month (1–12), and two digits for the date (1–31) and
provided specifying Year, Month, and Day as YYYY-MM-DD),
 TIME: The type time contains two digits for the hour, two digits for the
minute, and two digits for the second, plus optional fractional digits and
provided specifying Hour, Minute, and Second as HH:MM:SS,
 TIMESTAMP: The type timestamp contains the fields of date and
time, with six fractional digits for the seconds field. (specifying a
Date/Time combination, with options for including sub second divisions
if they are needed),
9
 Since different places in the world have different local times, there is
often a need for specifying the time zone along with the time.
 The Universal Coordinated Time (UTC) is a standard reference point
for specifying time, with local times defined as offsets from UTC. (The
standard abbreviation is UTC, rather than UCT, since it is an abbreviation of
“Universal Coordinated Time” written in French as universel temps coordonne ´.)
 INTERVAL (a relative time duration, such as 10 days or 250 minutes),
 PERIOD (an anchored time duration with a fixed starting point, such
as the 10-day period from January 1, 2009, to January 10, 2009,
inclusive).
10Time Representation in SQL
Event Information Versus Duration (or State)
Information
 A temporal database will store information concerning when
certain events occur, or when certain facts are considered to
be true.
 There are several different types of temporal information.
 Point events or facts are typically associated in the database
with a single time point in some granularity;
 For example, bank deposit, total monthly sales associated
with particular month (say, February 2010).
 This type of information is often represented as time series
data
11
Event Information Versus Duration (or State)
Information
 Duration events or facts are associated with a specific time
period in the database;
 A time period is represented by its start time and end time
points;
 Time period is often interpreted as the set of all time points from
start-time to end-time inclusive in the specified granularity;
 For example, employee worked in a company in a company
from August 15, 2003 until November 20, 2008.
 The above period is represented as [2003-08-15, 2008-11-20].
12
Valid Time and Transaction Time Dimensions
 Given a particular event or fact that is associated with a particular
time point or time period in the database, the association may be
interpreted to mean different things.
 The most natural interpretation is that the associated time is the
time that the event occurred, or the period during which the fact
was considered to be true in the real world.
 The associated time that the event occurred, or the period during
which the fact was considered to be true is called valid time;
 The database using this interpretation is called valid time database
13
Valid Time and Transaction Time Dimensions
 In transaction time, the associated time refers to the time when the
information was actually stored in the database, that is, it is the value
of the system time clock when the information is valid in the system;
The database using this interpretation is called transaction time
database
 The above two are referred to as time dimensions;
 In some applications only one of the dimensions is needed and in
other cases both time dimensions are required, in which case the
temporal database is called bitemporal database
 If the user defines the semantics and program the applications
appropriately, it is called user-defined time
14
Incorporating Time in Relational Databases
Using Tuple Versioning
 Let us now see how the different types of temporal databases may
be represented in the relational model.
 Valid Time Relations – We convert the relations into valid time
relations by adding the attributes valid start time and valid end time
 Transaction Time Relations – We convert the relations into
transaction time relations by adding the attributes transaction start
time and transaction end time
 Bitemporal Relations – We convert the relations into bitemporal
relations by adding the attributes valid start time, valid end time,
transaction start time, and transaction end time
15
Incorporating Time in Relational Databases
Using Tuple Versioning
16
Figure
17Incorporating Time in Relational Databases
Using Tuple Versioning
Incorporating Time in Relational Databases
Using Tuple Versioning
Figure c : Bitemporal Database Schema
Incorporating Time in Relational Databases
Using Tuple Versioning
18
Incorporating Time in Relational Databases
Using Tuple Versioning
19
20Incorporating Time in Relational Databases
Using Tuple Versioning
DEPT_BT
Incorporating Time in Relational Databases
Using Tuple Versioning
 Implementation Considerations – There are various options for
storing the tuples in a temporal relation
 Store all tuples in the same table
 Create two table – one for the currently valid information and
other for the rest of the tuples
 Vertical partition the attributes of the temporal relation into
separate relations – separate relation is created to contain only
the attributes that always change synchronously
21
Incorporating Time in Object Databases
Using Attribute Versioning
 A single complex object is used to store all the temporal changes
of object
 Each attribute that changes over time is called a time-varying
attribute (e.g., age), and it has its values versioned over time by
adding temporal periods to the attribute
 The temporal periods may represent valid time, transaction time,
or bitemporal, depending on the application requirement
 Attributes that do not change are called non-time-varying (e.g.,
date of birth)and are not associated with the temporal periods
 Time varying attribute is represented as a collection type
22
23Incorporating Time in Object Databases
Using Attribute Versioning
24Incorporating Time in Object Databases
Using Attribute Versioning
Incorporating Time in Object Databases
Using Attribute Versioning
25
Time Series Data
 Time series data are the data values that are recorded according to
a specific predefined sequence of time periods.
 They are special type of valid event data, where the event time
points are predetermined according to a fixed calendar.
 Example: closing daily stock prices of a particular Stock Exchange
Company. The granularity here is day.
 Typical queries on time series involve temporal aggregation over
higher granularity levels.
 For example, finding the average or maximum weekly closing stock
price or the maximum and minimum monthly closing stock price
from the daily information.
26
Time Series Data
 As another example, consider the daily sales dollar amount at each
store of a chain of stores owned by a particular company.
 Again, typical temporal aggregates would be retrieving the weekly,
monthly, or yearly sales from the daily sales information (using the
sum aggregate function), or comparing same store monthly sales
with previous monthly sales, and so on.
 Because of the specialized nature of time series data and the lack of
support for it in older DBMSs, it has been common to use
specialized time series management systems rather than general-
purpose DBMSs for managing such information.
27
Time Series Data
 In such systems, it has been common to store time series values in
sequential order in a file, and apply specialized time series
procedures to analyze the information.
 The problem with this approach is that the full power of high-level
querying in languages such as SQL will not be available in such
systems.
 More recently, some commercial DBMS packages are offering time
series extensions, such as the Oracle time cartridge and the time
series data blade of Informix Universal Server.
 In addition, the TSQL2 language provides some support for time
series in the form of event tables.
28
29

Contenu connexe

Tendances

1. Introduction to DBMS
1. Introduction to DBMS1. Introduction to DBMS
1. Introduction to DBMS
koolkampus
 
Data cube computation
Data cube computationData cube computation
Data cube computation
Rashmi Sheikh
 

Tendances (20)

Object Relational Database Management System(ORDBMS)
Object Relational Database Management System(ORDBMS)Object Relational Database Management System(ORDBMS)
Object Relational Database Management System(ORDBMS)
 
Parallel Database
Parallel DatabaseParallel Database
Parallel Database
 
Spatial data mining
Spatial data miningSpatial data mining
Spatial data mining
 
Distributed concurrency control
Distributed concurrency controlDistributed concurrency control
Distributed concurrency control
 
Structure of dbms
Structure of dbmsStructure of dbms
Structure of dbms
 
Distributed DBMS - Unit 6 - Query Processing
Distributed DBMS - Unit 6 - Query ProcessingDistributed DBMS - Unit 6 - Query Processing
Distributed DBMS - Unit 6 - Query Processing
 
Multidimensional data models
Multidimensional data  modelsMultidimensional data  models
Multidimensional data models
 
Object Oriented Dbms
Object Oriented DbmsObject Oriented Dbms
Object Oriented Dbms
 
Query processing and optimization (updated)
Query processing and optimization (updated)Query processing and optimization (updated)
Query processing and optimization (updated)
 
Spatial Database
Spatial DatabaseSpatial Database
Spatial Database
 
1. Introduction to DBMS
1. Introduction to DBMS1. Introduction to DBMS
1. Introduction to DBMS
 
INTRODUCTION TO JSP,JSP LIFE CYCLE, ANATOMY OF JSP PAGE AND JSP PROCESSING
INTRODUCTION TO JSP,JSP LIFE CYCLE, ANATOMY OF JSP PAGE  AND JSP PROCESSINGINTRODUCTION TO JSP,JSP LIFE CYCLE, ANATOMY OF JSP PAGE  AND JSP PROCESSING
INTRODUCTION TO JSP,JSP LIFE CYCLE, ANATOMY OF JSP PAGE AND JSP PROCESSING
 
Data cube computation
Data cube computationData cube computation
Data cube computation
 
Ordbms
OrdbmsOrdbms
Ordbms
 
Distributed database management system
Distributed database management  systemDistributed database management  system
Distributed database management system
 
Distributed dbms architectures
Distributed dbms architecturesDistributed dbms architectures
Distributed dbms architectures
 
Object oriented databases
Object oriented databasesObject oriented databases
Object oriented databases
 
4.2 spatial data mining
4.2 spatial data mining4.2 spatial data mining
4.2 spatial data mining
 
Multimedia Database
Multimedia Database Multimedia Database
Multimedia Database
 
Distributed Query Processing
Distributed Query ProcessingDistributed Query Processing
Distributed Query Processing
 

Similaire à Temporal databases

BI-TEMPORAL IMPLEMENTATION IN RELATIONAL DATABASE MANAGEMENT SYSTEMS: MS SQ...
BI-TEMPORAL IMPLEMENTATION IN  RELATIONAL DATABASE  MANAGEMENT SYSTEMS: MS SQ...BI-TEMPORAL IMPLEMENTATION IN  RELATIONAL DATABASE  MANAGEMENT SYSTEMS: MS SQ...
BI-TEMPORAL IMPLEMENTATION IN RELATIONAL DATABASE MANAGEMENT SYSTEMS: MS SQ...
lyn kurian
 

Similaire à Temporal databases (20)

Checking and verifying temporal data
Checking and verifying temporal dataChecking and verifying temporal data
Checking and verifying temporal data
 
Temporal Case Management 1998
Temporal Case Management  1998Temporal Case Management  1998
Temporal Case Management 1998
 
Temporal database
Temporal databaseTemporal database
Temporal database
 
SQL and Temporal Database Research: Unified Review and Future Directions
SQL and Temporal Database Research: Unified Review and Future DirectionsSQL and Temporal Database Research: Unified Review and Future Directions
SQL and Temporal Database Research: Unified Review and Future Directions
 
Updating and Scheduling of Streaming Web Services in Data Warehouses
Updating and Scheduling of Streaming Web Services in Data WarehousesUpdating and Scheduling of Streaming Web Services in Data Warehouses
Updating and Scheduling of Streaming Web Services in Data Warehouses
 
BI-TEMPORAL IMPLEMENTATION IN RELATIONAL DATABASE MANAGEMENT SYSTEMS: MS SQ...
BI-TEMPORAL IMPLEMENTATION IN  RELATIONAL DATABASE  MANAGEMENT SYSTEMS: MS SQ...BI-TEMPORAL IMPLEMENTATION IN  RELATIONAL DATABASE  MANAGEMENT SYSTEMS: MS SQ...
BI-TEMPORAL IMPLEMENTATION IN RELATIONAL DATABASE MANAGEMENT SYSTEMS: MS SQ...
 
IRJET- Mining Frequent Itemset on Temporal data
IRJET-  	  Mining  Frequent Itemset on Temporal dataIRJET-  	  Mining  Frequent Itemset on Temporal data
IRJET- Mining Frequent Itemset on Temporal data
 
Temporal_Data_Warehouse.pptx
Temporal_Data_Warehouse.pptxTemporal_Data_Warehouse.pptx
Temporal_Data_Warehouse.pptx
 
PERFORMANCE STUDY OF TIME SERIES DATABASES
PERFORMANCE STUDY OF TIME SERIES DATABASESPERFORMANCE STUDY OF TIME SERIES DATABASES
PERFORMANCE STUDY OF TIME SERIES DATABASES
 
Spatio-Temporal Database and Its Models: A Review
Spatio-Temporal Database and Its Models: A ReviewSpatio-Temporal Database and Its Models: A Review
Spatio-Temporal Database and Its Models: A Review
 
rscript_paper-1
rscript_paper-1rscript_paper-1
rscript_paper-1
 
Chapter24
Chapter24Chapter24
Chapter24
 
Data warehousing and Data Mining
Data warehousing and Data MiningData warehousing and Data Mining
Data warehousing and Data Mining
 
129471717 unit-v
129471717 unit-v129471717 unit-v
129471717 unit-v
 
tempDB.ppt
tempDB.ppttempDB.ppt
tempDB.ppt
 
Converting UML Class Diagrams into Temporal Object Relational DataBase
Converting UML Class Diagrams into Temporal Object Relational DataBase Converting UML Class Diagrams into Temporal Object Relational DataBase
Converting UML Class Diagrams into Temporal Object Relational DataBase
 
INTRODUCTION TO DATABASE
INTRODUCTION TO DATABASEINTRODUCTION TO DATABASE
INTRODUCTION TO DATABASE
 
Performance Requirements: CMG'11 slides with notes (pdf)
Performance Requirements: CMG'11 slides with notes (pdf)Performance Requirements: CMG'11 slides with notes (pdf)
Performance Requirements: CMG'11 slides with notes (pdf)
 
Temporal
TemporalTemporal
Temporal
 
Data warehouse concepts
Data warehouse conceptsData warehouse concepts
Data warehouse concepts
 

Plus de Dabbal Singh Mahara

Plus de Dabbal Singh Mahara (17)

Spatial databases
Spatial databasesSpatial databases
Spatial databases
 
Ordbms
OrdbmsOrdbms
Ordbms
 
Odbms concepts
Odbms conceptsOdbms concepts
Odbms concepts
 
Object database standards, languages and design
Object database standards, languages and designObject database standards, languages and design
Object database standards, languages and design
 
Normalization
NormalizationNormalization
Normalization
 
Relational model
Relational modelRelational model
Relational model
 
Overview of dbms
Overview of dbmsOverview of dbms
Overview of dbms
 
ER modeling
ER modelingER modeling
ER modeling
 
EER modeling
EER modelingEER modeling
EER modeling
 
Unit 9 graph
Unit   9 graphUnit   9 graph
Unit 9 graph
 
Unit 7 sorting
Unit   7 sortingUnit   7 sorting
Unit 7 sorting
 
Unit 6 tree
Unit   6 treeUnit   6 tree
Unit 6 tree
 
Unit 5 linked list
Unit   5 linked listUnit   5 linked list
Unit 5 linked list
 
Unit 4 queue
Unit   4 queueUnit   4 queue
Unit 4 queue
 
Unit 8 searching and hashing
Unit   8 searching and hashingUnit   8 searching and hashing
Unit 8 searching and hashing
 
Unit 3 stack
Unit   3 stackUnit   3 stack
Unit 3 stack
 
Unit 2 algorithm
Unit   2 algorithmUnit   2 algorithm
Unit 2 algorithm
 

Dernier

Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Christo Ananth
 
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
dollysharma2066
 
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Dr.Costas Sachpazis
 
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort ServiceCall Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar ≼🔝 Delhi door step de...
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar  ≼🔝 Delhi door step de...Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar  ≼🔝 Delhi door step de...
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar ≼🔝 Delhi door step de...
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 

Dernier (20)

Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
 
UNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its PerformanceUNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its Performance
 
Double rodded leveling 1 pdf activity 01
Double rodded leveling 1 pdf activity 01Double rodded leveling 1 pdf activity 01
Double rodded leveling 1 pdf activity 01
 
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
 
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
 
Coefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxCoefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptx
 
Thermal Engineering Unit - I & II . ppt
Thermal Engineering  Unit - I & II . pptThermal Engineering  Unit - I & II . ppt
Thermal Engineering Unit - I & II . ppt
 
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdfONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
 
Java Programming :Event Handling(Types of Events)
Java Programming :Event Handling(Types of Events)Java Programming :Event Handling(Types of Events)
Java Programming :Event Handling(Types of Events)
 
UNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular ConduitsUNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular Conduits
 
Vivazz, Mieres Social Housing Design Spain
Vivazz, Mieres Social Housing Design SpainVivazz, Mieres Social Housing Design Spain
Vivazz, Mieres Social Housing Design Spain
 
Extrusion Processes and Their Limitations
Extrusion Processes and Their LimitationsExtrusion Processes and Their Limitations
Extrusion Processes and Their Limitations
 
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
 
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
 
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort ServiceCall Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
 
Call Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance BookingCall Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance Booking
 
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar ≼🔝 Delhi door step de...
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar  ≼🔝 Delhi door step de...Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar  ≼🔝 Delhi door step de...
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar ≼🔝 Delhi door step de...
 
UNIT-III FMM. DIMENSIONAL ANALYSIS
UNIT-III FMM.        DIMENSIONAL ANALYSISUNIT-III FMM.        DIMENSIONAL ANALYSIS
UNIT-III FMM. DIMENSIONAL ANALYSIS
 
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
 
University management System project report..pdf
University management System project report..pdfUniversity management System project report..pdf
University management System project report..pdf
 

Temporal databases

  • 2. Introduction  Typically, databases model only one state - the current state- of the real world, and do not store information about past states, except perhaps as audit trails.  When the state of the real world changes, the database gets updated, and information about the old state gets lost.  Applications usually require the knowledge of the information’s evolution, implying the storage of different states of information, including past values and future previews.  For example, a patient database must store information about the medical history of a patient. 2
  • 3. Introduction  A factory monitoring system may store information about current and past readings of sensors in the factory, for analysis.  This led to the development of researches concerning temporal aspects in information systems.  Databases that store information about states of the real world across time are called temporal databases.  Temporal databases, in the broadest sense, encompass all database applications that require some aspect of time when organizing their information. 3
  • 4.  There are many other examples of applications (reservation systems, scientific databases, company database, university database etc.) where some aspect of time is needed to maintain the information in a database.  Insurance, where claims and accident histories are required as well as information about the times when insurance policies are in effect;  Reservation systems in general (hotel, airline, car rental, train, and so on), where information on the dates and times when reservations are in effect are required;  Scientific databases, where data collected from experiments includes the time when each data is measured; and so on. 4 Introduction
  • 5. Introduction  In the COMPANY database, we may wish to keep SALARY, JOB, and PROJECT histories on each employee.  In the UNIVERSITY database, time is already included in the SEMESTER and YEAR of each SECTION of a COURSE, the grade history of a STUDENT, and the information on research grants.  In fact, it is realistic to conclude that the majority of database applications have some temporal information.  However, users often attempt to simplify or ignore temporal aspects because of the complexity that they add to their applications. 5
  • 6. Introduction  Temporal databases allow the storage and the recovery of all the states assumed by an object during its lifetime, thus recording its evolution with time.  When considering the issue of time in database systems, we must distinguish between time as measured by the system and time as observed in the real world.  The valid time for a fact is the set of time intervals during which the fact is true in the real world.  The transaction time for a fact is the time interval during which the fact is current within the database system. 6
  • 7.  This latter time is based on the transaction serialization order and is generated automatically by the system.  Note that valid-time intervals, being a real-world concept, cannot be generated automatically and must be provided to the system.  A temporal relation is one where each tuple has an associated time when it is true; the time may be either valid time or transaction time.  When both timestamps are used the result is a bitemporal relation. 7 Introduction
  • 8. Time Representation  For temporal databases, time is considered to be an ordered sequence of points in some granularity that is determined by the application.  Temporal database researchers have used the term chronon instead of point to describe the minimal granularity for a particular application.  A calendar organizes time into different time units for convenience.  Various calendars are used by various cultures (such as Gregorian (western), Chinese, Islamic, Hindu, Jewish, Coptic etc.). 8
  • 9. Time Representation in SQL  In SQL2, temporal data types include DATE, TIME, TIMESTAMP, INTERVAL, and PERIOD.  DATE: The type date contains four digits for the year (1–9999), two digits for the month (1–12), and two digits for the date (1–31) and provided specifying Year, Month, and Day as YYYY-MM-DD),  TIME: The type time contains two digits for the hour, two digits for the minute, and two digits for the second, plus optional fractional digits and provided specifying Hour, Minute, and Second as HH:MM:SS,  TIMESTAMP: The type timestamp contains the fields of date and time, with six fractional digits for the seconds field. (specifying a Date/Time combination, with options for including sub second divisions if they are needed), 9
  • 10.  Since different places in the world have different local times, there is often a need for specifying the time zone along with the time.  The Universal Coordinated Time (UTC) is a standard reference point for specifying time, with local times defined as offsets from UTC. (The standard abbreviation is UTC, rather than UCT, since it is an abbreviation of “Universal Coordinated Time” written in French as universel temps coordonne ´.)  INTERVAL (a relative time duration, such as 10 days or 250 minutes),  PERIOD (an anchored time duration with a fixed starting point, such as the 10-day period from January 1, 2009, to January 10, 2009, inclusive). 10Time Representation in SQL
  • 11. Event Information Versus Duration (or State) Information  A temporal database will store information concerning when certain events occur, or when certain facts are considered to be true.  There are several different types of temporal information.  Point events or facts are typically associated in the database with a single time point in some granularity;  For example, bank deposit, total monthly sales associated with particular month (say, February 2010).  This type of information is often represented as time series data 11
  • 12. Event Information Versus Duration (or State) Information  Duration events or facts are associated with a specific time period in the database;  A time period is represented by its start time and end time points;  Time period is often interpreted as the set of all time points from start-time to end-time inclusive in the specified granularity;  For example, employee worked in a company in a company from August 15, 2003 until November 20, 2008.  The above period is represented as [2003-08-15, 2008-11-20]. 12
  • 13. Valid Time and Transaction Time Dimensions  Given a particular event or fact that is associated with a particular time point or time period in the database, the association may be interpreted to mean different things.  The most natural interpretation is that the associated time is the time that the event occurred, or the period during which the fact was considered to be true in the real world.  The associated time that the event occurred, or the period during which the fact was considered to be true is called valid time;  The database using this interpretation is called valid time database 13
  • 14. Valid Time and Transaction Time Dimensions  In transaction time, the associated time refers to the time when the information was actually stored in the database, that is, it is the value of the system time clock when the information is valid in the system; The database using this interpretation is called transaction time database  The above two are referred to as time dimensions;  In some applications only one of the dimensions is needed and in other cases both time dimensions are required, in which case the temporal database is called bitemporal database  If the user defines the semantics and program the applications appropriately, it is called user-defined time 14
  • 15. Incorporating Time in Relational Databases Using Tuple Versioning  Let us now see how the different types of temporal databases may be represented in the relational model.  Valid Time Relations – We convert the relations into valid time relations by adding the attributes valid start time and valid end time  Transaction Time Relations – We convert the relations into transaction time relations by adding the attributes transaction start time and transaction end time  Bitemporal Relations – We convert the relations into bitemporal relations by adding the attributes valid start time, valid end time, transaction start time, and transaction end time 15
  • 16. Incorporating Time in Relational Databases Using Tuple Versioning 16 Figure
  • 17. 17Incorporating Time in Relational Databases Using Tuple Versioning Incorporating Time in Relational Databases Using Tuple Versioning Figure c : Bitemporal Database Schema
  • 18. Incorporating Time in Relational Databases Using Tuple Versioning 18
  • 19. Incorporating Time in Relational Databases Using Tuple Versioning 19
  • 20. 20Incorporating Time in Relational Databases Using Tuple Versioning DEPT_BT
  • 21. Incorporating Time in Relational Databases Using Tuple Versioning  Implementation Considerations – There are various options for storing the tuples in a temporal relation  Store all tuples in the same table  Create two table – one for the currently valid information and other for the rest of the tuples  Vertical partition the attributes of the temporal relation into separate relations – separate relation is created to contain only the attributes that always change synchronously 21
  • 22. Incorporating Time in Object Databases Using Attribute Versioning  A single complex object is used to store all the temporal changes of object  Each attribute that changes over time is called a time-varying attribute (e.g., age), and it has its values versioned over time by adding temporal periods to the attribute  The temporal periods may represent valid time, transaction time, or bitemporal, depending on the application requirement  Attributes that do not change are called non-time-varying (e.g., date of birth)and are not associated with the temporal periods  Time varying attribute is represented as a collection type 22
  • 23. 23Incorporating Time in Object Databases Using Attribute Versioning
  • 24. 24Incorporating Time in Object Databases Using Attribute Versioning
  • 25. Incorporating Time in Object Databases Using Attribute Versioning 25
  • 26. Time Series Data  Time series data are the data values that are recorded according to a specific predefined sequence of time periods.  They are special type of valid event data, where the event time points are predetermined according to a fixed calendar.  Example: closing daily stock prices of a particular Stock Exchange Company. The granularity here is day.  Typical queries on time series involve temporal aggregation over higher granularity levels.  For example, finding the average or maximum weekly closing stock price or the maximum and minimum monthly closing stock price from the daily information. 26
  • 27. Time Series Data  As another example, consider the daily sales dollar amount at each store of a chain of stores owned by a particular company.  Again, typical temporal aggregates would be retrieving the weekly, monthly, or yearly sales from the daily sales information (using the sum aggregate function), or comparing same store monthly sales with previous monthly sales, and so on.  Because of the specialized nature of time series data and the lack of support for it in older DBMSs, it has been common to use specialized time series management systems rather than general- purpose DBMSs for managing such information. 27
  • 28. Time Series Data  In such systems, it has been common to store time series values in sequential order in a file, and apply specialized time series procedures to analyze the information.  The problem with this approach is that the full power of high-level querying in languages such as SQL will not be available in such systems.  More recently, some commercial DBMS packages are offering time series extensions, such as the Oracle time cartridge and the time series data blade of Informix Universal Server.  In addition, the TSQL2 language provides some support for time series in the form of event tables. 28
  • 29. 29

Notes de l'éditeur

  1. Non temporal databases are Classified as snapshot databases. Store only a single state of the real world, usually the most recent state.
  2. To add these temporal features to the database the transaction time (TT – moment when the information is stored in the database) and/or the validity time (VT – time when the information is valid in the application)are attached to the data.
  3. For example, suppose that some temporal application never requires time units that are less than one second. Then, each time point represents one second using this granularity. In reality, each second is a (short) time duration, not a point, since it may be further divided into milliseconds, microseconds, and so on.