Question

My field of research is not Database or AI. But I have some problems to solve, and would like to know which branch this kind of problems belong to, and what are the results.

The main question is: given a table of data, there are lots of possible queries that can be made. But some queries are meaningful, some are meaningless. Are there some algorithms to automatically generate a ranked set of meaningful queries, from the relationships inside the table?

Here is an example:

ArticleID   Price   Quantity    Sale
A01         10      3           30
A01         10      3           30
A02         20      4           80
A02         20      5           100
A03         15      3           45
A03         15      4           60
A03         15      5           75
A04         20      2           40
A04         20      3           60
A04         20      4           80

There are two relationships in this table, which may be given or inferred (the detection of the relationships is not an issue here): a) one ArticleID maps one Price; b) Sale = Price * Quantity.

Then, the first issue is, how to automatically generate some queries? For instance:

1) Sum of Quantity by ArticleID
2) Sum of Sale by ArticleID
3) Sum of Price by ArticleID

The second issue is, how to rank the meaningful queries? For example,
intuitively, we can say that Query 1 and Query 2 make more sense than Query 3. And this conclusion can be more or less inferred from the two given relationships.

Certainly, the problem becomes more complexe when there are relationships among several tables. The tables and the relationships that I study are not very complicated.

Could anyone tell me which field this problem belongs to? Are there some good results/proposals that are easy to understand?

No correct solution

Licensed under: CC-BY-SA with attribution
Not affiliated with cs.stackexchange
scroll top