System and method for ordering query results
A system, method and article of manufacture for managing query results and, more particularly, for sorting data records contained in a query result obtained in response to execution of a query against a database. In one embodiment, the data records in the query result are sorted on the basis of related information which is retrieved from a corresponding data source. In another embodiment, the sorting is performed on the basis of a value variance which is determined for each of the data records in the query result. In still another embodiment, the sorting is performed on the basis of a requested value range coverage. In yet another embodiment, the sorting is performed on the basis of suitability scores which are determined with respect to analysis routines which are configured for processing the query result.
1 . A computer-implemented method of ordering query results, comprising:
in response to a query issued by a requesting entity:
a) receiving a list of data records ordered according to an initial order, the list of data records defining a result set for the query;
b) before outputting the result set, accessing a data source to retrieve information related to the received list of data records;
c) sorting the received list of data records on the basis of the retrieved information; and
d) outputting the sorted list of data records.
2 . The method of claim 1 , wherein the retrieved information comprises annotations associated with the received list of data records.
3 . The method of claim 1 , wherein the query comprises:
(i) data selection criteria configured to select the data records of the list of data records from a database; and
(ii) sorting criteria configured to specify the information related to the received list of data records.
4 . The method of claim 3 , further comprising:
identifying the data selection criteria from the issued query;
generating a first query on the basis of the identified data selection criteria;
identifying the sorting criteria from the issued query; and
generating a second query on the basis of the identified sorting criteria.
5 . The method of claim 4 , wherein at least one of the issued query, the first query and the second query is one of an SQL and an XML query.
6 . The method of claim 4 , further comprising:
executing the first query against a first database to identify the data records of the list of data records; and
executing the second query against a second database to identify the information related to the list of data records.
7 . The method of claim 6 , wherein the issued query, the first query and the second query are abstract queries, each having one or more logical fields of at least one data abstraction model abstractly describing data in the first and second databases; and wherein the at least one data abstraction model is adapted for transforming the one or more logical fields of the abstract queries into a form consistent with a physical representation of the data in the first and second databases.
8 . The method of claim 6 , wherein the first and second databases are server-side data sources and the sorting is done by a client-side application.
9 . The method of claim 6 , wherein the first and second databases are server-side data sources and the sorting is done by a server-side application.
10 . The method of claim 1 , wherein sorting the received list of data records on the basis of the retrieved information comprises:
for each data record in the list, counting a total number of associated annotations; and
wherein sorting the received list of data records is performed on the basis of the counted total numbers.
11 . The method of claim 1 , wherein sorting the received list of data records on the basis of the retrieved information comprises:
applying predefined sorting criteria to the retrieved information to determine a ranking of the data records in the list; and
sorting the data records in the list according to the determined ranking.
12 . The method of claim 1 , wherein sorting the received list of data records on the basis of the retrieved information comprises:
ranking the retrieved information according to information types.
13 . The method of claim 1 , wherein sorting the received list of data records on the basis of the retrieved information comprises:
ranking the retrieved information according to information attributes.
14 . A computer-implemented method of ordering query results, comprising:
in response to a query issued by a requesting entity:
a) receiving a list of data records ordered according to an initial order, the list of data records defining a result set for the query;
b) before outputting the result set, determining a value variance for each data record in the list, the value variance of a given data record indicating a relative proximity between a predefined value and a corresponding value of the given data record;
c) sorting the received list of data records on the basis of the determined value variances; and
d) outputting the sorted list of data records.
15 . The method of claim 14 , wherein sorting the received list of data records on the basis of the predefined value variance comprises:
ranking the data records according to the determined relative proximities.
16 . The method of claim 14 , wherein the query comprises:
(i) data selection criteria configured to select the data records of the list of data records from a database; and
(ii) sorting criteria configured to specify the predefined value.
17 . The method of claim 16 , further comprising:
identifying the data selection criteria from the issued query;
identifying the sorting criteria from the issued query; and
generating a query on the basis of the identified data selection criteria.
18 . The method of claim 17 , wherein at least one of the issued query and the generated query is one of an SQL and an XML query.
19 . The method of claim 17 , further comprising:
executing the generated query against the database to identify the data records of the list of data records.
20 . The method of claim 19 , wherein the issued query and the generated query are abstract queries, each having one or more logical fields of a data abstraction model abstractly describing data in the database; and wherein the data abstraction model is adapted for transforming the one or more logical fields of the abstract queries into a form consistent with a physical representation of the data in the database.
21 . The method of claim 19 , wherein the database is a server-side data source and the sorting is done by a client-side application.
22 . The method of claim 19 , wherein the database is a server-side data source and the sorting is done by a server-side application.
23 . A computer-implemented method of ordering query results, comprising:
in response to a query issued by a requesting entity:
a) receiving a list of data records ordered according to an initial order, the list of data records defining a result set for the query;
b) before outputting the result set, identifying a subset of the data records in the list to satisfy a requested value range coverage, the requested value range coverage being defined by a predefined maximum number of data records of the list to be output, each having a corresponding value within a predefined value range;
c) sorting the received list of data records on the basis of the requested value range coverage; and
d) outputting the sorted list of data records.
24 . The method of claim 23 , wherein identifying the subset of the data records comprises:
for each data record in the list, determining whether a value of the data record is included with the predefined value range;
for all values of data records having a value included with the predefined value range, select the predefined maximum number of data records such that the values of the selected data records define a requested value distribution.
25 . The method of claim 24 , wherein the requested value distribution comprises at least one of a flat distribution and a bell curve.
26 . The method of claim 24 , wherein the requested value distribution is represented by a histogram having one or more value windows.
27 . The method of claim 24 , wherein outputting the sorted list of data records comprises:
allowing display of the one or more selected data records on a display device; and
hiding the remaining data records from display.
28 . The method of claim 23 , wherein the query comprises:
(i) data selection criteria configured to select the data records of the list of data records from a database; and
(ii) sorting criteria configured to specify the predefined maximum number and the predefined value range.
29 . The method of claim 28 , further comprising:
identifying the data selection criteria from the issued query;
identifying the sorting criteria from the issued query; and
generating a query on the basis of the identified data selection criteria.
30 . The method of claim 29 , wherein at least one of the issued query and the generated query is one of an SQL and an XML query.
31 . The method of claim 29 , further comprising:
executing the generated query against the database to identify the data records of the list of data records.
32 . The method of claim 31 , wherein the issued query and the generated query are abstract queries, each having one or more logical fields of a data abstraction model abstractly describing data in the database; and wherein the data abstraction model is adapted for transforming the one or more logical fields of the abstract queries into a form consistent with a physical representation of the data in the database.
33 . The method of claim 31 , wherein the database is a server-side data source and the sorting is done by a client-side application.
34 . The method of claim 31 , wherein the database is a server-side data source and the sorting is done by a server-side application.
35 . A computer-readable medium containing a program which, when executed by a processor, performs operations for ordering query results, the operations comprising:
in response to a query issued by a requesting entity:
a) receiving a list of data records ordered according to an initial order, the list of data records defining a result set for the query;
b) before outputting the result set, accessing a data source to retrieve information related to the received list of data records;
c) sorting the received list of data records on the basis of the retrieved information; and
d) outputting the sorted list of data records.
36 . The computer-readable medium of claim 35 , wherein the retrieved information comprises annotations associated with the received list of data records.
37 . The computer-readable medium of claim 35 , wherein the query comprises:
(i) data selection criteria configured to select the data records of the list of data records from a database; and
(ii) sorting criteria configured to specify the information related to the received list of data records.
38 . The computer-readable medium of claim 37 , wherein the operations further comprise:
identifying the data selection criteria from the issued query;
generating a first query on the basis of the identified data selection criteria;
identifying the sorting criteria from the issued query; and
generating a second query on the basis of the identified sorting criteria.
39 . The computer-readable medium of claim 38 , wherein at least one of the issued query, the first query and the second query is one of an SQL and an XML query.
40 . The computer-readable medium of claim 38 , wherein the operations further comprise:
executing the first query against a first database to identify the data records of the list of data records; and
executing the second query against a second database to identify the information related to the list of data records.
41 . The computer-readable medium of claim 40 , wherein the issued query, the first query and the second query are abstract queries, each having one or more logical fields of at least one data abstraction model abstractly describing data in the first and second databases; and wherein the at least one data abstraction model is adapted for transforming the one or more logical fields of the abstract queries into a form consistent with a physical representation of the data in the first and second databases.
42 . The computer-readable medium of claim 40 , wherein the first and second databases are server-side data sources and the sorting is done by a client-side application.
43 . The computer-readable medium of claim 40 , wherein the first and second databases are server-side data sources and the sorting is done by a server-side application.
44 . The computer-readable medium of claim 35 , wherein sorting the received list of data records on the basis of the retrieved information comprises:
for each data record in the list, counting a total number of associated annotations; and
wherein sorting the received list of data records is performed on the basis of the counted total numbers.
45 . The computer-readable medium of claim 35 , wherein sorting the received list of data records on the basis of the retrieved information comprises:
applying predefined sorting criteria to the retrieved information to determine a ranking of the data records in the list; and
sorting the data records in the list according to the determined ranking.
46 . The computer-readable medium of claim 35 , wherein sorting the received list of data records on the basis of the retrieved information comprises:
ranking the retrieved information according to information types.
47 . The computer-readable medium of claim 35 , wherein sorting the received list of data records on the basis of the retrieved information comprises:
ranking the retrieved information according to information attributes.
48 . A computer-readable medium containing a program which, when executed by a processor, performs operations for ordering query results, the operations comprising:
in response to a query issued by a requesting entity:
a) receiving a list of data records ordered according to an initial order, the list of data records defining a result set for the query;
b) before outputting the result set, determining a value variance for each data record in the list, the value variance of a given data record indicating a relative proximity between a predefined value and a corresponding value of the given data record;
c) sorting the received list of data records on the basis of the determined value variances; and
d) outputting the sorted list of data records.
49 . The computer-readable medium of claim 48 , wherein sorting the received list of data records on the basis of the predefined value variance comprises:
ranking the data records according to the determined relative proximities.
50 . The computer-readable medium of claim 48 , wherein the query comprises:
(i) data selection criteria configured to select the data records of the list of data records from a database; and
(ii) sorting criteria configured to specify the predefined value.
51 . The computer-readable medium of claim 50 , wherein the operations further comprise:
identifying the data selection criteria from the issued query;
identifying the sorting criteria from the issued query; and
generating a query on the basis of the identified data selection criteria.
52 . The computer-readable medium of claim 51 , wherein at least one of the issued query and the generated query is one of an SQL and an XML query.
53 . The computer-readable medium of claim 51 , wherein the operations further comprise:
executing the generated query against the database to identify the data records of the list of data records.
54 . The computer-readable medium of claim 53 , wherein the issued query and the generated query are abstract queries, each having one or more logical fields of a data abstraction model abstractly describing data in the database; and wherein the data abstraction model is adapted for transforming the one or more logical fields of the abstract queries into a form consistent with a physical representation of the data in the database.
55 . The computer-readable medium of claim 53 , wherein the database is a server-side data source and the sorting is done by a client-side application.
56 . The computer-readable medium of claim 53 , wherein the database is a server-side data source and the sorting is done by a server-side application.
57 . A computer-readable medium containing a program which, when executed by a processor, performs operations for ordering query results, the operations comprising:
in response to a query issued by a requesting entity:
a) receiving a list of data records ordered according to an initial order, the list of data records defining a result set for the query;
b) before outputting the result set, identifying a subset of the data records in the list to satisfy a requested value range coverage, the requested value range coverage being defined by a predefined maximum number of data records of the list to be output, each having a corresponding value within a predefined value range;
c) sorting the received list of data records on the basis of the requested value range coverage; and
d) outputting the sorted list of data records.
58 . The computer-readable medium of claim 57 , wherein identifying the subset of the data records comprises:
for each data record in the list, determining whether a value of the data record is included with the predefined value range;
for all values of data records having a value included with the predefined value range, select the predefined maximum number of data records such that the values of the selected data records define a requested value distribution.
59 . The computer-readable medium of claim 58 , wherein the requested value distribution comprises at least one of a flat distribution and a bell curve.
60 . The computer-readable medium of claim 58 , wherein the requested value distribution is represented by a histogram having one or more value windows.
61 . The computer-readable medium of claim 60 , wherein outputting the sorted list of data records comprises:
allowing display of the one or more selected data records on a display device; and
hiding the remaining data records from display.
62 . The computer-readable medium of claim 57 , wherein the query comprises:
(i) data selection criteria configured to select the data records of the list of data records from a database; and
(ii) sorting criteria configured to specify the predefined maximum number and the predefined value range.
63 . The computer-readable medium of claim 62 , wherein the operations further comprise:
identifying the data selection criteria from the issued query;
identifying the sorting criteria from the issued query; and
generating a query on the basis of the identified data selection criteria.
64 . The computer-readable medium of claim 63 , wherein at least one of the issued query and the generated query is one of an SQL and an XML query.
65 . The computer-readable medium of claim 63 , wherein the operations further comprise:
executing the generated query against the database to identify the data records of the list of data records.
66 . The computer-readable medium of claim 65 , wherein the issued query and the generated query are abstract queries, each having one or more logical fields of a data abstraction model abstractly describing data in the database; and wherein the data abstraction model is adapted for transforming the one or more logical fields of the abstract queries into a form consistent with a physical representation of the data in the database.
67 . The computer-readable medium of claim 65 , wherein the database is a server-side data source and the sorting is done by a client-side application.
68 . The computer-readable medium of claim 65 , wherein the database is a server-side data source and the sorting is done by a server-side application.
69 . A computer system, comprising:
a requesting entity;
a data source residing in memory; and
a sorting program for ordering query results obtained in response to a query issued by the requesting entity, the sorting program being configured to:
a) receive a list of data records ordered according to an initial order, the list of data records defining a result set for the query;
b) before outputting the result set, access the data source to retrieve information related to the received list of data records;
c) sort the received list of data records on the basis of the retrieved information; and
d) output the sorted list of data records.
70 . A computer system, comprising:
a requesting entity; and
a sorting program for ordering query results obtained in response to a query issued by the requesting entity, the sorting program being configured to:
a) receive a list of data records ordered according to an initial order, the list of data records defining a result set for the query;
b) before outputting the result set, determine a value variance for each data record in the list, the value variance of a given data record indicating a relative proximity between a predefined value and a corresponding value of the given data record;
c) sort the received list of data records on the basis of the determined value variances; and
d) output the sorted list of data records.
71 . A computer system, comprising:
a requesting entity; and
a sorting program for ordering query results obtained in response to a query issued by the requesting entity, the sorting program being configured to:
a) receive a list of data records ordered according to an initial order, the list of data records defining a result set for the query;
b) before outputting the result set, identify a subset of the data records in the list to satisfy a requested value range coverage, the requested value range coverage being defined by a predefined maximum number of data records of the list to be output, each having a corresponding value within a predefined value range;
c) sort the received list of data records on the basis of the requested value range coverage; and
d) output the sorted list of data records.