Sorting and joining relations with duplicate attribute values

The computational complexity of sorting and joining relations with duplicates is investigated. The measure of complexity is the number of three branch comparisons needed to process these operations. A relation is characterized by its cardinality n and the number of distinct elements L in the attribute columns of interest. Under this characterization, the worst time complexity of these two operations is investigated. Upper and lower bounds on the number of three branch comparisons needed to process these two operations are established. It is shown, in particular, that a priori knowledge of the number of distinct elements in the attribute columns of interest leads to a reduction in the computational complexity of these two operations.<<ETX>>