Temporal Database - PowerPoint PPT Presentation

1 / 28
About This Presentation
Title:

Temporal Database

Description:

lives in Smallville. Nothing. John moves to Bigtown, but forgets to register his new address ... Person(John Doe, Smallville, 3-Apr-1975, , 4-Apr-1975, 27-Dec-1994) ... – PowerPoint PPT presentation

Number of Views:4556
Avg rating:3.0/5.0
Slides: 29
Provided by: ACE579
Category:

less

Transcript and Presenter's Notes

Title: Temporal Database


1
Temporal Database
2
  • Sivalingham WGA060027
  • Ponmalar WGA060026
  • Amin WGA060057
  • Moraali WGA060033
  • Daniel WGA060032
  • Sunny WGA060048

3
What Is Temporal Database ?
4
A temporal database is a database with built-in
time aspects Temporal databases are attached
with a time period to express when the data was
valid and stored into database.
5
Time Period
Valid Time
Transaction Time
Time period when the fact was true with respect
of real world
Time period when a fact is stored in the
database.
6
Non-Temporal Database concept
Updated After Changed to Loan Dept.
7
Temporal Database concept
8
Analysis
Relational vs Temporal
9
  • Relational Databases
  • Rows of individual columns (like spreadsheet)
  • Snapshot of the data in time
  • Temporal Databases
  • Add a third dimension, time.
  • Allows us to see the data as it was at a
    particular point in time

10
Time changes Everything
  • As the years roll by
  • words change meaning,
  • cultural references change,
  • layers of content builds up.
  • Result
  • obscures what you're looking for!
  • It is only going to get worse as time goes by!
  • Solution
  • Temporal database theory!

11
Troy
  • Search for TROY in GOOGLE would result in
  • Few years ago websites about history of ancient
    city
  • Now websites about the movie Brad Pitt
  • How researcher can eliminate noise from their
    search?
  • Select a time slice of data to search

12
John's Life
  • NON-Temporal DB
  • To store the life of one person in a table we use
    the table Person (Name, Address).
  • To simplify we define Name as the primary key of
    Person.
  • BI-Temporal DB
  • provides temporal rollback (transaction time )
  • historical information (valid time )

13
(No Transcript)
14
Valid Time
  • Valid Time the time for which a fact is true in
    the real world
  • Person(Name, Address, ValidFrom, ValidTo)
  • Person(John Doe, Smallville, 3-Apr-1975, 8).
  • Person(John Doe, Big Town, 26-Aug-1993, 8).
  • Person(John Doe, Smallville, 3-Apr-1975,
    26-Aug-1993).
  • Person(John Doe, Bigtown, 26-Aug-1993, 8).
  • Person(John Doe, Bigtown, 26-Aug-1993,
    1-Apr-2001).
  • After discovering residence in Beachy on
    2/Feb/2001
  • Person(John Doe, Bigtown, 26-Aug-1993,
    1-Jun-1995).
  • Person(John Doe, Beachy, 1-Jun-1995, 2-Sep-2000).
  • Person(John Doe, Bigtown, 3-Sep-2000,
    1-Apr-2001).
  • Leaves no record that he lied about living in
    Bigtown during that time.

15
Transaction Time
  • Transaction time time period that a fact is
    stored in the database.
  • Queries can show the state of the database at a
    given time.
  • Person(Name, Address, ValidFrom, ValidTo,
    TransactionFrom, TransactionTo)
  • Person(John Doe, Smallville, 3-Apr-1975, 8,
    4-Apr-1975, 27-Dec-1994).
  • Person(John Doe, Smallville, 3-Apr-1975,
    26-Aug-1993, 27-Dec-1994, 8).
  • Person(John Doe, Bigtown, 26-Aug-1993, 8,
    27-Dec-1994, 2-Feb-2001).
  • Person(John Doe, Bigtown, 26-Aug-1993,
    1-Jun-1995, 2-Feb-2001, 8).
  • Person(John Doe, Beachy, 1-Jun-1995, 3-Sep-2000,
    2-Feb-2001, 8).
  • Person(John Doe, Bigtown, 3-Sep-2000, 8,
    2-Feb-2001, 1-Apr-2001).
  • Person(John Doe, Bigtown, 3-Sep-2000, 1-Apr-2001,
    1-Apr-2001, 8).
  • Recorded not only changes in what happened at
    different times, but also changes in what was
    officially recorded at different times.

16
Modeling Temporal Database
DBMS based on data models. Data models supplies
a set of concepts to describe
the data structures, integrity constraints and
retrieval and updates operations.
17
Data Model
M (DS, OP, C)
vs
Temporal Data Model
MT (DST, OPT, CT)
DS Data Structures OP - Operations, C-
Integrity Constraints
18
Designing Temporal Database
Modeling temporal database is challenging for
several reasons. Adding temporal information in
E-R diagram makes it very difficult to create and
to comprehend. There have been several proposals
to extend the E-R notation to specify in a
simpler manner, but there are no accepted
standards.
19
Temporal Database Designing Methods
Step 1 Database designers decided to design
temporal databases with simpler approaches. They
will design the entire databases (including E-R
design and relational design) ignoring temporal
changes. Example Employee(Pers.No, Name,
ActionType)
20
Step 2 Designers will study the various
relations and decides which relations require
temporal variation to be tracked. Step 3 Add
valid time information to each such relation, by
adding start and end time as attributes. Example
Employee(Pers.No, Name, ActionType, Startdate,
Enddate)
Temporal Relation Employee
21
Problems Statement Propose Solution
Temporal Relation Employee
Foreign Key Pers.No refer to temporal relation
Problem If another relation had a foreign key
referencing a temporal relation, the database
designer has to decide if the reference is to the
current version of the data or to the data as of
a particular point in time.
22
Solution 1 Add the StartDate and EndDate
attributes of Employee relation to the primary
key. Drawback Solution 1 Referencing tuples
also would have to include the StartDate and
EndDate as part of their foreign key and the
values must match with the referenced tuple.
Further, if the referenced tuple is updated(and
the end time which was in the future is updated),
the update must propagate to all the referencing
tuples. Solution 2 Better solution If all
references to temporal data refer to only the
current data, a simpler solution is to not add
time information to the relation, but instead
create a corresponding history relation that has
temporal information, for past values. Example
Employee(Pers.No, Name, ActionType) EmployeeHist
ory(Pers.No, Name, ActionType, Startdate, EndDate)
23
SnapShot of Employee Relation
Employee(Pers.No, Name, ActionType)
24
Temporal Data of EmployeeHistory Relation
EmployeeHistory(Pers.No, Name, ActionType,
Startdate, EndDate)
25
(No Transcript)
26
Importance of Temporal Database in Future
Application domains requiring the storage and
retrieval of time varying data. Examples of such
application domains are financial applications
One reason why the management of time-varying
data is not considered for most applications is
the lack of appropriate support by commercial
DBMS. Nowadays, if time-varying data has to be
managed, special application programs based on
(temporal database) must be developed in future
27
Most applications of database technology are
temporal in nature. Applications are rely on
temporal databases, which record time referenced
data.
28
(No Transcript)
Write a Comment
User Comments (0)
About PowerShow.com