NLQ (Natural Language Query) is a tool to query structured data in an easy way, and to quickly glean information out of it, using a familiar looking syntax.
To query structured data, one typically has to
- write complex queries using languages like SQL
… impractical for non-programmers.
- use pre-designed queries provided by the developer
- use graphical interfaces such as drill-down-menus
… useful but cumbersome.
NLQ lets you write natural looking queries with automatic suggestions as you type, and does the hard work of converting them to lower level queries. It is a very flexible and convenient interface, especially for non-technical users.
A familiar interface
Here are two queries in NLQ for a database consisting of companies and their payments:
total payments in november
companies in Bangalore which made payments last month
The same two queries when expressed in SQL would look like this:
SELECT SUM(amount) FROM (SELECT * FROM payment WHERE (payment.date >= '2009-11-01' and payment.date <= '2009-11-30')) AS sum5
SELECT `company`.`id`,`company`.`name`,`company`.`city` FROM company WHERE ( (company.id IN (SELECT payment.company_id FROM payment WHERE (payment.date >= '2009-01-01' AND payment.date <= '2009-01-31' ) ) ) AND ( UPPER(company.city) LIKE '%BANGALORE%') )