Imagine you want to know which products are bought together in a supermarket or which university courses are often taken by the same student. In data mining this is called "frequent pattern mining". Traditionally, algorithms like Apriori or FPβGrowth are used, but they have two drawbacks: they generate a huge number of candidate combinations and they consume a lot of memory, especially with very large tables.
The new Recursive Queried Frequent Patterns (RQFP) algorithm offers a different solution, based on recursive SQL queries. In practice, RQFP creates a relational mining table and, using recursive Common Table Expressions (CTEs), builds the most frequent itemsets without having to list all possible combinations beforehand.
The team implemented RQFP on Microsoft SQL Server and built a small C# web interface. Tests on an academic dataset show that RQFP finds the same patterns as Apriori and FPβGrowth, but with a considerably lower RAM usage and with results that are easier to interpret. Moreover, because the algorithm runs directly on the database, it is simpler to integrate into existing systems.
Future experiments aim to evaluate RQFP on healthβcare and retail data, where the amount of information is massive. Although it is currently an educational version, the method demonstrates that pattern mining can become more scalable and "databaseβnative".
