Class O1.S5 (Other, Event, Computed)


=centercr @ []Query Q 2.5.1: Find Ed's skills when he joined the Book department
Answer: ``typing,'' ``filing'' and ``driving.''
Category: (Projected, None) / (Containment, Event, Computed) / (=, Constant)

The employee with name Ed joined the Book department on 4/1/87, when he was qualified for typing, filing and driving.

The category ``(Containment, Event, Computed)'' indicates that a containment based predicate is used to select skill data containing an event-valued argument (i.e. 4/1/87) which is derived from the valid-times of stored facts (begin of the valid-times Ed was at the Book department). Finally, ``(=, Constant)'' indicates that there are only non-temporal selection predicates that test for equality of an attribute value with a constant (i.e., the name of the person is Ed both in employee and in skills data, and the department of the person in employee data is Book).


=centercr @ []Query Q 2.5.2: Find the name and the budget of Ed's departments when he joined them
Answer: ``(Toy, $150K)'' and ``(Book, —).''
Category: (Projected, None) / (Containment, Event, Computed) / (=, Constant) (=, Foreign)

Ed joined the Toy department on 2/1/82, when the budget was $150K, and the Book department on 4/1/87. No information about the Book budget is available.

The valid-time selection is categorized as ``(Containment, Event, Computed)'' since it checks whether the valid-times of selected budget data contain an event-valued argument computed from employee data (the date Ed joined a department). A non-temporal selection predicate — in the category ``(=, Constant)'' — is used to select the department names and the periods in which Ed was in a department. A non-temporal predicate — in the category ``(=, Foreign)'' — is used to select the budget of that department, via the join condition dept.Department=employee.Dept.


=centercr @ []Query Q 2.5.3: Find all the data and the skills of the employees of the Toy department when it opened
Answer: ``(Di, $30K, Toy, F, 10/1/60, directing).''
Category: (Complete, None) / (Containment, Event, Computed) / (=, Constant) (=, Foreign)

The Toy department opened on 1/1/82. On that date, only Di worked in it. She was qualified for directing only.

The result is composed of all the non-temporal attributes retrieved from the relations employee and skills according to the output category ``(Complete, None)''. In both relations, data are selected if their valid-times contain the event ``opening of the Toy department'', according to two selection clauses in the category ``(Containment, Event, Computed)''. Additional non-temporal conditions are imposed to the selected data in either relations: ``(=, Constant)'' indicates the selection of the employees working in the Toy department; ``(=, Foreign)'' indicates the selection of the skills of such employees. Another predicate of the class ``(=, Constant)'' is used to determine the event ``opening of the Toy department'' as the beginning of the temporal element in which Toy data are stored in relation dept.


=centercr @ []Query Q 2.5.4: Find the names of the employees who had been working in the Toy department before the budget was decreased
Answer: ``Ed.''
Category: (Projected, None) / (Ordering, Event, Computed) (Ordering, Interval, Computed) / (=, Constant) (< >, Constant)

The budget of the Toy department was decreased on 1/1/87. Ed is the only employee who had been working in it before that date.

The temporal selection predicate used for categorization is ``(Ordering, Event, Computed)''. It indicates that an ordering based predicate is used to select employee data with valid-times preceding an event-valued argument (i.e. 1/1/87) which is derived from stored facts. A predicate in the category ``(=, Constant)'' is used to select an employee working in the Toy department. The other temporal predicate — categorized as ``(Ordering, Interval, Computed)'' — selects two adjacent versions of department data, testing if their valid-time intervals meet. Furthermore, non-temporal predicates are used to determine such versions. ``(=, Constant)'' also indicates that the two versions must have the same department name: ``Toy.'' ``(< >, Constant)'' indicates that a test must be effected on the decreasing value of the budget data between the two versions.


=centercr @ []Query Q 2.5.5: Find Ed's skills when his salary increased from $30K to $40K
Answer: ``typing,'' ``filing'' and ``driving.''
Category: (Projected, None) / (Containment, Event, Computed) (Ordering, Interval, Computed) / (=, Constant)

Ed had typing, filing and driving skills when his salary was increased from $30K to $40K on 2/1/86.

The query is categorized as ``(Containment, Event, Computed)'' since it selects skills data having valid times containing the event 2/1/86 which is computed from other data. Such an event is determined considering the two consecutive versions of data for the employee ``Ed'', and extracting the beginning of the second versions. The versions can be determined as follows: a first predicate in category ``(=, Constant)'' selects one Ed's version (with salary $30K); two predicates in the categories ``(=, Constant)'' and ``(Ordering, Interval, Computed)'' select the Ed's version (with salary $40K) that follows the first one. A third non-temporal predicate ``(=, Constant)'' selects Ed's data in relation skills.