Database Reference
In-Depth Information
Figure 2. Performance chart
DIVISION BY ZERO
An interesting question arises when the divisor table is empty: what should the result be? Using the
count method rewrite, the empty set is returned. Using the not-exists/except method rewrite, on the other
hand, enumerates all the rows from the dividend table. It makes the most sense to return an empty set
in the authors' opinion because just as algebraic division by zero produces a nonsense result, so does
returning all the rows of the dividend table.
CONCLUSION
As a proof-of-concept, this project succeeded. Divide grammars outlined in this paper can be rewritten
into more than one contemporary SQL division methods. Therefore, it is possible to add the divide key-
word to the standard SQL language. It should be up to each vendor how they would like to implement
a division algorithm but they should agree that the division grammar proposed in this paper is very
straightforward. It has been successfully integrated into MySQL and the testing has been very encourag-
ing. Currently we are trying to develop a nice user interface for the integrated system.
REFERENCES
Bosc, P., Dubois, D., Pivert, O., & Prade, H. (1997). Flexible queries in relational databases-the ex-
ample of the division operator. Theoretical Computer Science , 171 (1/2), 281-302. doi:10.1016/S0304-
3975(96)00132-6
Search WWH ::




Custom Search