Temporal Semantic Assumptions and Their Use in Database Query

Temporal Semantic Assumptions and Their Use in Database Query

Temp oral Semantic Assumptions and Their Use in Database Query Evaluation Claudio Bettini X. Sean Wang Sushil Ja jo dia Technical Rep ort: ISSE-TR-95-105 Department of Information and Software Systems Engineering George Mason University June 13, 1995 Abstract Temp oral data explicitly stored in a temp oral database are often asso ciated with certain seman- tic assumptions. Each assumption can b e viewed as a way of deriving implicit information from the explicitly stored data. Rather than leaving the task of deriving p ossibly in nite implicit data to application programs, as is the case currently, it is desirable that this b e handled by the database management systems. Toachieve this, this pap er formalizes and studies twotyp es of semantic as- sumptions: p oint-based and interval-based. The p oint-based assumptions include those assumptions that use interp olation metho ds, while the interval-based assumptions include those that involve dif- ferent temp oral typ es time granularities. In order to incorp orate semantic assumptions into query evaluation, this pap er intro duces a translation pro cedure that converts a user query into a system query such that the answer of this system query over the explicit data is the same as that of the user query over the explicit and the implicit data. The pap er also investigates the niteness safety of user queries and system queries. 1 Intro duction A prominent feature of temp oral information is its richness in semantics asso ciated with its temp oral domain. When querying a temp oral database, a user naturally assumes some \usual" semantics on stored temp oral data. For instance, she exp ects that her bank account balance p ersists, i.e., the balance stays the same unless a transaction|dep osit, withdrawal or accrual of interest|is p erformed. Therefore, if she wishes to nd the balance at a particular time and no balance amount is stored for that time, she lo oks for the balance of the last transaction that was p erformed b efore the time in question. Semantic assumptions may also involve di erent temp oral typ es time granularities. For example, when the user A preliminary version of this pap er app eared in the 1995 Pro ceedings of the ACM SIGMOD International Conference on Management of data. This work was supp orted in part by an ARPA grant, administered by the Oce of Naval Research under grantnumb er N0014-92-J-4038. Work of Bettini was p erformed in part while visiting George Mason University.Work of Wang was also supp orted by the NSF grant IRI-9409769. Bettini is with the Dipartimento di Scienze dell'Informazione, University of Milano, 20135 Milano, Italy, and Wang and Ja jo dia are with the Department of Information and Software Systems Engineering, George Mason University,Fairfax, VA 22030{4444. Emails: [email protected] and fxywang, [email protected]. 1 asks for the account holder of a certain account in a particular month and account holders are stored in terms of days, she naturally assumes that the answer is someone who is the account holder of that account on all the days within that month. Researchers have long realized such richness of semantics in temp oral data [CT85, SS87, Tan87] and provided various op erators in di erent query languages for the users to co de the semantic assumptions into queries [SS87,Tan87]. For the aforementioned balance query, the user would use a \last" or similar op erator in her query to retrieve the appropriate balance. We argue, however, that temp oral semantics should b e an integral part of temp oral databases and users should not b e burdened with having to incorp orate these semantics in their queries. In the account balance example, the user should b e able to query the database directly ab out the balance at any particular time, instead of having to co de the semantics of the balance into the query. The system should b e able to answer the query appropriately according to the semantics. To provide such an ability, the system has to include a precise formalization of the temp oral semantics, and evaluate queries according to these semantics. In this pap er, we provide a framework to incorp orate temp oral semantics into temp oral databases and investigate a metho d to evaluate queries with semantics. Consider the bank account example in more detail. Assume the temp oral relation ACCOUNTS records accountnumb ers AcctNo, account holder AccHol, account balance Balance, annual interest rate AnIntRate, and the asso ciated time Time, i.e., the time when the rep orted values b ecome true. We can assume that new tuples are added to this relation when an event o ccurs such as the op ening of an account, a dep osit, a withdrawal, or a change in interest rates. The values of Time are timestamps consisting of the date month/day/year concatenated with the time of the day up to seconds. Here and in the rest of the pap er timestamps represent valid time; extensions to include transaction time and other temp oral dimensions are not considered. An instance of the ACCOUNTS relation is shown in Figure 1. AcctNo AccHol Balance AnIntRate Time 1001 J.Smith 1000 3.00 3/3/93:09:01:00 1001 J.Smith 3500 4.00 3/4/93:10:01:55 1500 A.Brady 2000 3.00 3/4/93:11:00:00 2034 T.Ford 500 2.50 3/4/93:12:19:03 1500 A.Brady 1500 3.00 3/4/93:18:00:00 1001 J.Smith 4000 4.00 7/3/93:09:00:00 Figure 1: An instance of the relation ACCOUNTS Since we store new tuples only when some of the attribute values change, the relation do es not contain an explicit tuple for every second of eachday for an account. However, if asked ab out the balance of Mr. Smith's account at no on of March 4, 1993, we could answer without hesitation that the balance was $3,500. This is b ecause we assume that nothing has changed for that account since the last transaction b efore that time. Here wesay that the attribute Balance satis es a semantic assumption called persistence for each account. Another example of p ersistence is given by the attribute AccHol that is intuitively p ersistent for each account. 2 Other assumptions apply when di erent temp oral typ es or granularities are considered. For example, the attribute AnIntRate can b e classi ed as liquid, meaning that it satis es the following prop erties: It is downward-hereditary: If the value of AnIntRate is 3.00 for a month, we can assume that its value is 3.00 for eachday of that month. It is upward-hereditary: If the value of AnIntRate is 3.00 for eachday of a month, we can assume that its value is 3.00 for that month. The terms \liquid" and \downward/upward hereditary" are b orrowed from the temp oral reasoning community [Sho87]. Note that not all attributes are p ersistent and/or liquid. For example, consider a relation with the attributes hAcctNo, Amount, secondi that stores the time and the amount of each dep osit or withdrawal to a certain account. The Amount attribute is obviously neither p ersistent nor liquid. The aforementioned semantic assumptions, namely p ersistence and liquidity, are among the most common ones that have b een identi ed by the temp oral reasoning community. There are other semantic assumptions that arise quite naturally in databases. For example, if a database stores annual salaries of the employees, the monthly salary can easily b e determined by dividing the annual salary by 12. Contribution of the pap er Recognizing and formalizing that a group of attributes satis es some semantic assumption is very useful in answering queries ab out values of attributes at times of same or di erent temp oral typ es for which avalue is not explicitly stored. One of the contributions of this pap er is to formalize the notion of semantic assumptions for the purp ose of query evaluation. In this pap er, each semantic assumption is viewed as a function for deriving implicit information from explicit information by applying one or more information generation pro cedures. Such generation pro cedures are formally captured by our notion of assumption metho ds. Intuitively, an assumption metho d derives implicit information using some sp eci c rule. For example, \p ersistence" can b e regarded as one such rule that uses the latest stored value as the currentvalue for an attribute. In Figure 1, by applying the p ersistence metho d on the Balance attribute, we obtain $1,000 to b e the balance at the time 3/3/93:09:01:01, 3/3/93:09:01:02, 3/3/93:09:01:03, 3/3/93:09:01:04, and so on. The function for a semantic assumption that uses p ossibly di erent metho ds to generate information for di erent attributes, is then a \comp osition" of the rules of the appropriate assumption metho ds. DB the database that contains, in addition to DB , the We denote by DB the database and by data generated by applying all semantic assumptions. A user query on a database DB is viewed as a query on DB . If the query asks for the balance of account 1001 at no on of March 4, 1993, it retrieves values from DB , and gives $3,500 as the answer.

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    33 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us