English Query is a component of SQL Server 7.0 that allows an application builder to create an application to the data warehouse that allows users to retrieve information from a SQL Server database using natural language rather than a formal query language like SQL. For example, you can ask, “How many widgets were sold in Washington last year?” instead of using these SQL statements:
SELECT sum(Orders.Quantity) from Orders, Parts
WHERE Orders.State='WA'
and Datepart(Orders.Purchase_Date,'Year')='1996'
and Parts.PartName='widget'
and Orders.Part_ID=Parts.Part_ID
English Query accepts natural, English-language commands, statements, and questions as input and determines their meaning. It then writes and executes a database query in SQL and formats the answer. English Query also can request additional information from a user if it cannot interpret a question.
English Query contains a deep knowledge of language syntax and usage, but the application developer must create a domain of information about the data being made available to the user. In English Query, a domain is the collection of all information that is known about the objects in the English Query application. This information includes the specified database objects (such as tables, fields, and joins), semantic objects (such as entities, the relationships between them, and additional dictionary entries), and global domain default options.
The first step to building an English Query application is to model the semantics of the data warehouse. The developer maps the English-language entities (nouns) and relationships (verbs, adjectives, traits, and subsets) to tables, fields, and joins in the database. This is accomplished by using an authoring tool that allows for domain testing outside the application.
After the domain is modeled sufficiently for user testing and access, the developer makes the English Query application accessible through a Visual Basic-based application or a Web-based implementation using Active Server Pages (ASPs). With the increase of intranet-based information delivery to data warehouses, English Query is an excellent tool for providing access without costly query tools and training.
At run time, an end user of an English Query application connects to a Web page through Microsoft Internet Explorer software (or another Web browser) and enters a question. Microsoft Internet Explorer then passes the question to the Windows NT Server’s built-in Web server, Internet Information Services (IIS), along with the URL of the ASP that executes the Visual Basic scripting.
The script passes the question to English Query for translation into an SQL statement. English Query uses domain knowledge about the target database (in the form of an English Query application) to parse the question and translate it into an SQL statement. The script then retrieves this SQL statement, executes it (using an ASP database control), formats the result as HTML, and returns the result page to the user.
English Query includes sample ASPs that can be used as delivered for rapid prototyping, or customized to fit the appearance and behavior of an existing Web application.