Browse Prior Art Database

Syntax Checking for the Tree Structure Representation in Visual Query

IP.com Disclosure Number: IPCOM000101744D
Original Publication Date: 1990-Aug-01
Included in the Prior Art Database: 2005-Mar-16
Document File: 2 page(s) / 74K

Publishing Venue

IBM

Related People

Banning, KR: AUTHOR [+2]

Abstract

Disclosed is the method by which the syntax for the SQL row conditions produced in the visual query model are validated. The method is designed to catch the special properties of the tree structure representation in Visual Query and only perform the check when SQL representation is required. The user is free from worrying about the syntactical correctness and completeness of the tree representation. If there is any syntax error, the parts are visually identified and highlighted.

This text was extracted from an ASCII text file.
This is the abbreviated version, containing approximately 52% of the total text.

Syntax Checking for the Tree Structure Representation in Visual Query

       Disclosed is the method by which the syntax for the SQL
row conditions produced in the visual query model are validated. The
method is designed to catch the special properties of the tree
structure representation in Visual Query and only perform the check
when SQL representation is required.  The user is free from worrying
about the syntactical correctness and completeness of the tree
representation.  If there is any syntax error, the parts are visually
identified and highlighted.

      SQL queries sometimes require row conditions to fetch desired
data. In Visual Query, the row condition is constructed in the
Condition Window by using a tree structure representation.  Since
predicates and the structure of tree representation may be changed by
the users, a syntax checking for the tree structure is necessary to
assure the tree syntactically represents a valid SQL logical
expression.

      The tree structure representation of the row condition in
Visual Query should always satisfy the following rules when syntax
checking is performed:
   1.  There exists one and only one root node in the tree.
   2.  Every node, except the root, must have one and only one parent
node.
      3.  The parent node of every predicate node must be a logical
operator node.
      4.  The parent node of every operator node, except the root,
must also be an operator node.
      5.  The operator nodes cannot be leaf nodes.
      6.  If an operator node has no more than one child node, this
node should be deleted and its child node, if any, should be linked
directly to its parent node automatically.

      The figure is an example of the tree structure representation,
where the leftmost node ("AND") is the root of t...