Class O1.S3 (Duration, Element, Computed)


=centercr @ []Query Q 2.3.1: Who worked in the Book department for as long as Di did?
Answer: ``Ed'' and ``Edward''
Category: (Projected, None) / (Duration, Element, Computed) / (=, Constant) (=, Constant)

Di never worked in the Book department, so this should return everyone that ever worked in the Book department.


=centercr @ []Query Q 2.3.2: Who worked in the Toy department for as long as Di did?
Answer: ``None''
Category: (Projected, None) / (Duration, Element, Computed) / (=, Constant) (=, Constant)


=centercr @ []Query Q 2.3.3: Who worked in a department longer than their current manager worked in that department?
Answer: ``None''
Category: (Projected, None) / (Duration, Element, Computed) (Containment, Event, Explicit) /


=centercr @ []Query Q 2.3.4: Which managers managed which departments, longer than Di managed the Toy department?
Answer: ``None''
Category: (Projected, None) / (Duration, Element, Computed) / (=, Constant) (=, Constant)


=centercr @ []Query Q 2.3.5: Who had the same salary for the longest total time?
Answer: ``Di''
Category: (Projected, None) / (Duration, Element, Computed) /


=centercr @ []Query Q 2.3.6: Who worked for a manager in a department for as long as that manager managed that department?
Answer: ``Di''
Category: (Projected, None) / (Duration, Element, Computed) /


=centercr @ []Query Q 2.3.7: Which departments had managers who served for the shortest total time?
Answer: ``Toy''
Category: (Projected, None) / (Duration, Element, Computed) /


=centercr @ []Query Q 2.3.8: List all employees in the Book department who received salaries of over 40K longer than Edward did.
Answer: ``None''
Category: (Projected, None) / (Duration, Element, Computed) / (=, Constant) (<>, Constant) (=, Constant)


=centercr @ []Query Q 2.3.9: Who worked in the Toy department for at least as long as the total time that the Toy department was NOT managed by Ed?
Answer: ``Di''
Category: (Projected, None) / (Duration, Element, Computed) / (=, Constant) (< >, Constant)


=centercr @ []Query Q 2.3.10: Find the names of employees that have been in a department named Toy for a shorter period than has DI.
Answer: ``Ed'' and ``Edward.''
Category: (Projected, None) / (Duration, Element, Computed) / (=, Constant) (=, Constant)

The employee ED has been in a department named Toy for a period which is shorter than that of DI. The categorization is with respect to Figure 6. ``(Projected, None)'' indicates that only part of the attributes of the argument relation are present in the result and that there is no valid-time component. Next, ``(Duration, Element, Computed)'' indicates that a duration based predicates is used on element-valued arguments which are both derived from the valid-times of stored facts. Finally, ``(=, Constant) (=, Constant)'' indicates that there are two non-temporal selection predicates that test for equality of an attribute value with a constant (i.e., the person must be DI and the department must have name Toy).


=centercr @ []Query Q 2.3.11: Find the current name and department name for the persons which made $40K for a longer period than DI did.
Answer: ``(Edward, Book).''
Category: (Projected, None) / (Duration, Element, Computed) (Containment, Event, Explicit) / (=, Constant)

In this query, there are two valid-time selection based predicates. The one used for categorization compares the duration of time when a person makes $40K with the period of time that DI makes $40K. The other selects the name and department that overlap with the current time of qualifying persons.