Global query correlation attributes
AssigneeInternational Business Machines Corporation
InventorsRichard D. Dettinger, Richard J. Stevens
Life of this patent
Estimating the term…
Abstract
A system, method and article of manufacture for accessing data are disclosed. In general, data access is facilitated by a query configured with a correlation criterion or criteria. The presence of the correlation criteria facilitates the introduction of additional correlation logic to be applied to conditions of the query. In general, correlation criteria are contemplated which support correlation of entities based on time, physical location and age, for example.
Claims17
A computer-implemented method of providing query attributes to facilitate query composition, comprising:
- specifying a respective correlation attribute in a plurality of logical field definitions defined in a data abstraction model that logically models physical data, each correlation attribute including a name and a reference to a corresponding correlation expression;
- wherein at least two of the plurality of logical field definitions include a respective correlation attribute with the same name and a different correlation expression;
- wherein an abstract query referencing one or more of the logical field definitions and one or more of the correlation attributes, configure a query processor to:
- transform the abstract query into an executable query, wherein transforming comprises dynamically adding query logic to the executable query on the basis of the referenced correlation attributes and the corresponding logical fields for which the referenced correlation attributes are specified, the query logic comprising the correlation expressions corresponding to the referenced correlation attributes, whereby additional constraints are placed on the executable query on the basis of user-specified correlation attributes in the abstract query without requiring user composition of the corresponding added query logic defining the additional constraints.
A computer-implemented method of providing attributes configured to add query logic to queries generated from abstract queries defined by one or more logical fields, the method comprising:
- providing a data abstraction model that logically describes physical data and comprises a plurality of logical field definitions each having one or more correlation attributes;
- each correlation attribute having a name and a reference to a corresponding correlation expression;
- wherein at least two of the plurality of logical field definitions include a respective correlation attribute with the same name and reference to a different correlation expression;
- and
- receiving an abstract query including (i) conditions referencing one or more of the logical field definitions and (ii) one or more of the correlation attributes;
- generating an executable query from the abstract query, the generating comprising:
- determining whether the referenced correlation attributes are associated with any of the referenced logical field definitions;
- and if so,
- applying, as part of the executable query, each correlation expression corresponding to the respective referenced correlation attribute associated with the referenced logical field definition.
A computer-implemented method of adding query logic to queries each having a plurality of conditions, the method comprising:
- receiving a query referencing one or more predefined correlation attributes, each correlation attribute having a predefined relationship to a given field of a plurality of fields, wherein each correlation attribute has a definition comprising a name and a reference to a corresponding correlation expression, and wherein the respective correlation attribute for at least two of the plurality of fields have the same name and a reference to a different correlation expression;
- for each correlation attribute referenced in the query:
- (i) determining whether the query includes the given field for which the correlation attribute has the predefined relationship;
- and if so,
- (ii) generating query logic on the basis of the respective correlation expression of the given correlation attribute;
- and applying the generated query logic to the query.
A computerized system, comprising:
- a processor;
- a memory containing a data structure containing a plurality of correlation attributes each having a predefined relationship to a given field of a plurality of fields, wherein each correlation attribute has a definition comprising a name and a reference to a corresponding correlation expression, and wherein the respective correlation attribute for at least two of the plurality of fields have the same name and a reference to a different correlation expression;
- a searchable data source containing a plurality of fields of physical data, including those fields having predefined relationships with the predicates;
- and
- a query processor that, when executed by the processor, is configured to:
- receive a query referencing one or more of the plurality of fields and one or more correlation attributes defined in the data structure;
- for each correlation attribute referenced in the query:
- (i) determine whether the query includes the given field for which the correlation attribute has the predefined relationship;
- and if so,
- (ii) generate query logic on the basis of the predicate of the given correlation attribute;
- and
- apply the generated query logic to the query;
- receiving a query referencing one or more predefined correlation attributes, each correlation attribute having a predefined relationship to a given field
- for each correlation attribute referenced in the query:
- (i) determining whether the query includes the given field for which the correlation attribute has the predefined relationship;
- and if so,
- (ii) generating query logic on the basis of the respective correlation expression of the given correlation attribute;
- and
- applying the generated query logic to the query.
Dependencies are inferred from the claim text.