Logical Design for Temporal Databases with Multiple Granularities

Size: px
Start display at page:

Download "Logical Design for Temporal Databases with Multiple Granularities"

Transcription

1 Logical Design for Temporal Databases with Multiple Granularities X. Sean Wang George Mason University and Claudio Bettini University of Milan and Alexander Brodsky George Mason University and Sushil Jajodia Name: X. Sean Wang Address: Department of Information and Software Systems Engineering, George Mason University, Fairfax, VA Phone: (703) , Fax: (703) , Name: Claudio Bettini Address: DSI, University of Milan, via Comelico 39, Milan, Italy. Phone: (+39) , Fax: (+39) , bettini@dsi.unimi.it. Name: Alexander Brodsky Address: Department of Information and Software Systems Engineering, George Mason University, Fairfax, VA Phone: (703) , Fax: (703) , brodsky@isse.gmu.edu. Name: Sushil Jajodia Address: Department of Information and Software Systems Engineering, George Mason University, Fairfax, VA Phone: (703) , Fax: (703) , jajodia@isse.gmu.edu. Sponsor: Part of work of Wang, Bettini and Jajodia was supported by an ARPA grant, administered by the Oce of Naval Research under grant No. N J Work of Wang is also supported by the NSF grant IRI Part of the work of Bettini was performed while visiting GMU. The work of Brodsky was partly supported by the NSF grant IRI and by the Oce of Naval Research under the prime grant No. N This is a preliminary release of an article accepted by ACM Transactions on Database Systems. The denitive version is currently in production at ACM and, when released, will supersede this version. Copyright 1997 by the Association for Computing Machinery, Inc. Permission to make digital or hard copies of part or all of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for prot or commercial advantage and that copies bear this notice and the full citation on the rst page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, to republish, to Post on servers, or to redistribute to lists, requires prior specic permission and/or a fee. Request permissions from Publications Dept, ACM Inc., fax +1 (212) , or permissions@acm.org.

2 2 Wang, Bettini, Brodsky, Jajodia George Mason University The purpose of good database logical design is to eliminate data redundancy and insertion and deletion anomalies. In order to achieve this objective for temporal databases, the notions of temporal types, which formalize time granularities, and temporal functional dependencies (TFDs) are introduced. A temporal type is a monotonic mapping from ticks of time (represented by positive integers) to time sets (represented by subsets of reals) and is used to capture various standard and user-dened calendars. A TFD is a proper extension of the traditional functional dependency and takes the form X?! Y, meaning that there is a unique value for Y during one tick of the temporal type for one particular X value. An axiomatization for TFDs is given. Since a nite set of TFDs usually implies an innite number of TFDs, we introduce the notion of and give an axiomatization for a nite closure to eectively capture a nite set of implied TFDs that are essential to the logical design. Temporal normalization procedures with respect to TFDs are given. Specically, temporal Boyce-Codd normal form (TBCNF) that avoids all data redundancies due to TFDs, and temporal third normal form (T3NF) that allows dependency preservation, are dened. Both normal forms are proper extensions of their traditional counterparts, BCNF and 3NF. Decomposition algorithms are presented that give lossless TBCNF decompositions and lossless, dependency preserving, T3NF decompositions. Categories and Subject Descriptors: H.2.1 [Database Management]: Logical Design Normal forms General Terms: Algorithms, Design, Theory Additional Key Words and Phrases: Temporal databases, temporal relations, temporal modules, normalization, Boyce-Codd normal form, third normal form, granularity 1. INTRODUCTION In the database area a large body of knowledge has been developed for addressing the problem of logical design: Given a body of data and constraints on the data to be represented in a database, how do we decide on a suitable logical structure for these data? In the relational context, the problem of logical design can be restated as follows: How do we produce a database scheme (a collection of relation schemes) with certain desirable properties? Central to the design of database schemes is the idea of a data dependency which is a constraint on the allowable relations corresponding to a relation scheme. Functional dependencies (FDs) are widely used dependencies in the framework of logical design (cf. [7]). 1 A collection of known functional and other dependencies serve as input to the database design. The purpose of good database design is to avoid the problems of data redundancy, potential inconsistency, and insertion and deletion anomalies. Consider a relation with attributes AcctNo, Bank-branch and Bank-address and FDs AcctNo! Bank-branch and Bank-branch! Address. Although each bank branch has a unique 1 Other dependencies such as multivalued dependencies, join dependencies and tuple-generating dependencies have also been considered [7], but they are outside the scope of our discussion here.

3 Logical Design for Temporal Databases with Multiple Granularities 3 address (since Bank-branch! Address holds), the repetition of the address of a bank branch with every account in that branch is redundant in the relation. If, by mistake, we update the address of a branch in one tuple, but forget to do so in another, inconsistency arises. Furthermore, since AcctNo is the primary key, we cannot insert an address for a new bank branch that does not currently have at least one account. Finally, if the last account in a bank branch is deleted, we unintentionally lose track of its address. To resolve these problems, the relation (AcctNo, Bank-branch, Address) must be decomposed into two relations: (AcctNo, Bank-branch) with the FD AcctNo! Bank-branch and (Bank-branch, Address) with the FD Bank-branch! Address. In addition to being free of redundancy related problems cited above, the decomposition has several very desirable properties: (1) It is lossless in the sense that the original relation can be reconstructed by taking the natural join of the two projections and, thus, no information is lost; (2) The decomposition preserves the FDs in the sense that the FDs associated with the schemes in the decomposition are equivalent (identical in our example) to those associated with the original scheme; and (3) The two schemes are in Boyce-Codd normal form (BCNF), the strongest normal form in terms of FDs as the only dependencies. We should note that it is not always possible to derive a lossless, FD preserving decomposition such that all its schemes are in BCNF; a lossless, FD preserving decomposition into schemes in the third normal form (3NF), which is slightly weaker than BCNF, can always be achieved (cf. [7]). 1.1 Temporal dimension of logical design The introduction of time adds a new dimension to the normalization problem. To illustrate, consider a temporal relation COURSES that is used to store, for each computer science course, the course number (Course#), the number of credits given for the course (Credits), the name of the laboratory assistant on duty (Lab-Assist), the amount of her pay (Lab-Assist-Pay), the number of students attending the given class (#Students-in-Class), and the timestamp that records the day 2 on which the class is being given (Day). A typical instance of COURSES is shown in Figure 1. Suppose for the COURSE relation, the following constraints are given: (1) The attributes Day and Course# together form a candidate key; (2) FD Course#! Credits must be satised; (3) the pay of a laboratory assistant does not change within a month; and (4) a laboratory assistant cannot be changed during any given week (to keep the responsibility for the homework assignments straight). Note that constraints 3 and 4 cannot be expressed as FDs involving just the attributes of the COURSES relation. Course# Credits Lab-Assist Lab-Assist-Pay #Students-in-Class Day CS50 3 Woo 1K 50 3/3/93 CS50 3 Woo 1K 45 3/8/93 CS50 3 Woo 1.5K 50 4/5/93 CS50 3 Lee 1K 50 10/3/94 CS50 3 Lee 1K 50 10/7/94 CS50 3 Lee 1K 45 10/17/94 Fig. 1. An instance of the relation COURSES 2 To represent dates, we use the notation \month/day/year".

4 4 Wang, Bettini, Brodsky, Jajodia Relation COURSES contains not only non-temporal redundancy (e.g., Credits value for a course is repeated many times), but temporal redundancy as well (e.g., the same value of Lab-Assist-Pay is repeated several times during a month for Woo and Lee). Like non-temporal redundancy, temporal redundancy introduces potential inconsistency and insertion and deletion anomalies: We may update Woo's pay in one tuple, but leave it unchanged in another tuple for the same month, in which case we would have dierent pay for Woo during the same month, creating an inconsistency. Moreover, we cannot record a laboratory assistant for a course if we do not know the day on which the course is being given. Deletion creates a similar problem: If we delete all tuples for a particular course, we unintentionally lose track of the name and the pay of the laboratory assistant. To remove data redundancy, if we use the FDs corresponding to constraints 1 and 2, we obtain the following BCNF decomposition for COURSES: h Course#, Credits i and h Course#, Lab-Assist, Lab-Assist-Pay, #Students-in-Class, Day i. This decomposition is inadequate because the redundant values for Lab-Assist and Lab-Assist-Pay still remain, although the redundant values for Credits are eliminated. In order to eliminate redundancy in COURSES, constraints 3 and 4 involving time granularities must be considered. Indeed, a natural decomposition for COURSES is shown in Figure 2, where schemes are in terms of dierent granularities. Note that a week is specied by the form \week of date" where \date" gives the rst day (i.e., Sunday) of the week. It can be easily seen that each scheme in Figure 2 is free of the redundancies caused by constraints 1{4. Course# Credits CS50 3 Lab-Assist# Lab-Assist-Pay Month Woo 1K 3/93 Woo 1.5K 4/93 Lee 1K 10/94 Course# Lab-Assist Week CS50 Woo week of 2/28/93 CS50 Woo week of 3/7/93 CS50 Woo week of 4/4/93 CS50 Lee week of 10/2/94 CS50 Lee week of 10/16/94 Course# #Students-in-Class Day CS /3/93 CS /8/93 CS /5/93 CS /3/94 CS /7/94 CS /17/94 Fig. 2. A natural decomposition Several questions arise from this example: (1) How do we accurately describe the constraints involving time? How do we derive implicit constraints? How do we dene the avoidance of specic kinds of redundancy (i.e., normal forms)? (2) How do we automatically obtain decompositions that do not have redundancy, permit reconstruction of the original data, and preserve the original constraints?

5 Logical Design for Temporal Databases with Multiple Granularities 5 (3) What operators do we use to reconstruct the original relation from the decomposed relations (note that natural join cannot be used for this purpose)? How is the notion of lossless decomposition dened? The purpose of this paper is to answer these questions. 1.2 Contributions We introduce a general notion of a temporal type which formalizes time granularity. Intuitively, a temporal type is a mapping from ticks of time (represented by positive integers) to time sets (represented by subsets of reals). By denition, this mapping is monotonic, that is, time sets corresponding to later ticks must have greater values. Thus various time granularities (days, weeks, months, years) of dierent calendars can be viewed as temporal types, as well as user dened types such as library opening hours, class meetings and so on. We next present our notion of temporal functional dependencies (TFDs) which requires that underlying temporal type be designated. An example of a TFD is Course#?! week Lab-Assist which states that Lab-Assist for a specic Course# cannot have dierent values within a week. Note that a TFD may designate any temporal type (week in the TFD), independent of the temporal type used to store the corresponding temporal relation (it could be stored, e.g., in days or in hours). A sound and complete axiomatization for TFDs is developed. Unfortunately, unlike in the case of traditional FDs, there are usually an innite number of TFDs implied by a nite number of TFDs. To overcome this problem, we introduce the notion of a nite closure of TFDs, and develop sound and complete axiomatization to eectively compute nite closures. The property of lossless decomposition is similar to the traditional one in that it is possible to reconstruct the original temporal relation from its projections. However, the traditional natural join operation turns out to be insucient for this purpose (e.g., it is not clear how we should join the relations in Figure 2 to recover the original COURSES relation in Figure 1), and we need to introduce new temporal join, projection, and union operators that incorporate temporal types, which are then used in the denition of temporal lossless decomposition. The central part of the paper gives the denitions of temporal BCNF (TBCNF) and temporal 3NF (T3NF) and algorithms for achieving TBCNF and T3NF decompositions. Intuitively, a scheme R with temporal type is in TBCNF if for every non-trivial TFD X?! Y (1) X is a temporal superkey of the scheme (this is analogous to the requirement for traditional BCNF), and (2) there is no temporal redundancy due to the fact that two dierent time ticks of belong to the same time tick of. To understand the motivation behind the second condition, consider two temporal tuples t and t 0 that agree on X and whose time ticks in terms of belong to the same time tick of. Because of X?! Y we can conclude that the Y values of t and t 0 must also coincide. Since this information can be implied, temporal relations have redundancy that we would like to avoid. Regarding decomposition algorithms, it is natural to think of the following naive approach: 3 Add additional 3 This naive approach, to the best of our knowledge, has not been proposed in the literature.

6 6 Wang, Bettini, Brodsky, Jajodia attributes, such as week and month, to the original scheme and then apply standard decomposition techniques, such as BCNF decomposition. In fact, in our COURSES example, the decomposition in Figure 2 can be obtained 4 by the traditional BCNF decomposition algorithm if constraints 3 and 4 are expressed as FDs Week, Course#! Lab-Assist and Month, Lab-Assist! Lab-Assist-Pay. Unfortunately, this naive approach, unlike the one proposed in this paper, does not always produce decompositions that are free of redundancy, as we exemplify and discuss in Section 8. In this paper, a decomposition algorithm is given that renders lossless decomposition of any temporal scheme into schemes that are in TBCNF. We also discuss the preservation of TFDs in the decomposed temporal schemes. Analogous to the traditional relational theory, the decomposition of temporal schemes into TBCNF may not preserve TFDs. Therefore, we give the denition of temporal 3NF (T3NF), and present an algorithm that provides lossless, dependency-preserving, T3NF decomposition. 1.3 Related work There has been some work on normal forms for temporal relations, including the rst temporal normal form [6], the time normal form [4], and the temporal extensions of traditional normal forms [2; 12]. 5 The rst temporal normal form states that each time-varying attribute (i.e., an attribute that may take dierent values over time) of an object (represented by a surrogate) can have at most one value at any tick of time. This restriction avoids set-valued domains for attributes; however, it does not help eliminate temporal data redundancy. Since the time normal form [4] and the temporal extensions in [2; 12] aim at reducing temporal data redundancy, we compare each of them with our approach in turn. The time normal form. The time normal form in [4] is based on the notion of temporally dependent attributes: Intuitively, two time-varying attributes are said to be temporally dependent in [4] if their values do not always change at the same time. Since temporally dependent attributes contribute to redundancy in a temporal relation, the time normal form species that a temporal relation should not contain \temporally dependent" attributes. Although our work can be viewed as having the same aim, there are signicant dierences. First, the notion of temporal dependency in [4] is based on observing how two time-varying attributes are synchronized, while our notion of TFDs naturally extends the traditional notion of FDs, taking into account multiple granularities. Second, [4] requires that temporal relations must have time-invariant keys, while we do not. Third, [4] does not consider issues related to dependency preservation while we do. Specically, we introduce T3NF decompositions that always preserve TFDs. Finally, the dependencies considered in each work are subtly dierent and, therefore, forms of data redundancy and decomposition strategies are dierent as well. To elaborate on the aforementioned dierence, consider a temporal relation TA-Schedule with attributes 4 More precisely, we also have to add the FDs Day!Month and Day!Week. The relation scheme obtained by the BCNF algorithm also contains hday, Monthi and hday, Weeki, which can be dropped since we assume that the relationships between these temporal types are encoded somewhere else in the database. 5 See [2] for a brief review and a comparison of the normal forms in [4; 6].

7 Course#, TA and Office and a timestamp which is in days. Logical Design for Temporal Databases with Multiple Granularities 7 Semantically, each tuple of TA-Schedule gives a course number and the name of the teaching assistant, with the location of his/her oce, who is to be on duty on a particular day for a course. We know that (1) for a specic day a single TA with the corresponding oce is associated with a certain course number (i.e., the FD Course#,Day!TA, Office holds), (2) the oce of a TA cannot be changed within a semester (i.e., the TFD TA?! semester Office holds, which implies that the FD TA,Day!Office holds), (3) a TA assists for at most one class a day (i.e., the FD TA,Day!Course# holds). The relation is in snapshot BCNF, however it would be decomposed by both approaches. The reason for the decomposition under the approach of [4] is that the attributes TA and Office are temporally dependent, as can be observed in the following instance: Course# TA Office Day CS15 Lee R401 4/3/95 CS50 Woo R401 4/4/95 CS50 Lee R401 4/5/95 CS80 Woo R401 4/11/95 Indeed, (i) the second and third tuple belong to two contiguous ticks, (ii) they have the same temporal key (Course#) value, and (iii) while the Office value remains the same, the TA value changes. Hence, by [4], the relation is decomposed into (Course#,TA) and (Course#,Office) both with timestamps in (intervals of) days. The tuples in the rst relation are obtained simply by dropping the Office attribute, while three tuples are in the second relation, obtained by dropping the TA attribute and collapsing the two tuples with the same values into h CS50, R401i with timestamp [4/4/95,4/5/95]. The reason for the decomposition in our approach is the presence of the TFD in terms of the granularity semester. Under our approach, the relation is decomposed into (Course#,TA) with timestamps in days, and (TA,Office) with timestamps in semesters. The tuples in the rst relation are the same as in the approach of [4] as shown above, while the second relation consists of h Woo, R401i and h Lee, R401i both with the timestamp \1st-sem-95". Observe that at most one single tuple will appear in the second relation for each combination of TA and semester. Temporal extensions of traditional dependencies and normal forms. The work in [2] represents another aspect of reducing data redundancy in temporal information, namely the data redundancy in the snapshots of temporal relations. Conceptually, [2] views each temporal relation as a collection of snapshot relations. Since each snapshot is a relation in the conventional (nontemporal) relational model, the usual notions of FDs, multivalued dependencies and normal forms are applied. Considering the temporal relation, this results in dening a notion of temporal functional dependency that is a special case of the one proposed in this paper. Namely, it is equivalent to a TFD that expresses a constraint in terms of the same temporal type used to store the temporal relation. Our work can be seen as an extension of [2] in that we consider not only the data redundancy in snapshots, but also the data redundancy across snapshots. For example, according to [2] a temporal relation satises a temporal functional dependency X T! Y (this is the notation used) if each snapshot satises X! Y. Likewise, a temporal relation is in temporal Boyce-Codd normal form if each snapshot is in BCNF.

8 8 Wang, Bettini, Brodsky, Jajodia Returning to the COURSES relation in Figure 1, we can observe that it is not in temporal Boyce-Codd normal form according to [2] because of the temporal functional dependency (Lab-Assist!Lab-Assist-Pay) T that is equivalent in our notation to (Lab-Assist?! day Lab-Assist-Pay) 6, since day is the granularity used to store the temporal relation. The resulting decomposition would give the two relations (Lab-Assist,Lab-Assist-Pay) and (Course#,Credits, Lab-Assist,#Students-in-Class), both timestamped in days. It is easy to see that these two relations are in temporal Boyce-Codd normal form according to [2], in spite of the evident redundancy and other related anomalies across snapshots. Wijsen in [12] elaborates on the notion of temporal functional dependency proposed in [2] identifying two other kinds of dependency and proposing a new denition of temporal third normal form. In addition to the snapshot dependencies described above, [12] considers dependencies that must be satised regardless of time. For example, X G Y is satised by a temporal relation if any two tuples having the same value for X have also the same value for Y regardless of the time associated with the two tuples. The third kind of dependency proposed in [12] considers temporally adjacent snapshots: the dependency X N Y is satised by a temporal relation if any two tuples in adjacent ticks of time having the same value for X have also the same value for Y. In [12] the three kinds of dependencies are called respectively FD, TFD (temporal functional dependency), and DFD (dynamic functional dependency). These dependencies can express practically useful constraints on temporal relations, however they are only a very limited subset of the ones expressible in our framework. We already pointed out that snapshot dependencies are just a particular case of our temporal functional dependencies. It is also easy to show that we can express TFDs and DFDs of [12]. Any dependency X G Y can simply be translated into our TFD X?! Top Y, where Top identies the temporal type covering the whole time line in a single tick. Any dependency X N Y can be translated into the following pair of our TFDs: X?! 1 Y and X?! 2 Y where each tick of 1 and 2 is the union of two consequent ticks of, the temporal type of the considered temporal schema. The only dierence between 1 and 2 is that 1 starts with the rst tick of ( 1 (1) = (1) [ (2)), while 2 starts with the second tick of ( 2 (1) = (2) [ (3)). This is necessary to enforce the dependency between X and Y on any two adjacent ticks of. It is also interesting to observe that the sound and complete axiomatization for logical implication of temporal functional dependencies given in [12] is subsumed by ours using the translation given above. Based on the three kinds of dependencies, a new notion of temporal third normal form is provided in [12]. The abstract data model adopted in [12] is quite dierent from ours, since it only considers a single granularity. In contrast, our model is based on multiple time granularities. This motivates the dierence between our notion of T3NF and associated decomposition strategy and those proposed in [12]. An interesting consequence is that our notion and algorithm always guarantee the existence of a lossless T3NF decomposition preserving all the dependencies, while the same cannot be obtained for the notion proposed in [12]. 6 This TFD is implicit from the fact that Lab-Assist-Pay for a xed Lab-Assist does not change in a month.

9 Logical Design for Temporal Databases with Multiple Granularities Organization of the paper The rest of the paper is organized as follows. In Section 2, temporal types are dened and temporal modules are reviewed. In Section 3, we introduce TFDs and develop a sound and complete axiomatization. Temporal normalization is discussed in Section 4, in which lossless decompositions and related notions are introduced. TBCNF and its decomposition algorithm is presented in Section 5. Dependency preserving decompositions are studied in Section 6. T3NF and its decomposition algorithm are presented in Section 7. In Section 8 we discuss in more detail the motivation for the decomposition algorithms and we analyse their computation complexity. Section 9 concludes the paper. Finally, the appendix contains the proofs of the results. 2. TEMPORAL TYPES AND MODULES 2.1 Temporal types Before we can incorporate multiple temporal types into the logical design of temporal databases, we need to formalize the notion of a temporal type. In the following we will denote by R the set of all real numbers. We assume that there is an underlying notion of absolute time, represented by the set of the real numbers. 7 Denition (Temporal type) A temporal type is a mapping from the set of the positive integers (the time ticks) to 2 R (the set of absolute time sets) such that for all positive integers i and j with i < j, the following two conditions are satised: (1) (i) 6= ; and (j) 6= ; imply that each real number in (i) is less than all real numbers in (j), and (2) (i) = ; implies (j) = ;. Property (1) states that the mapping must be monotonic. Property (2) disallows an empty set to be the value of a mapping for a certain time tick unless the empty set will be the value of the mapping for all subsequent time ticks. Intuitive temporal types, e.g., day, month, week and year, satisfy the above denition. For example, we can dene a special temporal type year starting from year 1800 as follows: year(1) is the set of absolute time set (an interval of reals) corresponding to the year 1800, year(2) is the set of absolute time set corresponding to the year 1801, and so on. Note that the sets in the type year are consecutive intervals; however, this does not have to be the case for all types. Leap years, which are not consecutive intervals, also constitute a temporal type. If we take 1892 as the rst leap year, then leap-year(2) corresponds to 1896, leap-year(3) corresponds to 1904, 8 leap-year(4) corresponds to 1908, and so on. We can also represent a nite collection of \ticks" as a temporal type as well. For example, to specify the year 1993, we can use the temporal type T such that T (1) is the set of absolute time corresponding to the year 1993, and T (i) = ; for each i > 1. The denition also allows temporal types in which ticks are mapped to more than a single interval. This is a 7 In fact, any innite set with a total ordering can serve as the absolute time; reals, rationals and integers are examples. 8 Note 1900 is not a leap year.

10 10 Wang, Bettini, Brodsky, Jajodia generalization of most previous denitions of temporal types. As an example, consider the type business-month, where every business month is a union of all business days in a month (i.e., excluding all Saturdays and Sundays). In this case, more than one single interval is in one tick. In a realistic system, we should distinguish names of temporal types, like day, used by users or system designers from the mapping they denote. It is possible that in a system dierent names can be used for the same mapping. For example, day and giorno (which is the Italian word for day) denote the same mapping. However, for simplicity, in this paper we assume that dierent symbols used for temporal types denote dierent mappings. It is important to emphasize that a real system can only treat innite types that have nite representations. Various periodical descriptions, e.g., [3; 5], are possible but outside the scope of this paper. There is a natural relation among temporal types as given below: Denition Let 1 and 2 be temporal types. Then 1 is said to be ner than 2, denoted 1 2, if for each i, there exists j such that 1 (i) 2 (j). This \ner-than" relation is essential for temporal FDs. In the COURSES relation, since a lab assistant does not change in a week, it does not change in any day during the week. (Note that day is ner than week.) In fact, the lab assistant will not change in terms of any temporal type that is ner than week. We will discuss this issue further in Section 3. We only want to note here that there are innite number of temporal types that are ner than week. In the rest of the paper conditions like 1 (i) 2 (j) are often expressed as \tick j of 2 covers tick i of 1." The notation will be used for a strictly ner than relation: if and 6=. Consider now the properties of the ner-than relation. By denition, for each temporal type. Also, if 1 2 and 2 1 then 1 = 2. Furthermore, the ner-than relation is obviously transitive. Thus, is a partial order. The relation is not a total order since, for example, week and month are incomparable (i.e., week is not ner than month, and month is not ner than week). There exists a unique least upper bound of the set of all temporal types denoted by Top, and a unique greatest lower bound, denoted by Bottom. These top and bottom elements are dened as follows: Top (1) = R and Top (i) = ; for each i > 1, and Bottom (i) = ; for each positive integer i. Moreover, for each pair of temporal types 1 ; 2, there exist a unique least upper bound lub( 1 ; 2 ) and a unique greatest lower bound glb( 1 ; 2 ) of the two types, with respect to. That is, the set of all temporal types forms a lattice with respect to. Proposition 1. The set of all temporal types is a lattice with respect to the ner-than relation. 2.2 Temporal modules Our discussion of logical design for temporal databases is in terms of temporal modules that were introduced in [10] to provide a unied interface for accessing dierent underlying temporal information systems. Thus, the temporal module concept is rather general; the concepts and the results of this paper are readily translated to in terms of other temporal data models. Temporal modules dened in this paper are simplied but equivalent

11 Logical Design for Temporal Databases with Multiple Granularities 11 versions of extended temporal modules of [10], explained below. We assume there is an innite set of attributes. For each attribute A, there exists an innite set of values called domain of A, denoted dom(a). Each nite set R of attributes is called a relation scheme. A relation scheme R = fa 1 ; : : :; A n g is usually written as ha 1 ; : : :; A n i. For relation scheme R, let T up(r) denote the set of all mappings t, called tuples, from R to S A2R dom(a) such that for each A in R, t(a), the value of t for attribute A, is in dom(a). A tuple t of relation scheme ha 1 ; : : :; A n i is usually written as ha 1 ; : : :; a n i, where a i is in dom(a i ) for each 1 i n, while its projection on a subset X of the attributes in the relation scheme is denoted by t[x]. We are now ready to dene temporal module schemes and temporal modules. Denition (Temporal module scheme and temporal module) A temporal module scheme is a pair (R; ), where R is a relation scheme and a temporal type. A temporal module is a triple (R; ; ), where (R; ) is a temporal module scheme and is a function, called time windowing function from N to 2 Tup(R) such that, for each i 1, (i) = ; if (i) = ;. Intuitively, the time windowing function in a temporal module (R; ; ) gives the tuples (facts) that hold at time tick i in temporal type. This is a generalization of many temporal models appeared in the literature. Note that, for practical reasons, we could add the restriction that (i) be nite for each i 1. The results of the paper continue to hold with this restriction. The temporal module (R; ; ) is said to be on (R; ) and to be in terms of. Temporal modules are also denoted by symbol M, possibly subscripted. For each temporal module M, we denote its relation scheme, temporal type, and windowing function by R M, M and M, respectively. For convenience, in temporal module examples, instead of the positive integers we will sometimes use an equivalent domain. For instance, the set of expressions of the form 3=3=93 will serve as such a domain. Example 1. We view the temporal relation COURSES given in the introduction as a temporal module with (COURSES, day), where COURSES = hcourse#, Credits, Lab-Assist, Lab-Assist-Pay, #Students-in-Classi, as its scheme. The relation in Figure 1 corresponds to the time windowing function dened 9 as follows: (3=3=93) = fh CS50, 3, Woo, 1K, 50 ig (3=8=93) = fh CS50, 3, Woo, 1K, 45 ig (4=5=93) = fh CS50, 3, Woo, 1.5K, 50 ig (10=3=94) = fh CS50, 3, Lee, 1K, 50 ig (10=7=94) = fh CS50, 3, Lee, 1K, 50 ig (10=17=94) = fh CS50, 3, Lee, 1K, 45 ig 2 9 For readability, we use dates in the form \mm/dd/yy" as the argument of, instead of positive integers that identify the ticks (i.e., days) of day.

12 12 Wang, Bettini, Brodsky, Jajodia Two equivalent query languages, a calculus [10] and an algebra [9], have been proposed to frame queries on temporal modules. 3. TEMPORAL FUNCTIONAL DEPENDENCIES Relations in relational databases are traditionally used to store \static" information, or only the \current" information. Let R = ha 1 ; : : :; A n i be a relation scheme, and X and Y subsets of fa 1 ; : : :; A n g. In the traditional dependency theory, X functionally determines Y, denoted X! Y, if for each relation r for R and each pair of tuples t 1 ; t 2 in r, t 1 [X] = t 2 [X] implies t 1 [Y ] = t 2 [Y ]. As an example, consider a relation scheme, called FACULTY, that records for each faculty member, the social security number (SSn), name (Name), rank (Rank), and department (Dept). FD SSn! Rank states that each faculty member's rank is unique, even though he or she may serve in more than one department. In a temporal database, information becomes dynamic. An FD that is valid in the \current" relation may no longer be valid in the corresponding temporal relation if the traditional denition of FDs is used without change. This will be the case if FACULTY were a temporal relation since it is likely that FACULTY will contain two tuples, one stating that a particular faculty is an Assistant Professor at one time, but an Associate Professor at a dierent time. We will extend the traditional notion of FDs that will not only permit these possibilities, but also enable us to model additional constraints such as \a faculty member's rank does not change during an academic year". Denition (Temporal functional dependency) Let X and Y be (nite) sets of attributes and a temporal type such that (i) 6= ; for some i. Then X?! Y is called a temporal functional dependency (TFD). Intuitively, a TFD X?! Y states that whenever two tuples, holding on time ticks covered by the same time tick in, agree on X, they must also agree on Y. Thus, the TFD SSn?! academic-year Rank, where academic-year is the temporal type of academic years, expresses the fact that a faculty's rank cannot change during an academic year. We now formally dene the above notion of satisfaction. In order to simplify the notation throughout this paper, we will use (i 1 ; : : :; i k ) to denote S 1jk (i j). Denition (Satisfaction of TFD) A TFD X?! Y is satised by a temporal module M = (R; ; ) if for all tuples t 1 and t 2 and positive integers i 1 and i 2, the following three conditions imply t 1 [Y ] = t 2 [Y ]: (a) t 1 [X] = t 2 [X], (b) t 1 is in (i 1 ) and t 2 is in (i 2 ), and (c) there exists j such that (i 1 ; i 2 ) (j). For example, the temporal module in Example 1 satises the TFD Course#?! week Lab-Assist. The temporal module also satises Course#?! day #Students-in-Class. However, the temporal module does not satisfy Course#?! month #Students-in-Class.

13 Logical Design for Temporal Databases with Multiple Granularities 13 The denition implies that the TFD X?! Y is always satised by the temporal module (R; ; ) if does not have two dierent ticks that are covered by a single tick of (since condition (c) in the denition will not be satised). Let (R; ) be a temporal module scheme with a set F of TFDs involving only attributes in R. We only consider temporal modules on (R; ) that satisfy each TFD in F. Thus, the set F determines the set of allowed modules. Example 2. The temporal module reported in Example 1 satises the TFD Course#?! day Credits; Lab-Assist; Lab-Assist-Pay; #Students-in-Class: In this case both the temporal module and the TFD are dened in terms of the same temporal type (day). However, the same module satises the TFD Course#?! week Lab-Assist that is dened in terms of a dierent temporal type. The notion of temporal FDs introduced in [2] allows only TFDs in terms of the same temporal type of the module. 2 Our notion of TFDs can also be used to express FDs that always hold, independent of time. For example, we can express the FD \each person has only one biological father (regardless of time)" by using the TFD Name?! Top B Father. This TFD says that whenever two facts t 1 and t 2 with t 1 [X] = t 2 [X] are valid in one temporal module, then t 1 [Y ] = t 2 [Y ], independent of the temporal type. 3.1 Inference axioms for TFDs As in the case of traditional FDs, inference axioms to derive all TFDs that logically follow from a set of TFDs are important. The inference axioms given below include not only the temporal analogs of Armstrong's axioms [7], but axioms that reect the relationships among temporal types also. In Example 1, since the values for annual interest rate do not change in a day, they do not change in any hour of the day. In general, they do not change in any tick of any temporal type that is ner than day. This is captured by the inference rule: if X?! Y and, then X?! Y. An intuitive conjecture would be that the above rule along with the temporal analogs of Armstrong's axioms 10 will constitute a complete axiomatization. This turns out to be false. Consider, for example, two TFDs X?! y1 Y and X?! y2 Y, where y1 is the temporal type corresponding to years before 1990, and y2 is the temporal type corresponding to years 1990 and beyond. Taken together, these two TFDs say that X?! year Y. However, year is not ner than either y1 or y2. In order to capture such inferences, we dene the notion that a temporal type is collectively ner than a set of temporal types. The temporal type year will be collectively ner than the set of types fy1; y2g because each 10 For those who are not familiar with the Armstrong's axioms, the axioms are: (i) Reexivity: X! Y if Y X, (ii) Augmentation: XW! Y W if X! Y, and (iii) Transitivity: X! Z if X! Y and Y! Z. The Armstrong's axioms are sound and complete. That is, for each set of functional dependencies, a functional dependency is logically implied by this set i it is derived by a proof sequence using the three axioms. See [7] for details.

14 14 Wang, Bettini, Brodsky, Jajodia tick of the type year is covered by (i.e., contained in) a tick of either y1 or y2. Formally, Denition We say that a temporal type is collectively ner than a set f 1 ; : : :; n g of temporal types, denoted C f 1 ; : : :; n g, if for each positive integer i, there exist 1 k n and a positive integer j such that (i) k (j) Note that 1 implies C f 1 ; 2 g for any 2. Inference axioms for TFDs are given next. Four Inference Axioms for TFDs: (1) Reexivity: If Y X, then X?! Y for each temporal type. (2) Augmentation: If X?! Y, then XZ?! Y Z. (3) Transitivity: If X?! Y and Y?! Z, then X?! Z. (4) Descendability: If X?! 1 Y; : : : ; X?! n Y with n 1 then X?! Y for each with C f 1 ; : : :; n g. The rst three axioms are temporal analogs of the Armstrong's axioms. The descendability axiom states that if one or more TFDs (with the same left and right hand sides X and Y ) in terms of dierent types are satised by a temporal module M, then a TFD (with the same X and Y ) in terms of any temporal type that is collectively ner than the set of these temporal types is also satised by M. In particular, if we know that X?! Y is satised by M, descendability ensures that for each with ner than, X?! Y is satised by M. This makes intuitive sense: if the rank of a faculty cannot change within an academic year, it cannot change within a month or a day of an academic year. Let F be a nite set of TFDs. The notion of derivation of TFDs is analogous to the one for traditional FDs. Formally, Denition The TFD X?! Y is derived from F, denoted F ` X?! Y, if there exists a proof sequence f 1 ; : : :; f k such that (i) f k is X?! Y and (ii) each f i is a TFD either in F or obtained by using one of the four axioms on TFDs f 1,..., f i?1. The notion of logical implication of TFD is also standard. Formally, Denition The TFD X?! Y is logically implied by F, denoted F j= X?! Y, if every temporal module M that satises each TFD in F, also satises X?! Y. Below, we establish the fact that the four axioms are sound (i.e., they can be used to derive only logically implied TFDs) and complete (i.e., they can be used to derive all logically implied TFDs). First, we have the soundness result: Lemma 1. The four inference axioms are sound. By using the above four inference axioms, we may derive other inference rules. For example, given X?! 1 Y and Y?! 2 Z, we may derive X?! glb(1;2) Z. (We call this rule the extended transitivity axiom.) Indeed,

15 Logical Design for Temporal Databases with Multiple Granularities 15 since glb( 1 ; 2 ) 1 and glb( 1 ; 2 ) 2, X?! glb(1;2) Y and Y?! glb(1;2) Z by descendability. By transitivity, X?! glb(1;2) Z. Another rule we may derive is as follows: Given X?! 1 Y and X?! 2 Z, we have X?! glb(1;2) Y Z. (We call this the union axiom). To see this, we use augmentation to get X?! 1 XY and XY?! 2 Y Z from X?! 1 Y and X?! 2 Z, respectively. Then by the extended transitivity above, we have X?! glb(1;2) Y Z. In summary, we have the following two additional inference axioms: Additional Inference Axioms for TFDs: (1) Extended Transitivity: If X?! 1 Y and Y?! 2 Z, then X?! glb(1;2) Z. (2) Union: If X?! 1 Y and X?! 2 Z, then X?! glb(1;2) Y Z. Unlike in the case of traditional FDs, the application of the TFD inference axioms on a nite set F of TFDs may lead to an innite number of temporal functional dependencies. This is due to reexivity and descendability axioms. It is obvious that the reexivity axiom gives an innite number of TFDs. However, these TFDs are trivial ones. The more serious problem is the descendability axiom. The reason why the descendability axiom gives an innite number of TFDs is that given a type (or a set of types) there may be an innite number of types that are (collectively) ner than the given type (or set of types). Consider, for example, Course#?! week Lab-Assist. Let week i be the temporal type that covers only the i-th week, i.e., week i (1) maps to the absolute time of the week i, and week i (j) = ; for all j > 1. Then clearly, week i week and hence week i C fweekg for all i 1. Therefore, by the descendability axiom, we have Course#?! weeki Lab-Assist for all i 1. These are an innite number of TFDs. To overcome the problem of an innite number of logically implied TFDs, we ask the following questions: Does there exist a nite set F 0 of TFDs which has the property that every TFD logically implied by F can be derived from F 0 by just one application of the descendability axiom? Can the set F 0 be eectively computed? We answer both questions positively by developing three nite inference axioms described below. Three Finite Inference Axioms for TFDs: (1) Restricted Reexivity: If Y X, then X?! Top Y. (2) Augmentation: If X?! Y, then XZ?! Y Z. (3) Extended Transitivity: If X?! 1 Y and Y?! 2 Z, then X?! glb(1;2) Z. If a TFD X?! Y is derived by using the three nite inference axioms from a set F of TFDs, we say that F nitely derives X?! Y, denoted F `f X?! Y. It is easily seen that if F `f X?! Y, then is the glb of some temporal types appearing in F. Since F is nite, we know that there are only nite number of TFDs that are derived from F by using the three nite inference axioms. We call the set of TFDs that are derived from F by these Finite Inference Axioms as the \nite closure" of F. Formally, Denition (Finite closure) Let F be a set of TFDs. The nite closure of F, denoted F +, is the set of all the TFDs derivable from F by the Three Finite Inference Axioms. More formally, F + = fx?! Y j F `f X?! Y g.

16 16 Wang, Bettini, Brodsky, Jajodia Consider, for example, F = fa?! B; A?! Bg. By the augmentation axiom, we obtain A?! AB and AB?! B from A?! B and A?! B respectively. Then by extended transitivity, we have A?! glb(;) B. Thus, A?! glb(;) B is in F +. The three nite axioms are sound since each of the three axioms is derived from the Four Inference Axioms and, by Lemma 1, the Four Inference Axioms are sound. We shall show that the Three Finite Axioms are complete up to descendability, i.e., if F j= X?! Y then there exist X?! 1 Y,..., X?! m Y in F + such that C f 1 ; : : :; m g. Theorem 1. The three nite axioms are sound, and complete up to descendability. Hence, although there may be an innite number of TFDs that are logically implied by a nite set F of TFDs, the only source of inniteness is that there may be innite number of temporal types that are collectively ner than several temporal types which appear in the nite closure of F. Before showing the completeness, we give the following auxiliary operation that will be used throughout the paper: For each set F of TFDs and a set S of real numbers, i.e., absolute time, let S (F ) be the set of non-temporal functional dependencies that have \eects" on the time in S. Formally, let S (F ) = fx! Y j 9X?! Y 2 F and 9j (S (j))g Clearly, ; (F ) gives the \non-temporal version" of all the TFDs in F. To show completeness up to descendability, we need the following two lemmas. The rst lemma formalizes an important relationship between temporal and corresponding non-temporal functional dependencies. Lemma 2. Let F be a set of TFDs and X?! Y a TFD such that F j= X?! Y. Then for all i such that (i) 6= ;, we have (i) (F ) j= X! Y. We now introduce the following notion: We call a set G of TFDs a support for X! Y if ; (G) j= X! Y. We say that it is minimal if no proper subset of G is a support for X?! Y. The second lemma states two properties that relate the temporal types of a TFD to its minimal supports. We will use the following notation: For each set G of TFDs, dene glb(g) to be the temporal type glb(fjv?! W 2 Gg). Note that glb(g) = Top if G = ; (see [1]). Lemma 3. Let F be a set of TFDs. (a) If F 1 F is a minimal support for the FD X! Y, then F `f X?! glb(f1) Y. (b) If F 1,..., F n with F i F for i = 1; : : :; n are all the minimal supports for X! Y and F j= X?! Y, then C f 1 ; : : :; n g where i = glb(f i ) for i = 1; : : :; n. The completeness up to descendability of the Three Finite Axioms (in Theorem 1) now follows easily: Proof. Suppose F j= X?! Y. By the denition of TFD, there exists i such that (i) 6= ;. By Lemma 2, we have (i) (F ) j= X! Y. Since (i) (F ) ; (F ), we have ; (F ) j= X! Y. Since ; (F ) j= X! Y, there exists at least one minimal support for X! Y. Let F 1,..., F n be all the minimal supports for X! Y. For each 1 i n, let i = glb(f i ). By Lemma 3, F `f X?! i Y for each 1 i n. Hence, X?! i Y 2 F + for

17 Logical Design for Temporal Databases with Multiple Granularities 17 each 1 i n. However, from the same lemma we know that C f 1 ; : : :; n g. Hence, we have shown that if F j= X?! Y then there exists a set fx?! 1 Y; : : :; X?! m Y g F + such that C f 1 ; : : :; m g, i.e., the Three Finite Axioms are complete up to descendability. 2 We now show how Theorem 1 implies the completeness of the Four Inference Axioms. Theorem 2. The Four Inference Axioms for TFDs are both sound and complete. Proof. Soundness is provided by Lemma 1. For completeness, let F be a set of TFDs and X?! Y a TFD logically implied by F. By Theorem 1 we know that there exist TFDs X?! 1 Y,..., X?! k Y in F + such that C f 1 ; : : :; k g. By the denition of F + we know that, for each 1 i k, F `f X?! i Y and hence, F ` X?! i Y. Applying the descendability axiom we obtain F ` X?! Y, which concludes the completeness proof Closure of attributes As in the traditional relational dependency theory, we wish to give a test to verify if a TFD of the form X?! B is implied from a set of TFDs. For this purpose we introduce the (temporal) notion of nite closures of attributes and give an algorithm to compute the nite closures. First, the denition: Denition (Finite closure of attributes) Let F be a nite set of TFDs. For each nite set X of attributes, the nite closure of X wrt F is dened as X + = f(b; ) j X?! B 2 F + and there is no X?! B in F + such that g Note that X + for each X is a nite set, since F + is nite. Proposition 2. Let F be a nite set of TFDs and X a nite set of attributes. The following holds: F j= X?! B i there exists f(b; 1 ); : : :; (B; m )g X + such that C f 1 ; : : :; m g From the previous proposition, we know that if we have an eective procedure for obtaining the nite closure for X and an eective procedure for testing the C relation, we can then eectively decide whether a TFD X?! B is logically implied by F even if we may have an innite number of logically implied TFDs. In Figure 3, we provide an algorithm for X +. Theorem 3. The algorithm in Figure 3 correctly computes X + in a nite number of steps. Example 3. As an example, let w r be the temporal type of \recent weeks" dened as follows: w r (1) maps to the week starting July 4, 1994, and w r (2) to the week after that, and so on. Now let F = fa?! wr B; B?! month Ag: It is easily seen that A + = f(a; Top ); (B; w r )g; B + = f(b; Top ); (A; month)g and AB + = A + [ B TEMPORAL NORMALIZATION In this section, we extend the traditional normalization theory to temporal databases. Thus, TFDs not only capture certain type of constraints in temporal databases, but can also be used to eliminate data redundancy and

Relational Database Design

Relational Database Design Relational Database Design Jan Chomicki University at Buffalo Jan Chomicki () Relational database design 1 / 16 Outline 1 Functional dependencies 2 Normal forms 3 Multivalued dependencies Jan Chomicki

More information

UVA UVA UVA UVA. Database Design. Relational Database Design. Functional Dependency. Loss of Information

UVA UVA UVA UVA. Database Design. Relational Database Design. Functional Dependency. Loss of Information Relational Database Design Database Design To generate a set of relation schemas that allows - to store information without unnecessary redundancy - to retrieve desired information easily Approach - design

More information

SCHEMA NORMALIZATION. CS 564- Fall 2015

SCHEMA NORMALIZATION. CS 564- Fall 2015 SCHEMA NORMALIZATION CS 564- Fall 2015 HOW TO BUILD A DB APPLICATION Pick an application Figure out what to model (ER model) Output: ER diagram Transform the ER diagram to a relational schema Refine the

More information

Constraints: Functional Dependencies

Constraints: Functional Dependencies Constraints: Functional Dependencies Fall 2017 School of Computer Science University of Waterloo Databases CS348 (University of Waterloo) Functional Dependencies 1 / 42 Schema Design When we get a relational

More information

Constraints: Functional Dependencies

Constraints: Functional Dependencies Constraints: Functional Dependencies Spring 2018 School of Computer Science University of Waterloo Databases CS348 (University of Waterloo) Functional Dependencies 1 / 32 Schema Design When we get a relational

More information

Schema Refinement and Normal Forms

Schema Refinement and Normal Forms Schema Refinement and Normal Forms UMass Amherst Feb 14, 2007 Slides Courtesy of R. Ramakrishnan and J. Gehrke, Dan Suciu 1 Relational Schema Design Conceptual Design name Product buys Person price name

More information

Schema Refinement and Normal Forms Chapter 19

Schema Refinement and Normal Forms Chapter 19 Schema Refinement and Normal Forms Chapter 19 Instructor: Vladimir Zadorozhny vladimir@sis.pitt.edu Information Science Program School of Information Sciences, University of Pittsburgh Database Management

More information

Functional Dependencies and Normalization

Functional Dependencies and Normalization Functional Dependencies and Normalization There are many forms of constraints on relational database schemata other than key dependencies. Undoubtedly most important is the functional dependency. A functional

More information

Schema Refinement: Other Dependencies and Higher Normal Forms

Schema Refinement: Other Dependencies and Higher Normal Forms Schema Refinement: Other Dependencies and Higher Normal Forms Spring 2018 School of Computer Science University of Waterloo Databases CS348 (University of Waterloo) Higher Normal Forms 1 / 14 Outline 1

More information

Schema Refinement & Normalization Theory

Schema Refinement & Normalization Theory Schema Refinement & Normalization Theory Functional Dependencies Week 13 1 What s the Problem Consider relation obtained (call it SNLRHW) Hourly_Emps(ssn, name, lot, rating, hrly_wage, hrs_worked) What

More information

Introduction. Normalization. Example. Redundancy. What problems are caused by redundancy? What are functional dependencies?

Introduction. Normalization. Example. Redundancy. What problems are caused by redundancy? What are functional dependencies? Normalization Introduction What problems are caused by redundancy? UVic C SC 370 Dr. Daniel M. German Department of Computer Science What are functional dependencies? What are normal forms? What are the

More information

Schema Refinement and Normal Forms

Schema Refinement and Normal Forms Schema Refinement and Normal Forms Chapter 19 Database Management Systems, 3ed, R. Ramakrishnan and J. Gehrke 1 The Evils of Redundancy Redundancy is at the root of several problems associated with relational

More information

Schema Refinement and Normal Forms. The Evils of Redundancy. Schema Refinement. Yanlei Diao UMass Amherst April 10, 2007

Schema Refinement and Normal Forms. The Evils of Redundancy. Schema Refinement. Yanlei Diao UMass Amherst April 10, 2007 Schema Refinement and Normal Forms Yanlei Diao UMass Amherst April 10, 2007 Slides Courtesy of R. Ramakrishnan and J. Gehrke 1 The Evils of Redundancy Redundancy is at the root of several problems associated

More information

Design Theory: Functional Dependencies and Normal Forms, Part I Instructor: Shel Finkelstein

Design Theory: Functional Dependencies and Normal Forms, Part I Instructor: Shel Finkelstein Design Theory: Functional Dependencies and Normal Forms, Part I Instructor: Shel Finkelstein Reference: A First Course in Database Systems, 3 rd edition, Chapter 3 Important Notices CMPS 180 Final Exam

More information

CS54100: Database Systems

CS54100: Database Systems CS54100: Database Systems Keys and Dependencies 18 January 2012 Prof. Chris Clifton Functional Dependencies X A = assertion about a relation R that whenever two tuples agree on all the attributes of X,

More information

Schema Refinement and Normal Forms. Chapter 19

Schema Refinement and Normal Forms. Chapter 19 Schema Refinement and Normal Forms Chapter 19 1 Review: Database Design Requirements Analysis user needs; what must the database do? Conceptual Design high level descr. (often done w/er model) Logical

More information

The Evils of Redundancy. Schema Refinement and Normal Forms. Functional Dependencies (FDs) Example: Constraints on Entity Set. Example (Contd.

The Evils of Redundancy. Schema Refinement and Normal Forms. Functional Dependencies (FDs) Example: Constraints on Entity Set. Example (Contd. The Evils of Redundancy Schema Refinement and Normal Forms INFO 330, Fall 2006 1 Redundancy is at the root of several problems associated with relational schemas: redundant storage, insert/delete/update

More information

Schema Refinement and Normal Forms

Schema Refinement and Normal Forms Schema Refinement and Normal Forms Chapter 19 Quiz #2 Next Thursday Comp 521 Files and Databases Fall 2012 1 The Evils of Redundancy v Redundancy is at the root of several problems associated with relational

More information

INF1383 -Bancos de Dados

INF1383 -Bancos de Dados INF1383 -Bancos de Dados Prof. Sérgio Lifschitz DI PUC-Rio Eng. Computação, Sistemas de Informação e Ciência da Computação Projeto de BD e Formas Normais Alguns slides são baseados ou modificados dos originais

More information

The Evils of Redundancy. Schema Refinement and Normal Forms. Example: Constraints on Entity Set. Functional Dependencies (FDs) Example (Contd.

The Evils of Redundancy. Schema Refinement and Normal Forms. Example: Constraints on Entity Set. Functional Dependencies (FDs) Example (Contd. The Evils of Redundancy Schema Refinement and Normal Forms Chapter 19 Database Management Systems, 3ed, R. Ramakrishnan and J. Gehrke 1 Redundancy is at the root of several problems associated with relational

More information

The Evils of Redundancy. Schema Refinement and Normal Forms. Example: Constraints on Entity Set. Functional Dependencies (FDs) Refining an ER Diagram

The Evils of Redundancy. Schema Refinement and Normal Forms. Example: Constraints on Entity Set. Functional Dependencies (FDs) Refining an ER Diagram Schema Refinement and Normal Forms Chapter 19 Database Management Systems, R. Ramakrishnan and J. Gehrke 1 The Evils of Redundancy Redundancy is at the root of several problems associated with relational

More information

Schema Refinement & Normalization Theory: Functional Dependencies INFS-614 INFS614, GMU 1

Schema Refinement & Normalization Theory: Functional Dependencies INFS-614 INFS614, GMU 1 Schema Refinement & Normalization Theory: Functional Dependencies INFS-614 INFS614, GMU 1 Background We started with schema design ER model translation into a relational schema Then we studied relational

More information

Schema Refinement and Normal Forms. The Evils of Redundancy. Functional Dependencies (FDs) CIS 330, Spring 2004 Lecture 11 March 2, 2004

Schema Refinement and Normal Forms. The Evils of Redundancy. Functional Dependencies (FDs) CIS 330, Spring 2004 Lecture 11 March 2, 2004 Schema Refinement and Normal Forms CIS 330, Spring 2004 Lecture 11 March 2, 2004 1 The Evils of Redundancy Redundancy is at the root of several problems associated with relational schemas: redundant storage,

More information

Normalization. October 5, Chapter 19. CS445 Pacific University 1 10/05/17

Normalization. October 5, Chapter 19. CS445 Pacific University 1 10/05/17 Normalization October 5, 2017 Chapter 19 Pacific University 1 Description A Real Estate agent wants to track offers made on properties. Each customer has a first and last name. Each property has a size,

More information

Lossless Joins, Third Normal Form

Lossless Joins, Third Normal Form Lossless Joins, Third Normal Form FCDB 3.4 3.5 Dr. Chris Mayfield Department of Computer Science James Madison University Mar 19, 2018 Decomposition wish list 1. Eliminate redundancy and anomalies 2. Recover

More information

Schema Refinement and Normal Forms. The Evils of Redundancy. Functional Dependencies (FDs) [R&G] Chapter 19

Schema Refinement and Normal Forms. The Evils of Redundancy. Functional Dependencies (FDs) [R&G] Chapter 19 Schema Refinement and Normal Forms [R&G] Chapter 19 CS432 1 The Evils of Redundancy Redundancy is at the root of several problems associated with relational schemas: redundant storage, insert/delete/update

More information

Chapter 8: Relational Database Design

Chapter 8: Relational Database Design Chapter 8: Relational Database Design Database System Concepts, 6 th Ed. See www.db-book.com for conditions on re-use Chapter 8: Relational Database Design Features of Good Relational Design Atomic Domains

More information

Relational Design: Characteristics of Well-designed DB

Relational Design: Characteristics of Well-designed DB Relational Design: Characteristics of Well-designed DB 1. Minimal duplication Consider table newfaculty (Result of F aculty T each Course) Id Lname Off Bldg Phone Salary Numb Dept Lvl MaxSz 20000 Cotts

More information

Schema Refinement. Feb 4, 2010

Schema Refinement. Feb 4, 2010 Schema Refinement Feb 4, 2010 1 Relational Schema Design Conceptual Design name Product buys Person price name ssn ER Model Logical design Relational Schema plus Integrity Constraints Schema Refinement

More information

Schema Refinement and Normal Forms. Why schema refinement?

Schema Refinement and Normal Forms. Why schema refinement? Schema Refinement and Normal Forms Why schema refinement? Consider relation obtained from Hourly_Emps: Hourly_Emps (sin,rating,hourly_wages,hourly_worked) Problems: Update Anomaly: Can we change the wages

More information

The Evils of Redundancy. Schema Refinement and Normalization. Functional Dependencies (FDs) Example: Constraints on Entity Set. Refining an ER Diagram

The Evils of Redundancy. Schema Refinement and Normalization. Functional Dependencies (FDs) Example: Constraints on Entity Set. Refining an ER Diagram The Evils of Redundancy Schema Refinement and Normalization Chapter 1 Nobody realizes that some people expend tremendous energy merely to be normal. Albert Camus Redundancy is at the root of several problems

More information

CS322: Database Systems Normalization

CS322: Database Systems Normalization CS322: Database Systems Normalization Dr. Manas Khatua Assistant Professor Dept. of CSE IIT Jodhpur E-mail: manaskhatua@iitj.ac.in Introduction The normalization process takes a relation schema through

More information

Chapter 7: Relational Database Design

Chapter 7: Relational Database Design Chapter 7: Relational Database Design Chapter 7: Relational Database Design! First Normal Form! Pitfalls in Relational Database Design! Functional Dependencies! Decomposition! Boyce-Codd Normal Form! Third

More information

Review: Keys. What is a Functional Dependency? Why use Functional Dependencies? Functional Dependency Properties

Review: Keys. What is a Functional Dependency? Why use Functional Dependencies? Functional Dependency Properties Review: Keys Superkey: set of attributes whose values are unique for each tuple Note: a superkey isn t necessarily minimal. For example, for any relation, the entire set of attributes is always a superkey.

More information

Functional Dependencies & Normalization. Dr. Bassam Hammo

Functional Dependencies & Normalization. Dr. Bassam Hammo Functional Dependencies & Normalization Dr. Bassam Hammo Redundancy and Normalisation Redundant Data Can be determined from other data in the database Leads to various problems INSERT anomalies UPDATE

More information

FUNCTIONAL DEPENDENCY THEORY. CS121: Relational Databases Fall 2017 Lecture 19

FUNCTIONAL DEPENDENCY THEORY. CS121: Relational Databases Fall 2017 Lecture 19 FUNCTIONAL DEPENDENCY THEORY CS121: Relational Databases Fall 2017 Lecture 19 Last Lecture 2 Normal forms specify good schema patterns First normal form (1NF): All attributes must be atomic Easy in relational

More information

Background: Functional Dependencies. æ We are always talking about a relation R, with a æxed schema èset of attributesè and a

Background: Functional Dependencies. æ We are always talking about a relation R, with a æxed schema èset of attributesè and a Background: Functional Dependencies We are always talking about a relation R, with a xed schema èset of attributesè and a varying instance èset of tuplesè. Conventions: A;B;:::are attributes; :::;Y;Z are

More information

Schema Refinement and Normalization

Schema Refinement and Normalization Schema Refinement and Normalization Schema Refinements and FDs Redundancy is at the root of several problems associated with relational schemas. redundant storage, I/D/U anomalies Integrity constraints,

More information

Relational Design Theory

Relational Design Theory Relational Design Theory CSE462 Database Concepts Demian Lessa/Jan Chomicki Department of Computer Science and Engineering State University of New York, Buffalo Fall 2013 Overview How does one design a

More information

Schema Refinement and Normal Forms. Case Study: The Internet Shop. Redundant Storage! Yanlei Diao UMass Amherst November 1 & 6, 2007

Schema Refinement and Normal Forms. Case Study: The Internet Shop. Redundant Storage! Yanlei Diao UMass Amherst November 1 & 6, 2007 Schema Refinement and Normal Forms Yanlei Diao UMass Amherst November 1 & 6, 2007 Slides Courtesy of R. Ramakrishnan and J. Gehrke 1 Case Study: The Internet Shop DBDudes Inc.: a well-known database consulting

More information

Chapter 7: Relational Database Design. Chapter 7: Relational Database Design

Chapter 7: Relational Database Design. Chapter 7: Relational Database Design Chapter 7: Relational Database Design Chapter 7: Relational Database Design First Normal Form Pitfalls in Relational Database Design Functional Dependencies Decomposition Boyce-Codd Normal Form Third Normal

More information

Relational Database Design

Relational Database Design CSL 451 Introduction to Database Systems Relational Database Design Department of Computer Science and Engineering Indian Institute of Technology Ropar Narayanan (CK) Chatapuram Krishnan! Recap - Boyce-Codd

More information

Functional Dependency and Algorithmic Decomposition

Functional Dependency and Algorithmic Decomposition Functional Dependency and Algorithmic Decomposition In this section we introduce some new mathematical concepts relating to functional dependency and, along the way, show their practical use in relational

More information

Schema Refinement and Normal Forms

Schema Refinement and Normal Forms Schema Refinement and Normal Forms Yanlei Diao UMass Amherst April 10 & 15, 2007 Slides Courtesy of R. Ramakrishnan and J. Gehrke 1 Case Study: The Internet Shop DBDudes Inc.: a well-known database consulting

More information

Databases 2012 Normalization

Databases 2012 Normalization Databases 2012 Christian S. Jensen Computer Science, Aarhus University Overview Review of redundancy anomalies and decomposition Boyce-Codd Normal Form Motivation for Third Normal Form Third Normal Form

More information

COSC 430 Advanced Database Topics. Lecture 2: Relational Theory Haibo Zhang Computer Science, University of Otago

COSC 430 Advanced Database Topics. Lecture 2: Relational Theory Haibo Zhang Computer Science, University of Otago COSC 430 Advanced Database Topics Lecture 2: Relational Theory Haibo Zhang Computer Science, University of Otago Learning objectives and references You should be able to: define the elements of the relational

More information

CSC 261/461 Database Systems Lecture 10 (part 2) Spring 2018

CSC 261/461 Database Systems Lecture 10 (part 2) Spring 2018 CSC 261/461 Database Systems Lecture 10 (part 2) Spring 2018 Announcement Read Chapter 14 and 15 You must self-study these chapters Too huge to cover in Lectures Project 2 Part 1 due tonight Agenda 1.

More information

Database Design and Implementation

Database Design and Implementation Database Design and Implementation CS 645 Schema Refinement First Normal Form (1NF) A schema is in 1NF if all tables are flat Student Name GPA Course Student Name GPA Alice 3.8 Bob 3.7 Carol 3.9 Alice

More information

Information Systems for Engineers. Exercise 8. ETH Zurich, Fall Semester Hand-out Due

Information Systems for Engineers. Exercise 8. ETH Zurich, Fall Semester Hand-out Due Information Systems for Engineers Exercise 8 ETH Zurich, Fall Semester 2017 Hand-out 24.11.2017 Due 01.12.2017 1. (Exercise 3.3.1 in [1]) For each of the following relation schemas and sets of FD s, i)

More information

DESIGN THEORY FOR RELATIONAL DATABASES. csc343, Introduction to Databases Renée J. Miller and Fatemeh Nargesian and Sina Meraji Winter 2018

DESIGN THEORY FOR RELATIONAL DATABASES. csc343, Introduction to Databases Renée J. Miller and Fatemeh Nargesian and Sina Meraji Winter 2018 DESIGN THEORY FOR RELATIONAL DATABASES csc343, Introduction to Databases Renée J. Miller and Fatemeh Nargesian and Sina Meraji Winter 2018 1 Introduction There are always many different schemas for a given

More information

Functional Dependency Theory II. Winter Lecture 21

Functional Dependency Theory II. Winter Lecture 21 Functional Dependency Theory II Winter 2006-2007 Lecture 21 Last Time Introduced Third Normal Form A weakened version of BCNF that preserves more functional dependencies Allows non-trivial dependencies

More information

Relational-Database Design

Relational-Database Design C H A P T E R 7 Relational-Database Design Exercises 7.2 Answer: A decomposition {R 1, R 2 } is a lossless-join decomposition if R 1 R 2 R 1 or R 1 R 2 R 2. Let R 1 =(A, B, C), R 2 =(A, D, E), and R 1

More information

Chapter 10. Normalization Ext (from E&N and my editing)

Chapter 10. Normalization Ext (from E&N and my editing) Chapter 10 Normalization Ext (from E&N and my editing) Outline BCNF Multivalued Dependencies and Fourth Normal Form 2 BCNF A relation schema R is in Boyce-Codd Normal Form (BCNF) if whenever an FD X ->

More information

Functional Dependencies. Applied Databases. Not all designs are equally good! An example of the bad design

Functional Dependencies. Applied Databases. Not all designs are equally good! An example of the bad design Applied Databases Handout 2a. Functional Dependencies and Normal Forms 20 Oct 2008 Functional Dependencies This is the most mathematical part of the course. Functional dependencies provide an alternative

More information

CSE 132B Database Systems Applications

CSE 132B Database Systems Applications CSE 132B Database Systems Applications Alin Deutsch Database Design and Normal Forms Some slides are based or modified from originals by Sergio Lifschitz @ PUC Rio, Brazil and Victor Vianu @ CSE UCSD and

More information

CAS CS 460/660 Introduction to Database Systems. Functional Dependencies and Normal Forms 1.1

CAS CS 460/660 Introduction to Database Systems. Functional Dependencies and Normal Forms 1.1 CAS CS 460/660 Introduction to Database Systems Functional Dependencies and Normal Forms 1.1 Review: Database Design Requirements Analysis user needs; what must database do? Conceptual Design high level

More information

CS 186, Fall 2002, Lecture 6 R&G Chapter 15

CS 186, Fall 2002, Lecture 6 R&G Chapter 15 Schema Refinement and Normalization CS 186, Fall 2002, Lecture 6 R&G Chapter 15 Nobody realizes that some people expend tremendous energy merely to be normal. Albert Camus Functional Dependencies (Review)

More information

Normal Forms. Dr Paolo Guagliardo. University of Edinburgh. Fall 2016

Normal Forms. Dr Paolo Guagliardo. University of Edinburgh. Fall 2016 Normal Forms Dr Paolo Guagliardo University of Edinburgh Fall 2016 Example of bad design BAD Title Director Theatre Address Time Price Inferno Ron Howard Vue Omni Centre 20:00 11.50 Inferno Ron Howard

More information

CSC 261/461 Database Systems Lecture 12. Spring 2018

CSC 261/461 Database Systems Lecture 12. Spring 2018 CSC 261/461 Database Systems Lecture 12 Spring 2018 Announcement Project 1 Milestone 2 due tonight! Read the textbook! Chapter 8: Will cover later; But self-study the chapter Chapter 14: Section 14.1 14.5

More information

Introduction to Metalogic

Introduction to Metalogic Philosophy 135 Spring 2008 Tony Martin Introduction to Metalogic 1 The semantics of sentential logic. The language L of sentential logic. Symbols of L: Remarks: (i) sentence letters p 0, p 1, p 2,... (ii)

More information

Introduction to Data Management. Lecture #6 (Relational Design Theory)

Introduction to Data Management. Lecture #6 (Relational Design Theory) Introduction to Data Management Lecture #6 (Relational Design Theory) Instructor: Mike Carey mjcarey@ics.uci.edu Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke 1 Announcements v HW#2 is

More information

Normaliza)on and Func)onal Dependencies

Normaliza)on and Func)onal Dependencies Normaliza)on and Func)onal Dependencies 1NF and 2NF Redundancy and Anomalies Func)onal Dependencies A9ribute Closure Keys and Super keys 3NF BCNF Minimal Cover Algorithm 3NF Synthesis Algorithm Decomposi)on

More information

Lectures 6. Lecture 6: Design Theory

Lectures 6. Lecture 6: Design Theory Lectures 6 Lecture 6: Design Theory Lecture 6 Announcements Solutions to PS1 are posted online. Grades coming soon! Project part 1 is out. Check your groups and let us know if you have any issues. We have

More information

Database System Concepts, 5th Ed.! Silberschatz, Korth and Sudarshan See for conditions on re-use "

Database System Concepts, 5th Ed.! Silberschatz, Korth and Sudarshan See   for conditions on re-use Database System Concepts, 5th Ed.! Silberschatz, Korth and Sudarshan See www.db-book.com for conditions on re-use " Features of Good Relational Design! Atomic Domains and First Normal Form! Decomposition

More information

FUNCTIONAL DEPENDENCY THEORY II. CS121: Relational Databases Fall 2018 Lecture 20

FUNCTIONAL DEPENDENCY THEORY II. CS121: Relational Databases Fall 2018 Lecture 20 FUNCTIONAL DEPENDENCY THEORY II CS121: Relational Databases Fall 2018 Lecture 20 Canonical Cover 2 A canonical cover F c for F is a set of functional dependencies such that: F logically implies all dependencies

More information

CSC 261/461 Database Systems Lecture 11

CSC 261/461 Database Systems Lecture 11 CSC 261/461 Database Systems Lecture 11 Fall 2017 Announcement Read the textbook! Chapter 8: Will cover later; But self-study the chapter Everything except Section 8.4 Chapter 14: Section 14.1 14.5 Chapter

More information

Information Systems (Informationssysteme)

Information Systems (Informationssysteme) Information Systems (Informationssysteme) Jens Teubner, TU Dortmund jens.teubner@cs.tu-dortmund.de Summer 2015 c Jens Teubner Information Systems Summer 2015 1 Part VII Schema Normalization c Jens Teubner

More information

A few details using Armstrong s axioms. Supplement to Normalization Lecture Lois Delcambre

A few details using Armstrong s axioms. Supplement to Normalization Lecture Lois Delcambre A few details using Armstrong s axioms Supplement to Normalization Lecture Lois Delcambre 1 Armstrong s Axioms with explanation and examples Reflexivity: If X Y, then X Y. (identity function is a function)

More information

Database Normaliza/on. Debapriyo Majumdar DBMS Fall 2016 Indian Statistical Institute Kolkata

Database Normaliza/on. Debapriyo Majumdar DBMS Fall 2016 Indian Statistical Institute Kolkata Database Normaliza/on Debapriyo Majumdar DBMS Fall 2016 Indian Statistical Institute Kolkata Problems with redundancy Data (attributes) being present in multiple tables Potential problems Increase of storage

More information

10/12/10. Outline. Schema Refinements = Normal Forms. First Normal Form (1NF) Data Anomalies. Relational Schema Design

10/12/10. Outline. Schema Refinements = Normal Forms. First Normal Form (1NF) Data Anomalies. Relational Schema Design Outline Introduction to Database Systems CSE 444 Design theory: 3.1-3.4 [Old edition: 3.4-3.6] Lectures 6-7: Database Design 1 2 Schema Refinements = Normal Forms 1st Normal Form = all tables are flat

More information

Chapter 3 Design Theory for Relational Databases

Chapter 3 Design Theory for Relational Databases 1 Chapter 3 Design Theory for Relational Databases Contents Functional Dependencies Decompositions Normal Forms (BCNF, 3NF) Multivalued Dependencies (and 4NF) Reasoning About FD s + MVD s 2 Remember our

More information

Introduction to Data Management. Lecture #6 (Relational DB Design Theory)

Introduction to Data Management. Lecture #6 (Relational DB Design Theory) Introduction to Data Management Lecture #6 (Relational DB Design Theory) Instructor: Mike Carey mjcarey@ics.uci.edu Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke 1 Announcements v Homework

More information

Functional Dependencies

Functional Dependencies Functional Dependencies Functional Dependencies Framework for systematic design and optimization of relational schemas Generalization over the notion of Keys Crucial in obtaining correct normalized schemas

More information

CSC 261/461 Database Systems Lecture 8. Spring 2017 MW 3:25 pm 4:40 pm January 18 May 3 Dewey 1101

CSC 261/461 Database Systems Lecture 8. Spring 2017 MW 3:25 pm 4:40 pm January 18 May 3 Dewey 1101 CSC 261/461 Database Systems Lecture 8 Spring 2017 MW 3:25 pm 4:40 pm January 18 May 3 Dewey 1101 Agenda 1. Database Design 2. Normal forms & functional dependencies 3. Finding functional dependencies

More information

CS122A: Introduction to Data Management. Lecture #13: Relational DB Design Theory (II) Instructor: Chen Li

CS122A: Introduction to Data Management. Lecture #13: Relational DB Design Theory (II) Instructor: Chen Li CS122A: Introduction to Data Management Lecture #13: Relational DB Design Theory (II) Instructor: Chen Li 1 Third Normal Form (3NF) v Relation R is in 3NF if it is in 2NF and it has no transitive dependencies

More information

Data Cleaning and Query Answering with Matching Dependencies and Matching Functions

Data Cleaning and Query Answering with Matching Dependencies and Matching Functions Data Cleaning and Query Answering with Matching Dependencies and Matching Functions Leopoldo Bertossi 1, Solmaz Kolahi 2, and Laks V. S. Lakshmanan 2 1 Carleton University, Ottawa, Canada. bertossi@scs.carleton.ca

More information

How to Pop a Deep PDA Matters

How to Pop a Deep PDA Matters How to Pop a Deep PDA Matters Peter Leupold Department of Mathematics, Faculty of Science Kyoto Sangyo University Kyoto 603-8555, Japan email:leupold@cc.kyoto-su.ac.jp Abstract Deep PDA are push-down automata

More information

DECOMPOSITION & SCHEMA NORMALIZATION

DECOMPOSITION & SCHEMA NORMALIZATION DECOMPOSITION & SCHEMA NORMALIZATION CS 564- Spring 2018 ACKs: Dan Suciu, Jignesh Patel, AnHai Doan WHAT IS THIS LECTURE ABOUT? Bad schemas lead to redundancy To correct bad schemas: decompose relations

More information

Data Bases Data Mining Foundations of databases: from functional dependencies to normal forms

Data Bases Data Mining Foundations of databases: from functional dependencies to normal forms Data Bases Data Mining Foundations of databases: from functional dependencies to normal forms Database Group http://liris.cnrs.fr/ecoquery/dokuwiki/doku.php?id=enseignement: dbdm:start March 1, 2017 Exemple

More information

Boolean Algebra and Propositional Logic

Boolean Algebra and Propositional Logic Boolean Algebra and Propositional Logic Takahiro Kato September 10, 2015 ABSTRACT. This article provides yet another characterization of Boolean algebras and, using this characterization, establishes a

More information

Boolean Algebra and Propositional Logic

Boolean Algebra and Propositional Logic Boolean Algebra and Propositional Logic Takahiro Kato June 23, 2015 This article provides yet another characterization of Boolean algebras and, using this characterization, establishes a more direct connection

More information

Introduction to Data Management. Lecture #7 (Relational DB Design Theory II)

Introduction to Data Management. Lecture #7 (Relational DB Design Theory II) Introduction to Data Management Lecture #7 (Relational DB Design Theory II) Instructor: Mike Carey mjcarey@ics.uci.edu Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke 1 Announcements v Homework

More information

Design Theory for Relational Databases

Design Theory for Relational Databases Design Theory for Relational Databases FUNCTIONAL DEPENDENCIES DECOMPOSITIONS NORMAL FORMS 1 Functional Dependencies X ->Y is an assertion about a relation R that whenever two tuples of R agree on all

More information

Design Theory. Design Theory I. 1. Normal forms & functional dependencies. Today s Lecture. 1. Normal forms & functional dependencies

Design Theory. Design Theory I. 1. Normal forms & functional dependencies. Today s Lecture. 1. Normal forms & functional dependencies Design Theory BBM471 Database Management Systems Dr. Fuat Akal akal@hacettepe.edu.tr Design Theory I 2 Today s Lecture 1. Normal forms & functional dependencies 2. Finding functional dependencies 3. Closures,

More information

Data Cleaning and Query Answering with Matching Dependencies and Matching Functions

Data Cleaning and Query Answering with Matching Dependencies and Matching Functions Data Cleaning and Query Answering with Matching Dependencies and Matching Functions Leopoldo Bertossi Carleton University Ottawa, Canada bertossi@scs.carleton.ca Solmaz Kolahi University of British Columbia

More information

Compositionality in SLD-derivations and their abstractions Marco Comini, Giorgio Levi and Maria Chiara Meo Dipartimento di Informatica, Universita di

Compositionality in SLD-derivations and their abstractions Marco Comini, Giorgio Levi and Maria Chiara Meo Dipartimento di Informatica, Universita di Compositionality in SLD-derivations and their abstractions Marco Comini Giorgio Levi and Maria Chiara Meo Dipartimento di Informatica Universita di Pisa Corso Italia 40 56125 Pisa Italy fcomini levi meog@di.unipi.it

More information

Normal Forms 1. ICS 321 Fall Asst. Prof. Lipyeow Lim Information & Computer Science Department University of Hawaii at Manoa

Normal Forms 1. ICS 321 Fall Asst. Prof. Lipyeow Lim Information & Computer Science Department University of Hawaii at Manoa ICS 321 Fall 2013 Normal Forms 1 Asst. Prof. Lipyeow Lim Information & Computer Science Department University of Hawaii at Manoa 9/16/2013 Lipyeow Lim -- University of Hawaii at Manoa 1 The Problem with

More information

Sebastian Link University of Auckland, Auckland, New Zealand Henri Prade IRIT, CNRS and Université de Toulouse III, Toulouse, France

Sebastian Link University of Auckland, Auckland, New Zealand Henri Prade IRIT, CNRS and Université de Toulouse III, Toulouse, France CDMTCS Research Report Series Relational Database Schema Design for Uncertain Data Sebastian Link University of Auckland, Auckland, New Zealand Henri Prade IRIT, CNRS and Université de Toulouse III, Toulouse,

More information

Enhancing the Updatability of Projective Views

Enhancing the Updatability of Projective Views Enhancing the Updatability of Projective Views (Extended Abstract) Paolo Guagliardo 1, Reinhard Pichler 2, and Emanuel Sallinger 2 1 KRDB Research Centre, Free University of Bozen-Bolzano 2 Vienna University

More information

2 Z. Lonc and M. Truszczynski investigations, we use the framework of the xed-parameter complexity introduced by Downey and Fellows [Downey and Fellow

2 Z. Lonc and M. Truszczynski investigations, we use the framework of the xed-parameter complexity introduced by Downey and Fellows [Downey and Fellow Fixed-parameter complexity of semantics for logic programs ZBIGNIEW LONC Technical University of Warsaw and MIROS LAW TRUSZCZYNSKI University of Kentucky A decision problem is called parameterized if its

More information

Axiomatic set theory. Chapter Why axiomatic set theory?

Axiomatic set theory. Chapter Why axiomatic set theory? Chapter 1 Axiomatic set theory 1.1 Why axiomatic set theory? Essentially all mathematical theories deal with sets in one way or another. In most cases, however, the use of set theory is limited to its

More information

But RECAP. Why is losslessness important? An Instance of Relation NEWS. Suppose we decompose NEWS into: R1(S#, Sname) R2(City, Status)

But RECAP. Why is losslessness important? An Instance of Relation NEWS. Suppose we decompose NEWS into: R1(S#, Sname) R2(City, Status) So far we have seen: RECAP How to use functional dependencies to guide the design of relations How to modify/decompose relations to achieve 1NF, 2NF and 3NF relations But How do we make sure the decompositions

More information

CSC 261/461 Database Systems Lecture 13. Spring 2018

CSC 261/461 Database Systems Lecture 13. Spring 2018 CSC 261/461 Database Systems Lecture 13 Spring 2018 BCNF Decomposition Algorithm BCNFDecomp(R): Find X s.t.: X + X and X + [all attributes] if (not found) then Return R let Y = X + - X, Z = (X + ) C decompose

More information

Schema Refinement. Yanlei Diao UMass Amherst. Slides Courtesy of R. Ramakrishnan and J. Gehrke

Schema Refinement. Yanlei Diao UMass Amherst. Slides Courtesy of R. Ramakrishnan and J. Gehrke Schema Refinement Yanlei Diao UMass Amherst Slides Courtesy of R. Ramakrishnan and J. Gehrke 1 Revisit a Previous Example ssn name Lot Employees rating hourly_wages hours_worked ISA contractid Hourly_Emps

More information

Multiplicative Conjunction and an Algebraic. Meaning of Contraction and Weakening. A. Avron. School of Mathematical Sciences

Multiplicative Conjunction and an Algebraic. Meaning of Contraction and Weakening. A. Avron. School of Mathematical Sciences Multiplicative Conjunction and an Algebraic Meaning of Contraction and Weakening A. Avron School of Mathematical Sciences Sackler Faculty of Exact Sciences Tel Aviv University, Tel Aviv 69978, Israel Abstract

More information

A Preference Semantics. for Ground Nonmonotonic Modal Logics. logics, a family of nonmonotonic modal logics obtained by means of a

A Preference Semantics. for Ground Nonmonotonic Modal Logics. logics, a family of nonmonotonic modal logics obtained by means of a A Preference Semantics for Ground Nonmonotonic Modal Logics Daniele Nardi and Riccardo Rosati Dipartimento di Informatica e Sistemistica, Universita di Roma \La Sapienza", Via Salaria 113, I-00198 Roma,

More information

2 C. A. Gunter ackground asic Domain Theory. A poset is a set D together with a binary relation v which is reexive, transitive and anti-symmetric. A s

2 C. A. Gunter ackground asic Domain Theory. A poset is a set D together with a binary relation v which is reexive, transitive and anti-symmetric. A s 1 THE LARGEST FIRST-ORDER-AXIOMATIZALE CARTESIAN CLOSED CATEGORY OF DOMAINS 1 June 1986 Carl A. Gunter Cambridge University Computer Laboratory, Cambridge C2 3QG, England Introduction The inspiration for

More information

Global Database Design based on Storage Space and Update Time Minimization

Global Database Design based on Storage Space and Update Time Minimization Journal of Universal Computer Science, vol. 15, no. 1 (2009), 195-240 submitted: 11/1/08, accepted: 15/8/08, appeared: 1/1/09 J.UCS Global Database Design based on Storage Space and Update Time Minimization

More information

CMPT 354: Database System I. Lecture 9. Design Theory

CMPT 354: Database System I. Lecture 9. Design Theory CMPT 354: Database System I Lecture 9. Design Theory 1 Design Theory Design theory is about how to represent your data to avoid anomalies. Design 1 Design 2 Student Course Room Mike 354 AQ3149 Mary 354

More information

CSIT5300: Advanced Database Systems

CSIT5300: Advanced Database Systems CSIT5300: Advanced Database Systems L05: Functional Dependencies Dr. Kenneth LEUNG Department of Computer Science and Engineering The Hong Kong University of Science and Technology Hong Kong SAR, China

More information