English Query provides an OLE Automation API that lets users resolve natural-language questions about the information in a Microsoft® SQL Server™ database.
Given a definition of the entities and relationships associated with a SQL Server database, English Query translates a natural-language question about data in the database to a set of SQL SELECT statements that can then be executed against the SQL Server database to get the answer.
For example, given a car sales database, an application can send English Query a string containing the question, “How many blue Fords were sold in 1996?”
English Query returns to the application an SQL statement such as:
SELECT COUNT(*)
FROM CarSales
WHERE Make = 'Ford'
AND Color = 'Blue'
AND DATEPART(yy, SalesDate) = '1996'
The application can then execute the SQL statement against the SQL Server database to get a number it can return to the user.
English Query works best with a normalized database. There are two parts to using English Query in an application:
An English Query domain contains:
English Query is an OLE Automation server that can be called from any OLE Automation application. The OLE Automation server, or run-time engine, exposes an object model API. An OLE Automation application uses the API to load the English Query application file and then send the run-time engine natural-language questions. The run-time engine usually returns an SQL statement or batch that will retrieve the needed information from the SQL Server database. Sometimes the run-time engine can provide the answer directly, request clarification, or return an error.