Nova Patents
CA2186345C

Database query system

Abstract

A database query system in-cludes a query assitant that permitsthe user to enter only queries thatare both syntactically and semanti-cally valid (and that can be processedby an SQL generator to produce se-mantically valid SQL). Through theuse of dialogue boxes, a user entersa query in an intermediate English-like language which is easily un-derstood by the user. A query ex-pert system monitors the query asit is being built, and using informa-tion about the structure of the data-base, it prevents the user from build-ing semantically incorrect queries bydisallowing choices in the dialogueboxes which would create incorrectqueries. An SQL generator is alsoprovided which uses a set of trans-formations and pattern substitutionsto convert the intermediate languageinto a syntactically and semanticallycorrect SQL query. The intermedi-ate language can represent complexSQL queries while at the same timebeing easy to understand. The inter-mediate language is also designed tobe easily converted into SQL queries. In addition to the query assistant and the SQL generator, an administrative facility is provided whichallows an administrator to add a conceptual layer to the underlying database making it easier for the user to query the database. Thisconceptual layer may contain alternate names for columns and tables, paths specifying standard and complex joins, definitions for virtualtables and columns, and limitations on user access.

CA2186345C, drawing sheet 1
Sheet 1 of 30

Term

Term ended

Expired 23 March 2015, 11.5 years ago.

  1. Priority
  2. Filed
  3. Granted
  4. Expired
  5. Today

26 claims: 1 independent, 25 dependent

  1. 1
    .2186345 What is claimed is:1. A database query system for interactively creating, with a user, a syntactically and semantically correct query for a relational database having a plurality of tables, each of said tables having a plurality of columns and having a predetermined relationship to another of said tables, said system comprising: a conceptual layer manager for storing conceptual information about the relational database, said conceptual information including structural information concerning the identity of each of the tables and columns and the directionality and cardinality of the relationships between the tables;a query assistant user interface (QAUI) presenting to the user a selectable table set of selectable tables from among the tables in the database, a selectable column set of selectable columns from among the columns of each of said tables in the database, and a selectable column operations set of selectable column operations on the columns, from which the user may select tables, columns, and column operations to construct a database query for said database in an intermediate query language, said QAUI further accepting from the user selections of tables, columns, and column operations;a query assistant expert (QAES) coupled to said QAUI to receive from said QAUI the identity of each table, column, or column operation selected by the user, said QAES returning to the QAUI after each selection by the user an updated version of said selectable table set, said selectable column set, and said selectable column operations set, said QAES excluding from said selectable sets any table, column, or column operation which, if selected by the user, would, based - 73 on the then-current state of the database query and said conceptual information, produce a semantically incorrect query.