Home > database >  Historical evolution in the data and contrast analysis of single and double timestamp
Historical evolution in the data and contrast analysis of single and double timestamp

Time:09-19

Historical data of single timestamp example (start time)
Primary key id personnel (staf_id) start time (sys) annual assessment (sf) political landscape (pol) score (sum)
6 s1 student pacesetter (100) 2015-03-01 party members (15) 115
5 s1 student pacesetter probationary party member (100) 2015-02-01 110 (10)
4 s1 miyoshi students (80) 2015-01-01 probationary party member (10) 90
3 s1 miyoshi students, 2012-01-01 (80) member (5) 85
2 s1 general members (60) 2011-04-01 (6) 65
1 s1 general (60) masses (0) 2011-01-01 60

Historical data double timestamp example (start time + end time)
Primary key id personnel (staf_id) start time (sys) over time (change) the year-end assessment (sf) political landscape (pol) score (sum)
6 s1 null student pacesetter (100) 2015-03-01 party members (15) 115
5 s1 student pacesetter (100) 2015-02-28 2015-02-01 probationary party member (10) 110
4 s1 miyoshi students (80) 2012-01-31 2015-01-01 probationary party member (10) 90
3 members s1 miyoshi students (80) 2014-12-31 2012-01-01 (5) 85
S1 2011-04-01 2011-12-31 generally (60) member (6) 65
1 s1 general (60) masses (0) 2011-03-31 2011-01-01 60

Advantages and disadvantages of the single timestamp
When single timestamp data warehousing is relatively simple, need not calculate the end time when put in storage, the beginning of the period as a data record the end of the time this article
Single timestamp calculation time, need to compute extraction under a record start time as this article records the end of the time, will reduce the efficiency of database

The pros and cons of dual timestamp
Double calculation simple timestamp, the data began to end time clear
Double the end time of the timestamp to maintain complex, can easily lead to end time chaos, with operating time relatively reduces over time as the start time of chaos

Analysis:
Single timestamp processing needs over time can be combined with various modules over time, the end time is not fixed
Double time stamp can be modified over time, but if put in storage record time between a few records, maintain complex
  • Related