Efficient SQL-Querying Method for Data Mining in Large Data Bases

Hung Son NguyenIJCAI 1999

Abstract

Traditional data mining algorithms often struggle with Very Large Data Bases (VLDBs) due to the high cost of data transfer and the linear complexity of standard discretization methods. This paper proposes a novel approach to finding near-optimal partitions for continuous data using only $O(\log N)$ SQL queries. By leveraging the statistical properties of discernibility measures and class medians, the method enables efficient in-database discretization, significantly reducing the computational overhead for building decision trees and other predictive models.

Introduction

Discretization is a fundamental task in data mining, involving the transformation of continuous variables into categorical ones to facilitate classification. While effective in-memory algorithms exist, they become impractical when data resides in large relational databases. The standard approach requires checking every possible "cut point," leading to a number of SQL queries proportional to the number of candidate cuts ($N$). In a database environment, this linear search is a major performance bottleneck. This paper addresses the challenge of finding optimal cut points with logarithmic query complexity.

Methodology

The proposed method focuses on Discernibility Measures from Rough Set theory. These measures quantify the effectiveness of a cut by counting the pairs of objects from different classes that it separates.

The Median Property

A key theoretical contribution is the "Median Property" (Theorem 3). The author demonstrates that the quality function for a cut is not arbitrary; it tends to increase toward the medians of the decision classes and decrease as it moves away from them. This unimodal-like behavior in specific regions allows for the application of binary search-like techniques.

Class distributions and their medians, illustrating the foundation for the Median Property.

Divide and Conquer Heuristic

To further optimize the search, the algorithm employs a "Divide and Conquer" strategy. Instead of an exhaustive search, the space of candidate cuts is divided into $k$ intervals. By calculating the expected mean and variance of the quality function within these intervals based on class distributions, the algorithm predicts which interval is most likely to contain the global optimum. This statistical approximation allows the search to focus on the most promising regions, reducing the total number of queries to $O(d \log N)$, where $d$ is the number of classes.

The quality function curve across candidate cuts, showing the search intervals used to find the near-optimal cut point.

Experimental Results

The method was evaluated on a dataset of 12,000 records with three decision classes and 500 candidate cut points. The results demonstrated a massive reduction in query overhead:

  • Efficiency: The algorithm identified a near-optimal cut using only 27 SQL queries, compared to the 500 required by a linear search.
  • Accuracy: The quality of the found cut ($c^*$) was consistently high, often reaching 99.9% of the true mathematical optimum ($C_{Best}$).
  • Scalability: The transition from $O(N)$ to $O(\log N)$ complexity enables discretization on massive datasets in seconds, making in-database data mining feasible for VLDBs.

Conclusion and Future Work

This research provides a scalable solution for discretization in relational databases. By shifting from linear to logarithmic search through statistical heuristics, it overcomes the primary bottleneck of SQL-based data mining. Future work includes extending these proofs to other optimization measures like Information Gain (Entropy) and developing multi-interval discretization techniques to handle more complex classification tasks.

Summary updated

BibTeX
@inproceedings{nguyen1999efficient,
  author = {Hung Son Nguyen},
  title = {{Efficient SQL-Querying Method for Data Mining in Large Data Bases}},
  booktitle = {International Joint Conference on Artificial Intelligence},
  year = {1999},
}
Figure