tailieunhanh - Fundamentals of Database systems 3th edition PHẦN 4

và OFFERED_DURING liên quan đến một học kỳ các khóa học được cung cấp trong học kỳ đó bằng cách hướng dẫn bất kỳ. Nhìn chung, các mối quan hệ ba yếu tố và nhị phân đại diện cho các thông tin khác nhau, nhưng khó khăn nhất định phải tổ chức một trong những mối quan hệ. | Í1-A1 . . . I COND t1 t2 . . . tn tn 1 tn 2 . . . tn m where t1 t2 . . . tn tn 1 . . . tn m are tuple variables each Ai is an attribute of the relation on which ti ranges and COND is a condition or formula Note 5 of the tuple relational calculus. A formula is made up of predicate calculus atoms which can be one of the following 1. An atom of the form R t . where R is a relation name and ti is a tuple variable. This atom identifies the range of the tuple variable ti as the relation whose name is R. 2. An atom of the form t .A op where op is one of the comparison operators in the set 1 ti and tj are tuple variables A is an attribute of the relation on which ti ranges and B is an attribute of the relation on which tj ranges. 3. An atom of the form t .A op c or c op where op is one of the comparison operators in the set 1 ti and tj are tuple variables A is an attribute of the relation on which ti ranges B is an attribute of the relation on which tj ranges and c is a constant value. Each of the preceding atoms evaluates to either TRUE or FALSE for a specific combination of tuples this is called the truth value of an atom. In general a tuple variable ranges over all possible tuples in the universe. For atoms of type 1 if the tuple variable is assigned a tuple that is a member of the specified relation R the atom is TRUE otherwise it is FALSE. In atoms of types 2 and 3 if the tuple variables are assigned to tuples such that the values of the specified attributes of the tuples satisfy the condition then the atom is TRUE. A formula condition is made up of one or more atoms connected via the logical operators and or and not and is defined recursively as follows 1. Every atom is a formula. 2. If F1 and F2 are formulas then so are F1 and F2 F1 or F2 not F1 and not F2 . The truth values of these four formulas are derived from their component formulas F1 and F2 as follows a. F1 and F2 is TRUE if both F1 and F2 are TRUE otherwise it is FALSE. b. F1 or F2 is