Using Views to Implement Transaction Time Databases on ... - PUCRS

0 downloads 0 Views 51KB Size Report
Programa de Pós-Graduação em Ciência da Computação – PPGCC - Faculdade de Informática. Pontifícia Universidade Católica do Rio Grande do Sul – ...
8VLQJ9LHZVWR,PSOHPHQW7UDQVDFWLRQ7LPH 'DWDEDVHVRQ&RPPHUFLDO5HODWLRQDO'%06 (XJrQLRGH2OLYHLUD6,021(772 Programa de Pós-Graduação em Administração - PPGA Universidade Federal do Rio Grande do Sul – UFRGS Porto Alegre – RS – Brazil E-mail: [email protected] and 'XQFDQ'XEXJUDV$OFRED58,= Programa de Pós-Graduação em Ciência da Computação – PPGCC - Faculdade de Informática Pontifícia Universidade Católica do Rio Grande do Sul – PUCRS Porto Alegre – RS – Brazil E-mail: [email protected]

$%675$&7 This work presents an approach to incorporate temporal aspects in commercial relational databases taking into account the present functionality offered by the most advanced relational DBMS, e.g. Oracle and MS-SQL Server, at the level of active databases (ECA standard) and database views. The approach takes into consideration two directives. First, the implementation of the temporal aspects of the application information into the database specification model must be done automatically. Second, the way to manipulate the application data must be the same as a database application model without the implementation of the temporal aspects by those users who do not need to (or should not) know about the temporal aspects of the database. .H\ZRUGV Transaction-Time DBs, Temporal Data Modeling, Triggers, Active DBs, Relational DBMS. ,1752'8&7,21 It is not recent the need of supporting data with temporal characteristics on databases. Several temporal models were proposed, usually extending traditional data models to capture also the temporal aspects. There is an effort to standardize it (see TSQL2 [1]). Instead of developing a DBMS for these temporal models, a temporal database can be implemented mapping the temporal data model to a non-temporal relational database. Temporal information, implicit in the temporal data model, will be explicitly represented and manipulated.

The temporal information is necessary in several applications of human knowledge, as academic systems, health systems, account systems, geographical information systems (GIS), data warehouses and others. However, the most popular DBMS, e.g. Oracle, MS-SQL Server, Sybase and Ingres, offer very little to support temporal data. The necessary acquaintance by the implementation model of the temporal database with the set of users, who see it as an instantaneous model (according to [2] terminology), becomes evident whenever we realize the volume of developed programming which uses the database, even being these application program implemented at Cobol or PL/I (still in quantities of large significance) or at Delphi, Visual Basic or Power Builder (tools very used nowadays). The migration, conversion or even reengineering process (non-temporal databases to temporal databases) is very difficult. This work proposes a way to implement time-transaction databases to relational DBMS taking into consideration the present functionality offered by them. The objective is to turn feasible the temporal data treatment without interfere with the users’ work, which does not need to (or should not) know about these temporal aspects on the database. For these reasons the solution presented in this paper automates the update of the temporal part of data from the database. This work is organized as follows. On section 2 we discuss some aspects for time representation on the model. Section 3 defines the different types of users for the approach. Our approach is presented on section 4 and, on section 5, we present our conclusions.

7,0(5(35(6(17$7,21217+(02'(/ For the representation of temporal data aspects, we use the concept of database state [3], where each state is defined by their attribute values. Any update done on the value of an attribute creates a new state in the database. Each state has a defined duration that is represented by a time interval in which no update on the attribute value was made. For this reason, each instance of the database is labeled with a temporal interval. Based on the possible ways of data temporal representation in a database – YDOLG WLPH, WUDQVDFWLRQ WLPH and both of them (see [2] for more details) – we conclude that in the model being proposed the temporal aspects should be represented by WUDQVDFWLRQ WLPH [2]. By using this time line, the temporal data would not need to be manipulated directly by the user, since the DBMS uses the system time. In order to represent the WUDQVDFWLRQWLPH two special attributes are used: the start of the transaction period (S_TT) and the end of the transaction period (E_TT). In order to validate the proposed model, the time format 00''