Query Condition Validation Using Predefined Objects

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Creating and using subqueries as query conditions for SQL queries against databases is error-prone and inefficient due to the need for users to have knowledge of database layouts and SQL, and mere data type checking is inadequate to ensure valid values are returned for query fields.

Innovation Solution

A method and system for managing query execution by receiving a query with a query condition and determining if the query object provides valid values for the field, transforming the query object if necessary to ensure valid values are provided, and executing the query against the database.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Adaptability or versatility

If subqueries are used as query conditions, then data selection capability is improved, but user knowledge requirement and error rate increase

Engineering Contradiction:
Improvedata selection capabilityVSAvoiduser knowledge requirement
Core Design Contradiction:
Adaptability or versatilityVSEase of operation

Solution Approach 1:

The patent introduces an intermediary validation mechanism between the subquery and outer query that automatically checks data type compatibility and value suitability. This mediator component analyzes the subquery result set and validates it against the outer query's field requirements, eliminating the need for users to manually ensure compatibility while maintaining the powerful data selection capabilities of subqueries.

Inventive Principle:
Principle #24Intermediary (Mediator)

Solution Approach 2:

The system performs self-validation by automatically checking whether subquery results are suitable for the associated outer query fields. The validation mechanism autonomously determines data type compatibility and value appropriateness without requiring user intervention or specialized knowledge, allowing users to benefit from subquery functionality while the system handles the complexity of validation.

Inventive Principle:
Principle #25Self-service

2Reliability

If data type checking is performed on query conditions, then query validation is improved, but adequacy of validation deteriorates

Engineering Contradiction:
Improvequery validationVSAvoidvalidation adequacy
Core Design Contradiction:
ReliabilityVSMeasurement precision

Solution Approach 1:

The patent performs preliminary validation of subquery results before they are used in the outer query. By checking data type compatibility and value suitability in advance, the system prevents invalid queries from being executed, thereby improving both the reliability and adequacy of validation. This preliminary action occurs during query construction rather than at execution time.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The validation mechanism provides feedback about the compatibility between subquery results and outer query fields. This feedback includes information about data type matching and value appropriateness, allowing the system to identify and correct validation issues before query execution, thereby enhancing both the reliability and precision of query validation.

Inventive Principle:
Principle #23Feedback

3Measurement precision

If subquery result sets are validated for suitability, then query accuracy is improved, but processing complexity increases

Engineering Contradiction:
Improvequery accuracyVSAvoidprocessing complexity
Core Design Contradiction:
Measurement precisionVSDevice complexity

Solution Approach 1:

The validation process is segmented into distinct checks: data type compatibility validation and value suitability validation. By dividing the validation process into separate, manageable components, the system achieves comprehensive query accuracy verification without overwhelming processing complexity. Each segment handles a specific aspect of validation independently.

Inventive Principle:
Principle #1Segmentation

Data Source

PatentUS7584178B2Query condition building using predefined query objects
Publication Date: 2009.09.01 SERVICENOW INC
  • US7584178B2 patent drawing
  • US7584178B2 patent drawing
  • US7584178B2 patent drawing

AI summary

A method, system and article of manufacture for query processing and, more particularly, for managing execution of a query against data in a database. One embodiment comprises receiving a query having (i) at least one result field configured to return data from at least one data record included with the database, and (ii) a query condition comprising a field and a query object associated with the field by an operator configured to select values for the field from the query object. The method further comprises determining whether the query object is configured to provide one or more valid values for the field. If the query object is not configured to provide one or more valid values for the field, the query object is transformed into a transformed query object that is configured to provide one or more valid values for the field. Then, the query is executed against the database.