Adaptive Retrieval Time-Related Data Model for Tracking Factors Affecting Diabetes

In the last four decades several dozens of representing time-oriented data/knowledge bases have been presented. Some of these representations violate First Normal Form (1NF) by using Non-First Normal Form (N1NF) prototypes and temporal nested representations, while others simulated the concepts of temporal data with relational data representation without violating 1NF. In this article, a new interval-based knowledge representational data model with an optimized retrieval techniques are employed for modeling and optimality retrieve a biomedical time-varying data (factors/observations that affect the diabetes). The used time-related data model is more compact to represent time-varying data with less memory (capacity) storage with respect to the main representations in the literature, but which is as expressive as those representations (a transformation algorithms show that data represented in this model can be transferred to/from the representations in the literature with zero percent loss of information). A new data structure is defined with the optimal retrieval techniques to prove some basic properties of the used time-model and to ensure that the time-model is an extension and reduction of the main representations in the literature, namely TQuel and BCDM. The expressive power, reducibility, and easy implementation of the proposed model, especially for the legacy systems, are considered as advantages of the proposed model. Keywords—Diabetes database; time-data model; diabetes observations; valid-time data; knowledge-based data


I. INTRODUCTION
The reproduction method of Time-varying data representation in RDBMS is considered as bases of timeoriented information, and it provides temporal information models and stores data associated with the past, present and future. TDB also offers communicative and proficient ways to reproduce, stock up, and inquire about special temporal situation of the stocked information in contrast to the conventional databases which record single state of the real world phenomena. TDB is a vital area of study, with a dynamic population of a number of hundred investigators who have brought about thousands of research articles over the recent thirty years [1,2,4]. Conventional information record is utilized to stock and treat the information that refers to the present moment in time, without supporting the temporal features which maintain temporal database and store data referring to what went before, to current time and to upcoming time. There has been a discussion within the recent thirty years on how to represent, execute and inquiry about time-based information record in an efficient way. An increasing concern with time-varying information records in several practice fields which address matters in managing temporal information [2,3,4,9,14,18,26,33]. Most of these publications touched upon the various features of time-varying information records.
The remaining part of this article is structured as it follows: Section 2 introduces the problem background and the existing techniques that deal with modeling time-varying data, Section 3 introduces the classification of time-varying information prototype expansions. Section 4 describes the representational methodology of time-data models. Section 5 compares three TDB prototypes in terms of memory storage representation. Lastly, Section 6 draws a conclusion and a close this article.

II. BACKGROUND
Handling time-varying database can be accomplished by two approaches as mentioned in [5,6,10], namely, (1) The integrated approach is to build a complete TDB Management System from zero, which offers a primal information kind and deals with the various situations/time examples of the information being stocked. This approach involves bottom-up construction an entire TDBMS, which is a very huge and time-wasting job. It is also not easy since the fundamental values used by profitable DBMS to increase effectiveness of functions have to be improved and many of abstract works need to be performed to prove that the novel structure is entirely wholly perfect. The scope of time and workforce needed for this advance is parallel to that required by profitmaking sellers to build up DBMS that all of us know nowadays. (2) The stratum method is to develop a strategy that expands time-independent information representation to time-varying information representation on top of common DBMS that behaves as a layer. The second method does not entail any alterations to the available information record technique. It can be merely elaborated by constructing an innovative method for time-varying backup in addition to the available common DBMS.
Modeling temporal database in relational framework by appending extra vertical divisions for time to the correlation(s) appears to be a straightforward way [5,11,12,13,20], yet it does not solve many delicate matters particularly for timevarying information. Many expansions of relational information representation to time-varying information The authors, therefore, acknowledge with thanks to DSR's technical and financial support representations Methodology.
In this paper, a taxonomy of all the possible extensions of Temporal Database Model (TDM) are developed as shown in Fig. 1 and according the naming conventions appear in the consensus glossary in [15]. Based on that, a novel information reproduction, a semantic time-varying relational data model that extends model in [33] (Snodgrass' Tuple Timestamped data representation) are introduced to deal with interval-based knowledge representation in relational data model. A new data structures, a cost model for the memory storage use for the proposed time-data model are defined. The extended model, and time-based relational algebra also provided to prove some essential characteristics and to ensure that the proposed model is an extension and reducible of BCDM.

III. MODELING TIME-VARYING DATA
Modeling time-varying information in relational framework differs in many perspectives [9], the most recurrently declared methods are tuple timestamping with 1NF, and attribute timestamping with N1NF as shown in Fig.  1. Integrating time in relational data representation could be done by one of the TDB prototypes approaches that are shown in Fig. 1, which shows the approaches of modelling timevarying data in relational framework. These approaches can be either by applying 1NF or by violating 1NF using multi-value attributes or nested relations. The first method -1NF-has two differentiations, specifically; (1) Tuple Timestamping Single Relation (TTSR), this approach incorporates time in relational data model by adding extra timestamps attributes to the conventional association. Several time-varying information representation debated in [9] can be classified under this method. An instance of some of these time-varying information prototypes are LEGOL 2.0 by Jones [29], Temporally Oriented Data Model by Ariav [31], HSQL by Sarda [32], and TQuel by Snodgrass [33]. The time-varying information record representations can be harmonized or diverse. The time-varying harmonized feature of temporal information record relations [32] is defined as time-varying associations in which the temporal time of all information merits (that is to say the time over which they are determined) in each tuple is the same [9]. And as stated in [9,24,29] the representations that employ tuple timestamping are essentially temporally identical because only temporally uniform associations are probable, to conclude that the representations that are based on TTSR approach are temporally homogeneous. Temporally heterogeneous database relations are temporal database relations in which the temporal time of the information merits in each tuple can be dissimilar. Since 1NF tuple timestamped temporal relations that allow extension over or following tuples of equivalent values-are not coalesced [9] then the representations under this approach are not coalesced because tuples of equivalent values-are not unacceptable. The time representation of the stored facts can be event timestamp, or interval timestamps. Finally, this approach can model the diverse temporal time aspects like valid-time, transaction time, or Bitemporal time. TTSR method is not proficient since it presents tautology, where information merits that vary at diverse time are recurring in manifold tuples. (2) Tuple Timestamping Multiple Relations  (TTMR), this method has resolved the issue of information  tautology in TTSR by breaking down the temporal correlation  as ensuing: Temporal values are spread over manifold  associations, and non-temporal values are regrouped into a  segregate association. Several time-varying information representations debated in literature [9] can be classified under this method. An instance of some of these time-varying information representations is the Temporal Relational Model by Navathe [30], and Snodgrass [8], and Tansel [16]. The temporal information representations under this method are attribute timestamping, thus, they are heterogeneous since the temporal time of the element worth in each tuple can be dissimilar, coalesced because value-equivalent tuples are disallowed. The time representation of the stored facts can be event timestamp, or interval timestamps. Finally, this approach can model the diverse time aspects like valid-time, transaction time, or Bitemporal time. The problem with the data representations under this approach is when the data for an entity is need to be to combined, a variant of bond known as temporal intersection join would be required, which is by and large costly to be accomplished. The second approach (N1NF) employs multi-value attributes, or in other words nested relations for tuple timestamping or attributes timestamping. As is shown in Fig. 1 the tuple timestamping approach uses sets of time chronons (the smallest time unit) for timestamping associated tuples. BCDM by Jensen and Snodgrass [9] is an example of this model. Prototypes under this category are homogeneous and coalesced. In attributes timestamping approach non-atomic attribute values are associated with temporal time. Historical Relational Data Model by Clifford-2 [33], HQuel by Tansel [34], Homogeneous Relational Model by Gadia-1 [32], Heterogeneous Relational Model by Gadia-2 [35], and TempSQL by Gadia-3 [35] are temporal data prototypes that can be considered under this category. N1NF may not be competent of directly utilizing a relational stocking construction or a questioning appraisal method that depends on tiny element merits, thus this approach (N1NF) will be excluded from this study. A variety of methods for managing time-varying information can be spotted in [1]. The traditional modelling technique for temporal database is not efficient since the prototypes that are based on 1NF model introduce redundancy, while the prototypes which are based on N1NF model may not be capable of directly implemented in conventional DBMS [9]. Using the integrated approach for implementing TDB prototypes in conventional DBMS is a costly task and can be accomplished only by the DBMS vendors [6]. Therefore, many temporal database prototypes have been anticipated in attempting to seize the time-varying attribute of information in ease of use and system performance [2,34,27]. The implementation of TDB in conventional DBMSs is not an easy task [34], this is because conventional DBMSs do not offer prototypes to back up and treat the temporal dimensions of the implemented database [5,11]. Because of the unnecessary tautology of information, costly execution, and the complexity of implementing TDB in relational framework, an intelligent way is required to represent, execute, and question TDB in correlation outline. This section will begin by presenting the proposed TDB model for modelling the biomedical data. This data model is termed as Tuple Timestamp Historical Relation (TTHR). The generic means of temporal database is an information record with some sort of temporal back up. In this paper the focal point is on the valid time characteristic of time-varying information in relational information records; nevertheless, the debate might simply be expanded to information records that sustain transaction-time and bitemporal time. Then the semantics of associating time aspect to temporal database objects as well as representing these objects in TTHR will be explained in this section. Time Domain is assumed linear, bounded, and discrete constructional features of the temporal field for timestamping the proposed TDB representation as in [9]. Chronons (the smallest time unit) are utilized that have length and limited precision [14]. The temporal domains have overall orders and are similar in form and relations to the domain of ordinary figures. Associating Time Aspects to the Database Objects can be affirmed as valid time and transaction time where together are conceived as the universal features of all information record data [28,29]. Since the data in the information schemes are built by a number of characteristics, then valid time and transaction time characteristic related to a group of aspects might be employed to record the valid time of the data, or the time when the data are present in the information record. The duration time and transaction time are universal features of the unit types or association types. The lifetime of an information record entity as in [29] is the moment in time over which it is identified, or the moment in time when the matching entity exists in the reproduced reality. The valid-time lifespan of an information record object refers to the point in time when the entity exists in the constructed reality, whereas the transaction-time lifespan of an information record object refers to the point in time when the object is present in the information record. The information record object's lifespan can be reduced to validtime as mentioned in [31]. In this study, only the valid-time lifetime of an information record entity is considered, where the matching entity can have one or more time-varying attributes. For these time-varying attributes, a valid-time aspects is associated in such a way that the valid-time aspects are rigorously enclosed in or equal to the lifespan of the object (example valid-time interval [3,7] for lifespan interval [1,34], for short the term lifespan time aspect is used instead of validtime lifespan to avoid the confusion). In general, an object type in an abstract data representation which matches with one relational schema in the rational data representation can be associated with the subsequent time features: (1) Lifetime period feature, if the lifetime of that object sort is a division of the represented moment in time, the object category will be associated with the lifetime period features. (2) Transaction time aspect indicates the presented time of the object in the information record. Association categories in an abstract representation which matches with one relational schema in the rational representation can be attributed by: (1) Lifetime period feature where the lifetime of the association kind should be a division of the lifetime of the contributing objects.
(2) Transaction time, where the meaning of the transaction time features of the association kind is a division of the lifetime or transaction-time features of the contributing objects. The time-varying backup for association kinds (encompassing lifetime and transaction-time) may be as an immediate occurrence where the characteristics of these association kinds are thought of as predetermined (timeindependent) features. Also, it may be a lasting occurrence where the characteristics of this association kind may be temporal features, or the non-temporal representation of these characteristics. The characteristics in the abstract representation that are matching with the vertical divisions of a chart in the rational representation might be regarded as temporal or non-temporal characteristics. In case of timevarying attributes, the time aspects that can be assigned to these attributes are as follows: (1) Valid-time feature, where these time features are supposed to be a division of the lifetime of the related object kinds or association sort. (2) Transaction-time, where these temporal features are supposed to be a division of transaction-time of the related object kind or association sort. (3) Bi-temporal time features, where these temporal features have the composite constraints of valid-time and transaction-time features. This temporal relationship and the constraint of characteristics are applicable for the characteristics that ensue from single-to-multiple association. The data in Table I depicts the features of time for which they ought to be supplied for the information record items and as shown in [12]. The temporal features that might be connected to diverse information record items are dissimilar from one information record item to another. For instance, a lifetime period may not be connected with characteristics as it shows the availability of the item or unit sort in the modeled reality. Thus, the relationship of a point in time with a diverse information record item ought to be constrained in accordance with Table I. Coding that, a lifetime moment in time can be coupled with a correlation kind that has been being by itself; however, in case the association is carried out as an aspect of one of the constituting objects, it will be processed as an aspect and cannot be coupled with a lifetime scope.

A. Representing and RetrievingTime-Vaying Data (Diabetes Data ) using TTHR Approch
A temporal object in TTHR can be associated with and restricted to time aspects stated in Table I. The valid time features for attribute objects, and lifetime aspects for entity and relationship objects are considered as a timestamping method in this article (it could trivially extend this model by replacing lifespan time aspects by transaction-time aspects, with such an expansion, the proposed model is insignificantly a constant expansion of BCDM [9,29]). The field of applicable times can be represented as and the field of lifetime intervals can be represented as distinguished value that represents a very large value for time (say 3000 ac). The time domain of both VT and LS is an order of natural numbers. In what follows, T R is employed to indicate the schema of temporal relation. The group of attributes, which constitute T R may be classified into key attributes (K), non-temporal attributes (Unchangeable (U)), temporal attributes (Changeable(C)), and Timestamps attributes (T).
, and a new secondary association representation is/are strongly correlated and in reference to tuple x . The tuple(s) is composed of the principal key of x , the characteristics (index) of the temporal aspect in x , the updated temporal features value  in x , and the validity of the updated characteristic vs T and ve T . A division of the field of natural life time is connected to each tuple in T R demonstrates that the availability of the item registered by the tuple is factual in the reproduced veracity all through every lifetime chronon in that division. A division of field of valid times is coupled with every tuple in T R VT _ , denotes the reality that the tuple   is defined as blood pressure higher than 140 over 90 mmHg (millimeters of mercury). .

Glucose Tolerance Test(GTT)
A glucose tolerance test measures how well your body's cells are able to absorb glucose, or sugar, after you ingest a given amount of sugar.

Glycosylated Haemoglobin (HBA1c)
A form of hemoglobin that is measured primarily to identify the three-month average plasma glucose concentration.

Fructosamine (Fru)
Fructosamines are compounds that result from glycation reactions between a sugar.

Postprandial Blood Glucose (PBG)
A postprandial glucose test is a blood glucose test that determines the amount of a type of sugar, called glucose, in the blood after a meal.

Microalbumin Test (MicT)
A test to detect very small levels of a blood protein (albumin) in your urine.

Serum Creatinine Test (SCT)
A creatinine blood test measures the level of creatinine in the blood.

Low Density Lipoproteins( LDL)
LDL is called low-density lipoprotein because LDL particles tend to be less dense than other kinds of cholesterol particles.

High Density Lipoproteins( HDL)
HDL is known as the good cholesterol because it carries LDL, triglycerides, and harmful fats and returns them to your liver for processing.

> 35mg/dL
Uric Acid (UA) Uric Acid is excreted (removed from your body) in your urine.
2.4-6.0 mg/dL (female) 3.4-7.0 mg/dL (male).   The methodology of the retrieval techniques of the proposed time-varying data model is different from conventional databases because temporal database holds a sequence of snapshot relations. Therefore, there are three different types of queries, namely, current query, sequenced query and non-sequenced query [8,20]. The most prevalent queries (current) are of the form "what is valid now?", the second type of queries (non-sequenced) is of the form "what was valid at any time?", and the third type of queries (sequenced) are of the form "what is valid at/during a certain point/interval (period) of time?". The valid time data represented by the proposed data model will be shown how it can be queried using the different types of temporal query. For querying the biomedical data, an interested queries according to the diabetes medical doctor is asking about the latest reading of any of the 19s observations as in Fig. 2 For this query, the period of validity of Serum Uric Acid when it was in up normal reading (according to Table II this observation value ranges from 2.5 to 6.5) will be retrieved according to the query Q SAU below. The overlap period of validity of Glucose Fasting with the period of validity of Serum Uric Acid when it was in up normal will give the result as shown in Fig. 4

B. Representing Time-Vaying Data using TTSR Approchs
More than 23 time-varying data models have been introduced in the literature [9]. These data prototypes are categorized and compared with respects to fundamental design decisions that are represented by asking how valid time is modeled, how transaction time is modeled, how attribute values are modeled, whether the model is all the same, and whether the model stick together as a whole. These five questions represent the criteria of evaluating temporal data model according to TSQL2 [9]. To generalize the approaches of modeling time-varying database, the taxonomy shown in Fig. 1 depicts that. TTHR is a combination of tuple timestamping and attribute timestamping data prototypes. Whereby the facts are timestamped by the lifespan of the associated entities, and the time varying attributes of these entities are timestamped by the valid time as explained in the previous section. TTHR is 1NF, heterogeneous, and intervalbased temporal data model which is dedicated for modeling temporal database in relational framework. In this part, the modeling of TTHR in TTSR is scrutinized. For each approach/model, we stipulate the items identified in the model, present the associations to/from TTHR model to show that the same data are being stocked without losing any information. The study is progresses from the different approaches that are based on 1NF prototypes, and exclude N1NF prototypes which are not in the scope of this work. TTSR and TTMR approaches shown admit different representations, this work chose the representations explained in [18,2] which are more close to the used time-model and easy to be implemented in conventional DBMS for the purpose of comparative analysis study. In TTSR the associations are reproduced by snapshot relations, which are 1NF associations. In below an illustration on how to embody TTHR associations in the TTSR representation is shown. Let

C. Representing Time-Vaying Data using TTMR Approaches
In TTMR the associations are accounted for by snap   relation  )  ,  ,  ,  (   le  ls  U  K  TTMR   T  T  A  A  R    , for each temporal  characteristic  there  are  distinct  associations   ) , , , ( where i is equal to 19 (number of time-varying attributes) and the 2 other associations are the lifetime association, and the association that entails the non-temporal characteristics. The 19 associations parallel to each temporal value will be employed to register the historical changes of the validity of the temporal characteristics in patients. The lifetime correlation will be employed to trace the alterations of the lifetime of the items in patients relation and ultimately the non-time varying association is employed to register the non-temporal characteristics.

IV. COMPARISON OF TEMPORAL DATA MODELS
This part will match up the three methods/prototypes in terms of information illustration and memory storage evaluation, a similar work done in [23] using different parameters. The start will be with the evaluation in terms of memory storage Point of View, Let R be a time-varying associational representation with a set of attributes , where these attributes can be categorized into 4 categories: key, non-temporal (Unchangeable), temporal (Changeable), and Timestamps. They are represented by K, U, C, and T correspondingly. Consequently, the representation of time-varying association can be re-represented as The timestamp attributes are defined as

Definition 1
(Non-temporal characteristic), A characteristic the value of which does not alter with time, a Non-temporal characteristic can be reorganized as in the case of an inaccuracy, but temporal information record does not maintain a record of it.
Definition 2 (Temporal characteristic), A temporal characteristic is a feature the merits of which are connected with timestamps.

Definition 3 (Timestamp), A timestamp is a temporal
worth correlated with a Timestamped item (i.e., a feature worth or tuple). Definition 4 (Lifespan), the lifetime of record items is the moment in the course of which the item is outlined.

Definitions 9
The cost of a different attribute type is defined as: The evaluation of the TTHR in terms of memory storage used for physical implementation in conventional DBMS should encounter the same issues for the other time-varying www.ijacsa.thesai.org information prototype. Since representing time-varying information record in a co-relational structure varies in numerous proportions [9]. Since the second approach (N1NF) may not be able of straightforwardly employing a correlation stocking structure or a uncertainty appraisal technique which depends on minute characteristic merits [9], then the temporal database prototypes that use this approach will not be counted in this comparison. The storage point of view in the TTHR will be compared with temporal database prototypes that use tuple timestamping with 1NF. In contrast with the employed storage in diverse prototypes, a predetermined time-span not across records for the information record file construction model was applied in this study. Assume as defined previously, we then use the different approaches and compare them with the TTHR model, a similar study has been carried out in [7].
For TTSR model, the time-varying association in TTSR can be modeled as: The cost of modeling one tuple x in the association example   TTSR R r can be computed as: (1) In the TTHR prototype, the time-varying association scheme is accounted for by TTHR R and VT R as indicated underneath: As indicated in (1) (7) and (8), Assume C U Q   then (9) will be: For TTMR approach, the spared space in the storeroom for the TTHR over the TTSR would be directly proportional to C U Q   for a very large value of Q comparing to  and T K , , since this is due to the repeated data in TTSR.
The time-varying association in TTMR is decomposed and reproduced as: The rate of stocking one tuple x in an association example   TTMR R r can be computed as follows: From (1), (2), (3) and (4), can be reproduced as: Where i is the total number of c A .  (11) The improvement of the TTHR over the TTMR in terms of storage point of view can be calculated as follows: The cost of storing one tuple x with its history of the changes in a period of time  using the TTHR and the TTMR can be calculated as: From (7) and (8), From (10) and (11), The save in storage space for the TTHR over the TTMR would be dependable on the values of K , T , and i , if the term ) ( T K i  is very large compared to  , then there will be an improvement in the TTHR over the TTMR, otherwise the TTMR has more saving in memory storage over the TTSR specially for a very large value of  . In this paper, however, The TTHR model is proposed to overcome the complexity of the TTMR model in terms of implementation and query processing. For example, if the number of time-varying attributes i is very large which is normal in temporal database application specially the clinical database applications where very large number of attributes that can vary within a time. Suppose 50  i , then a need to create 50 tables, 50 index for the primary key, 50 integrity constraints, and etc. This for one object, if the database schema has more than one temporal object, then the same thing will be repeated, which would result in difficulty to manage the database schema. In addition to that, combing the temporal data of a specific object requires a distinction of relationship recognized as time-varying junction relationship, which is usually costly to put into practice. A parallel research for computing the save in a memory stocking room for the TTMR over the TTSR has been done in [4]. Based on the mathematical equations, several www.ijacsa.thesai.org experiments have been carried out; the results explained in more details in our previous work in [18,[25][26][27][28] V. CONCLUSION TTHR data model has accomplished a saving in memory storage as well as the easy implementation and retrieval of time-varying data in RDBMS. These issues are important in stocking memory space and that is approximately equivalent to or larger than the TTMR. The introduced time-varying information representation is proposed for its straightforwardness, because less information record items will be required to grasp the time-varying features of the temporal information comparing to the TTMR. Furthermore, implementing the TTHR to an available information record application does not necessitate numerous updates in comparison to the TTMR. Other than that, simply have to construct the supplementary association to size the chronological updates of temporal characteristics, but without changing the scheme itself. This contrasts to the TTMR as it needs to decompose the relations and redefine the integrity constraints. A case study for modeling biomedical data (diabetes) has been shown and can be implemented in any RDBMS with a saving in memory usage range from 68-81% over other temporal representations.