ImageVerifierCode 换一换
格式:PPT , 页数:37 ,大小:173.50KB ,
资源ID:376723      下载积分:2000 积分
快捷下载
登录下载
邮箱/手机:
温馨提示:
快捷下载时,用户名和密码都是您填写的邮箱或者手机号,方便查询和重复下载(系统自动生成)。 如填写123,账号就是123,密码也是123。
特别说明:
请自助下载,系统不会自动发送文件的哦; 如果您已付费,想二次下载,请登录后访问:我的下载记录
支付方式: 支付宝扫码支付 微信扫码支付   
验证码:   换一换

加入VIP,免费下载
 

温馨提示:由于个人手机设置不同,如果发现不能下载,请复制以下地址【http://www.mydoc123.com/d-376723.html】到电脑端继续下载(重复下载不扣费)。

已注册用户请登录:
账号:
密码:
验证码:   换一换
  忘记密码?
三方登录: 微信登录  

下载须知

1: 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。
2: 试题试卷类文档,如果标题没有明确说明有答案则都视为没有答案,请知晓。
3: 文件的所有权益归上传用户所有。
4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
5. 本站仅提供交流平台,并不能对任何下载内容负责。
6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

版权提示 | 免责声明

本文(Introduction to Temporal Database Research.ppt)为本站会员(刘芸)主动上传,麦多课文库仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。 若此文所含内容侵犯了您的版权或隐私,请立即通知麦多课文库(发送邮件至master@mydoc123.com或直接QQ联系客服),我们立即给予删除!

Introduction to Temporal Database Research.ppt

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

25、s checked out If now is replaced with a fixed time value, this can be done in SQL in 6 steps and 35 lines! Specifying a key constraint: ALTER TABLE S-CheckedOut ADD PRIMARY KEY (TapeNum) TapeNum is also a key for V-CheckedOut at each point in time It takes 12 line and a complex SQL statement to expr

26、ess this constraint,Querying ,Hence, some 40 temporal query languages have been proposed (most with their own data model), e.g., TSQL2 Simple queries should remain simple: VALIDTIMESELECT COUNT (TapeNum) FROM V-CheckedOut CONSTRAINT temporalkey VALIDTIME UNIQUE TapeNum Early languages based on: rela

27、tional algebra Later: calculus-based, Datalog-based and OO Recent: extensions to SQL,Querying ,Many modeling issues impact the language design, e.g., time stamping tuples or attributes Language design must consider: time-varying nature of data, predicated on temporal values, temporal constructs, sup

28、porting states and/or events, supporting multiple calendars, modification of temporal relations, cursors, views, integrity constraints, handling now, aggregates, schema versioning, periodic data,Querying ,Desired properties of temporal query languages: Temporal upward compatibility: conventional que

29、ries and modifications of temporal relations should act on the current state Pervasive support for sequence queries: that request the history of something, e.g., temporal aggregation above Support for point-based and interval-based view of data Adequate expressive power Ability to be efficiently imp

30、lemented,DBMS Design,Database schemas capturing time-referenced data are complex Two traditional contexts of database design: Data model of DBMS at 3 levels: view, logical, physical (e.g., relational model for the first two) A high-level conceptual design model: ER model Then, mappings bring a conce

31、ptual design into a schema that conforms to the specific implementation data model (e.g., ER to relational mapping) Here: we consider temporal database “logical” and “conceptual” design,Logical Design,Need for guidelines such as formalization guidelines, but conventional normalization concepts are n

32、ot applicable to temporal relational data models A range of temporal normalization concepts have been proposed: temporal dependencies, keys and normal forms Conventional dependencies do not apply: TapeNum does not determine cID, (go through 3 examples) But it should: at any point in time, a tape can

33、 only be checked out by a single customer TapeNum temporally determines cID, but the reverse does not hold,Logical Design ,A temporal relation satisfies a temporal dependency if all its snapshots satisfy the corresponding conventional dependency How to determine snapshots? Timeslice operators: Tempo

34、ral predicate as argument: e.g., contain A time point as parameter: e.g., (tt, vt) Returns snapshot of the relation corresponding to the specified time point, omitting the timestamp attribute Problem: an atemporal approach! which applies to each snapshot of a temporal relation in isolation and hence

35、 fails to account for “temporal” aspects of data,Logical Design ,Consider dependencies and associated normal forms that hold between time points Build in the notion of time granularity into the normalization concepts Not only consider snapshots computed at non-decomposable time points, but also at c

36、oarser granularities: Video rental examples: day as finest granularity, weeks and months may also be considered,Logical Design ,Introducing new concepts that capture the temporal aspects of data and may form the basis for new database design guidelines Most prominent candidate: time patterns Video r

37、ental example: since the set of tapes checked out by a customer changes more frequently that the customers address, they should be stored in separate relations Another candidate: lifespan Attributes with different lifespan (to avoid null values) or with different precision (hour vs. day) should be s

38、tored separately,Conceptual Design,ER diagrams become obscure and cluttered when an attempt is made to capture temporal aspects (see example) CheckedOut relationship should become ternary by introducing an artificial entity set to capture time of rental However, still issues remain: varying rental p

39、rice over time, transaction time inclusion, Some industrial solution: ignore temporal aspects in the ER diagram and supplement it with textual phrases, e.g., “full temporal support” no automatic mapping from ER to model Dozens of temporally enhanced ER models proposed,Conceptual Design ,Give all exi

40、sting ER constructs temporal semantics, similar to “applies to all snapshots” for normalization Does not result in any new syntactical constructs Rules out databases with non-temporal parts: while the syntax of legacy diagrams remain valid their semantics have changed! Devise new notational shorthan

41、d for frequent temporal aspects in ER diagram (e.g., time varying attributes) Both non-temporal and mixed databases can be modeled More difficult to understand,Conceptual Design ,All existing models assume mapping to relational model None tries to map to one of the several time-extended relational m

42、odels Also mapping to emerging models (e.g., SQL3/ORDBMS) are missing.,DBMS Implementation,Integrated approach: internal modules of a DBMS are modified or extended to support time-varying data Efficiency Layered approach: a software layer interposed between the user applications and DBMS that conver

43、ts temporal query language statements to conventional statements Realistic for short and medium term Popular approach: integrated, utilizing timestamping tuples with time intervals,Query Processing,Temporal queries are large and complex Also, the predicates might be temporal, e.g., overlap among two

44、 time intervals Unlike equality predicate in conventional joins, temporal joins require multiple inequality predicates to be examined: two intervals I and j overlap iff st(i) = end(j) and st(j) = end(i) Coalescing of data should be implemented efficiently: interactions among coalescing, duplicate re

45、moval and ordering,Query Processing ,Opportunities for temporal query optimization: Time advances continuously, hence for transaction time, time value used most recently in updates is the largest value used so far natural sorting and clustering: if current and logically deleted tuples are stored sep

46、arately, then Current clustered on st(tt) Deleted clustered on end(tt) Integrity constraint st(j)end(j) Intervals associated with a key value are contiguous in time (end of one interval is the beginning of the other),Implementation of Algebraic Operators,Efficient implementation of temporal selectio

47、n, joins, aggregates, and duplicate elimination temporal index structures Variety of binary temporal joins have been proposed: time-join, time-equijoin, as extensions of nested loop or merge join that exploits orders or local workspace as well as partitioning based joins Also, incremental techniques

48、 for implementing operators on relations capturing transaction time have been discussed Caching the results of previous computations to be reused later (easy to do since the records of updates, I.e., changes to previously cached results, are already contained in a temporal DBMS),Imp. Of Algebraic Op

49、s,Efficient implementation of time-varying aggregates Efficient implementation of coalescing: Sorting the argument relation on the explicit attribute values as well as the valid time Perform the merging in the subsequent scan,Indexing Structures,Similar to spatial index structures can be based on traditional indexes such as B+-tree or multidimensional ones such as R-tree Index structures usually used for selection operators Active research investigation: use index structures for temporal joins, coalescing and aggregates,

copyright@ 2008-2019 麦多课文库(www.mydoc123.com)网站版权所有
备案/许可证编号:苏ICP备17064731号-1