Database query language transformation method, transformation apparatus and database query system
First Claim
Patent Images
1. A method, comprising:
- transforming a concept-based query into logic rules, said transforming comprising concept to predicate transformation and property to variable transformation based on a pre-determined mapping table, said logic rules comprising an expression of a plurality of conditions and a conclusion, said conclusion being output when all of said plurality of conditions are established;
checking validity of said logic rules by determining whether said logic rules conform to pre-determined requirements and belong to a range of objects that a computing device can analyze and process, said checking validity of said logic rules comprising;
syntax checking whether said logic rules conform to defined syntax of a logic rule descriptive language; and
semantic checking whether said logic rules are logically valid;
for logic rules determined to be logically invalid, modifying said concept-based query to obtain valid logic rules;
optimizing logic rules that are valid by establishing a dependency model for relations between predicates in said logic rules, so that said logic rules can be translated into SQL query statements, said dependency model indicating an order for generating said SQL query statements; and
translating logic rules that have been optimized into said SQL query statements using a pre-determined mapping table, said pre-determined mapping table mapping predicates to relations in a relational database and mapping variables to entities in said relational database.
1 Assignment
0 Petitions
Accused Products
Abstract
A method, device and system for transforming a concept-based query into SQL query statements, that includes transforming inputted concept-based queries into logic rules, checking validity of the logic rules, optimizing the valid logic rules, and translating the logic rules into SQL query statements in accordance with the optimization result.
48 Citations
21 Claims
-
1. A method, comprising:
-
transforming a concept-based query into logic rules, said transforming comprising concept to predicate transformation and property to variable transformation based on a pre-determined mapping table, said logic rules comprising an expression of a plurality of conditions and a conclusion, said conclusion being output when all of said plurality of conditions are established; checking validity of said logic rules by determining whether said logic rules conform to pre-determined requirements and belong to a range of objects that a computing device can analyze and process, said checking validity of said logic rules comprising; syntax checking whether said logic rules conform to defined syntax of a logic rule descriptive language; and semantic checking whether said logic rules are logically valid; for logic rules determined to be logically invalid, modifying said concept-based query to obtain valid logic rules; optimizing logic rules that are valid by establishing a dependency model for relations between predicates in said logic rules, so that said logic rules can be translated into SQL query statements, said dependency model indicating an order for generating said SQL query statements; and translating logic rules that have been optimized into said SQL query statements using a pre-determined mapping table, said pre-determined mapping table mapping predicates to relations in a relational database and mapping variables to entities in said relational database. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10)
-
-
11. A transformation apparatus, comprising:
a computing device, comprising; a transformer transforming a concept-based query input to said computing device into logic rules, said transformer comprising a pre-determined mapping table, said transforming comprising concept to predicate transformation and property to variable transformation based on said pre-determined mapping table, said logic rules comprising an expression of a plurality of conditions and a conclusion, said conclusion being output when all said plurality of conditions are established; a checker checking validity of said logic rules by determining whether said logic rules conform to pre-determined requirements and belong to a range of objects that said computing device can analyze and process, said checker comprising; a syntax checker checking whether said logic rules conform to defined syntax of a defined logic rule descriptive language, and a semantic checker checking whether said logic rule are logically valid, said checker returning logic rules determined to be invalid in order to modify said concept-based query; an optimizer optimizing said logic rules that have been checked to be valid by said checker, said optimizer establishing a dependency model for relations between predicates in said logic rules, so that said logic rules can be translated into SQL query statements, said dependency model indicating an order for generating said SQL query statements; and a translator translating logic rules that have been optimized into said SQL query statements, said translator comprising a pre-determined mapping table, said pre-determined mapping table mapping predicates to relations in a relational database and mapping variables to entities in said relational database. - View Dependent Claims (12, 13, 14, 15, 16, 17, 18, 19, 20)
-
21. A non-transitory computer program product containing computer program codes for implementing a method comprising:
-
transforming a concept-based query into logic rules, said transforming comprising concept to predicate transformation and property to variable transformation based on a pre-determined mapping table, said logic rules comprising an expression of a plurality of conditions and a conclusion, said conclusion being output when all said plurality of conditions are established; checking validity of said logic rules by determining whether said logic rules conform to pre-determined requirements and belong to a range of objects that a computing device can analyze and process, said checking validity of said logic rules comprising; syntax checking whether said logic rules conform to defined syntax of a logic rule descriptive language; and semantic checking whether said logic rules are logically valid; for logic rules determined to be logically invalid, modifying said concept-based query to obtain valid logic rules; optimizing logic rules that are valid by establishing a dependency model for relations between predicates in said logic rules, so that said logic rules can be translated into SQL query statements, said dependency model indicating an order for generating said SQL statements; and translating logic rules that have been optimized into said SQL query statements using a pre-determined mapping table, said pre-determined mapping table mapping predicates to relations in a relational database and mapping variables to entities in said relational database.
-
Specification