Introduction to Temporal Database Research.ppt
《Introduction to Temporal Database Research.ppt》由会员分享,可在线阅读,更多相关《Introduction to Temporal Database Research.ppt(37页珍藏版)》请在麦多课文档分享上搜索。
1、Introduction to Temporal Database Research,by Cyrus Shahabi from Christian S. Jensens Chapter 1,Outline,Introduction & definition Modeling Querying Database design Logical design Conceptual design DBMS implementation Query processing Implementation of algebraic operators Indexing structures Summary
2、Open problems,Introduction,Most applications of database technology are temporal in nature: Financial apps.: portfolio management, accounting & banking Record-keeping apps.: personnel, medical-record and inventory management Scheduling apps.: airline, car, hotel reservations and project management S
3、cientific apps.: weather monitoring,Definitions,Temporal DBMS manages time-referenced data, hence, times are associated with database entities Two types of time: valid time and transaction time Valid time, vt, of a fact (any logical statement that is either true or false) is the collected times (pos
4、sibly spanning the past, present & future) when the fact is true Although all facts have a valid time, the valid time of a fact may not necessarily be recorded in the database (unknown or irrelevant to the app.) If a database models different worlds, database facts might have several valid times, on
5、e for each world,Definitions ,Transaction time, tt: the time that a fact is current in the database Tt may be associated with any database entity, not only with facts Although all entities can be assigned a tt, the database designer may decide to not capture this aspect for some entities Tt aspect o
6、f an entity has a duration: from insertion to deletion, with multiple insertions and deletions being possible for the same entity Hence, deletion is pure logical (not physically removed but ceased to be part of the databases current state,Definitions ,Tt captures time varying states of the db & apps
7、. that demand accountability and tractability rely on dbs that record Tt Tt, unlike vt, is well-behaved and may be supplied automatically by the DBMS Both tt and vt values are drawn from a time domain, which may or may not stretch infinitely into the past and future Time domain may be discrete or co
8、ntinuous In databases, a finite and discrete time domain is typically assumed,Definitions ,Time is assumed to be totally ordered, but various partial orders and cyclic time has also been suggested Uniqueness of “Now”: the current time is ever-increasing, all activity is trapped at the current time,
9、and current time separates the past from the future The spatial equivalent “here” doesnt have the above properties; the biggest difference between time and space is that time cannot be reused! The uniqueness of now is one of the reasons why techniques from other research areas are not readily (or no
10、t at all) applicable to temporal data Now offers new data management challenges particular to temporal databases,Modeling,To extend a DBMS to become temporal, mechanisms must be provided for capturing valid and transaction times of the facts recorded by relations (temporal relations) More than 24 ex
11、tended relational models proposed to add time to relational model, most of which supported only valid time We consider three bitemporal ones for a video rental applications: customers check out tapes for certain durations of time and dates.,Modeling ,Bitemporal Conceptual Data Model (BCDM): timestam
12、ps tuples with sets of (tt, vt) values,C101 rents T1234 on May 2nd for 3 days, & returns it on 5th C102 rents T1245 on 5th open-ended, & returns it on 8th C102 rents T1234 on 9th to be returned on 12th. On 10th the rent is extended to include 13th but tape is not returned until 16th.,cID,TapeNum,C10
13、1,C102,C102,T1234,T1245,T1234,(2,2), (2,3), (2,4), (3,2), (3,3), (3,4), , (UC,2), (UC,3), (UC,4),(5,5), (6,5), (6,6), (7,5), (7,6), (7,7), (8,5), (8,6), (8,7), (UC,5), (UC,6), (UC,7),(9,9), (9,10), (9,11), (10,9), (10,10), (10,11), (10,12), (10,13), (13,9), (13,10), (13,11), (13,12), (13,13), (14,9)
14、, , (14,14), (15,9), , (15,15), (16,9), , (16,15), , (UC,9), , (UC,15),Modeling ,Bitemporal Conceptual Data Model (BCDM): timestamps tuples with sets of (tt, vt) values,C101 rents T1234 on May 2nd for 3 days, & returns it on 5th C102 rents T1245 on 5th open-ended, & returns it on 8th C102 rents T123
15、4 on 9th to be returned on 12th. On 10th the rent is extended to include 13th but tape is not returned until 16th.,1,17,5,1,5,9,9,Modeling ,BCDM pros: Since no two tuples with mutually identical explicit values are allowed in BCDM relation instance, the full history of a fact is contained in exactly
16、 one tuple Relation instances that are syntactically different have different information content and vice versa BCDM cons: Bad internal representation and display to users of temporal info Varying length and voluminous timestamps of tuples are impractical to manage directly Timestamp values are har
17、d to comprehend in BCDM format,Modeling ,Fixed-length format for tuples, where each tuples timestamp encodes a rectangular or stair-based bitemporal region Several tuples may be needed to represent a single fact,C101 rents T1234 on May 2nd for 3 days, & returns it on 5th C102 rents T1245 on 5th open
18、-ended, & returns it on 8th C102 rents T1234 on 9th to be returned on 12th. On 10th the rent is extended to include 13th but tape is not returned until 16th.,Modeling ,Non-first-normal-form representation, in which a relation is thought of as recording information about some types of objects (see pa
19、per) Note that 2nd tuple records two facts: rental information for customer C102 for the two tapes Pros of the two latter models: No need to update the relation at every tick, it is achieved by introducing “now” variable that assume the current value Two choices to enter time values into relations A
20、t the level of tuples (tuple timestamping) At the level of attribute values (attribute timestamping),Modeling ,Relation instances that all three models may record are snapshot equivalent (corresponding to a point-based view of data), e.g.,A,Vs,Ve,a,b,2,2,8,8,A,Vs,Ve,a,a,2,5,4,8,b,2,8,A,Vs,Ve,a,b,2,2
21、,8,4,b,5,8,The first relation is coalesced version of the other two, but they are snapshot equiv. Coalescing operation merges value equivalent tuples with same non-timestamp attributes and adjacent or overlapping time intervals,Modeling ,BCDM only allows coalesced relation instances, i.e., relations
22、 are only different if they are not snapshot equivalent The last two relations are not legal in BCDM However, the three relations are not equivalent from an interval-based view: First relation: a tape was checked out for 7 days Second relation: the tape was checked out for 3 days initially and then
23、for 4 more days,Querying,Temporal queries “can” be expressed via conventional query languages such as SQL (e.g., current temporal applications); however, with great difficulty,cID,TapeNum,C101,C102,C102,C103,T1234,T1425,T1324,T1243,cID,TapeNum,C101,C102,C102,C103,T1234,T1245,T1324,T1243,C101,T1245,C
24、102,T1425,C102,T1434,Vs,Ve,2,5,22,9,4,9,7,21,now,14,19,25,10,now,At time 17, the first relation is a snapshot of the second,S-CheckedOut,V-CheckedOut,Querying ,Number of current checkouts: SELECT COUNT (TapeNum) FROM S-CHeckedOut Temporal generalization of the above query: time-varying count of tape
- 1.请仔细阅读文档,确保文档完整性,对于不预览、不比对内容而直接下载带来的问题本站不予受理。
- 2.下载的文档,不会出现我们的网址水印。
- 3、该文档所得收入(下载+内容+预览)归上传者、原创作者;如果您是本文档原作者,请点此认领!既往收益都归您。
下载文档到电脑,查找使用更方便
2000 积分 0人已下载
下载 | 加入VIP,交流精品资源 |
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- INTRODUCTIONTOTEMPORALDATABASERESEARCHPPT