EP0120185A2

Computing apparatus and method for translating into a linear query a graphic language query.

Abstract

A linear query for accessing a relation data base in computer storage is synthesized from a graphic query input at a user terminal. The graphic query may be one of a combined print query, a target print query, an insert query, a delete query, or an update query. According to one embodiment, the linearquery is expressed in Structured Query Language (SQL) syntax, and the graphic query in Query By Example (QBE) syntax. responsive to a QBE combined print query or target print query, an SQL select query is generated (170-190) comprising the UNION of one or more generated select statements. Responsive to a QBE delete query, an SQL delete query is generated (192-202) from the logical OR of generated condition statements including an outer query DELETE and a SELECT* subquery. Responsive to a QBE update query, an SQL update query is generated (204-214) including a SET clause and any generated WHERE clause and subquery. Responsive to a QBE insert query, an SQL insert query is generated (216-226) to include an INSERT statement and any generated SELECT statement.

EP0120185A2, drawing sheet 1
Sheet 1 of 61

Term

Term ended

Projected expiry passed 11 January 2004, 22.7 years ago.

  1. Priority
  2. Filed
  3. Published
  4. Projected expiry
  5. Today

14 claims: 3 independent, 11 dependent

  1. 1
    A method for operating a computing apparatus to translate into a linear query a graphic language query expressed as one or more elements, including example elements (18, 19, 27, 29) and implied operand predicates, appearing in rows (7) and columns (5) of an example table (2, 4, 16, 26, 36) including one or more source (2, 16, 26) and target (4, 36) tables and, optionally, in condition blocks, (6), characterized by the steps of:generating row names into a row name table (82) having one entry for each row in a source table;for each data field (9) within each row named in said row name table which contains an example element definition or implied operand predicate, generating and loading into a column data table (96) an entry specifying the row name, column name, and data;and generating into a conditions table (88) an entry containing a basic predicate for each column data table entry containing an implied operand predicate or an example element having an implied condition;thereby establishing in said row name table, column data table, and conditions table a data structure for synthesizing into a linear query a graphic language query specified as a target print query, or a combined print query, or an insert query, or an update query, or a delete query.
  2. 4
    The method of claim l, comprising the further step, responsive to said graphic language query being a combined print query expressed as a print command appearing in a source table, of synthesizing a linear select query.
  3. 14
    A computing apparatus for translating into a linear query a graphic language query expressed as one or more elements, including example elements (18, 19, 27, 29) and implied operand predicates, appearing in rows (7) and columns (5) of an example table (2, 4, 16, 26, 36) including one or more source (2, 16, 26) and target (4, 36) tables and, optionally, in condition blocks (6), characterized by means (152, 114) for generating row names into a row name table (82) having one entry for each row in a source table;means (154, 116), operable for each data field (9) within each row named in said row name table which contains an example element definition or implied operand predicate, for generating and loading into a column data table (96) an entry specifying the row name, column name, and data;means (158, 116) for generating into a conditions table (88) an entry containing a basic predicate for each column data table entry containing an implied operand predicate or an example element having an implied condition;thereby establishing in said row name table, column data table, and conditions table a data structure for synthesizing into a linear query a graphic language query specificed as a target print query, or a combined print query, or an insert query, or an update query, or a delete query.