Click here to Skip to main content
Click here to Skip to main content

SQL-Builder by NQLSoftware

, 31 Aug 2005
The most revolutionary advance in Natural Query Language for SQL Databases...

Editorial Note

This article is in the Product Showcase section for our sponsors at CodeProject. These reviews are intended to provide you with information on products and services that we consider useful and of value to developers.

Benefits of using SQL-Builder

Summary: This White Paper explains the benefits of using SQL-Builder - To save development time and to give the end user an extremely fast, flexible and effortless way to query relational databases.

Brief Background

Almost every software application using a database provides a way for the user to query the database, dialog base or submit a SQL Ad-hoc query. The Dialog base is not flexible, and because of this, many dialogs may have to be built. To enter even a simple SQL Ad-hoc query, the required structure of SQL syntax is too complicated for most end-users. SQL-Builder provides an efficient means to resolve these problems.

SQL is not a language for everyone.

The basic SQL query statement contains three clauses: "select", "from" and "where". Each of the tables or views that participate in the query have to be included in the "from clause". The "where clause" contains "select criteria" and "table joins" if more than one table participates in the query. Joining tables is time consuming and sometimes difficult. With this complexity, developers often spend hours, days or weeks writing a SQL query. To provide a more flexible, simpler and faster solution for the end-user, the programmer and the Database Administrator, NQLSoftware developed SQL-Builder as a tool to write SQL queries faster and with a simpler syntax. This what we refer to as NQL (Natural Query Language).

The basic NQL query contains two clauses: "select" and "where". The "from clause" is omitted completely. The "where clause" only contains "select criteria", and no "table joins" are needed. From the "select clause" and "select criteria" in the "where clause", SQL-Builder uses a proprietary algorithm to determine which tables participate in the query and joins these tables appropriately, then builds the SQL query.

The following are examples to demonstrate and simplify these instructions. Northwind, an example of MS-SQL database is being used .

Examples

NQL query:

show suppliers where customer city is London 

SQL-Builder translates to SQL as follows:

SQL query:

SELECT Suppliers.* FROM SUPPLIERS, PRODUCTS, [ORDER DETAILS], ORDERS, <BR>       CUSTOMERS 
WHERE ((Suppliers.SupplierID = Products.SupplierID) 
AND (Products.ProductID = [Order Details].ProductID) 
AND (Orders.OrderID = [Order Details].OrderID) 
AND (Customers.CustomerID = Orders.CustomerID)) 
AND (Customers.City = 'London') 

In the example above, "customer city" is an "alias" of "Customers.City" this makes the query closer to a natural English sentence.

NQL query:

show employees who live in London 

SQL query:

SELECT Employees.* FROM EMPLOYEES WHERE Employees.City = 'London'. 

NQL query:

show how many employees who live in London 

SQL query:

SELECT COUNT(*) FROM EMPLOYEES WHERE Employees.CITY = 'London' 

NQL query is an easier language statement to understand than the SQL query statement isn't it? Now you see how simple the NQL query is compared to the SQL query statement.

Dialog base with NQL

Since the NQL query syntax is very simple, it needs only the "select clause" and "select criteria". If your application has a dialog to build the select clause and select criteria, this dialog can build any query. The "Click Query" feature of SQL-Builder is an example of such a dialog. There is no need to build many query dialogs, as is the case when using SQL. The Click Query of SQL-Builder is pick and click style. Unlike other products, Click Query allows user to select more than one search objects and filters on any object attributes. With this feature and the mouse only, users may issue and kind of query, simple or complex, programmers may quickly create views or stored procedures.

Ad-hoc query with NQL

With the simplicity of the NQL syntax, natural, English-like query, developers spend less time writing queries. Using NQL, It now takes only seconds to write queries, and virtually anyone can now write queries, they can write queries with their own spoken languages. The NQL Ad-hoc query or Natural Language Query may be an option for your software application. Natural Language Query of SQL-Builder features with auto-complete, highlight the closet matched word while user typing the query. Also users may save the query for later use.

SQL-Builder understands every word in the sentence and translates accurately to SQL.

Relational Database Keyword Query with NQL

Keyword searches are popular in the field of document searches. Are you able to query your relational database using Keywords? Yes, now you can. SQL-Builder uses a proprietary algorithm to index your database to locate the data. When search it locates the data and joins tables appropriately to return the correct results. SQL-Builder does not have any restrictions requiring all keywords to be located in one data cell. Here is an example; Suppose you are searching for Boston seafood products. You simply select "products" from the "search for" combo box and enter "seafood Boston" in the "with all the words" text box, then click the Search button. In the above scenario, "seafood" is in the "categories" table; however, "boston "is in "Suppliers" table. In actuality, NONE of the keywords searched in the above example need to be in the "products" table which we search on.

Dictionary

SQL-Builder features a dictionary that allows users to define words, define phrases, build their language, configure output, and save queries. When a word or a phrase defined it becomes a valid words, user may define new words, new phrases base on the defined words, recursively.

Data Location

Users can quickly locate where the data resides. If you know the keyword, say "Seafood", you may use the Keyword Query, don't specify the search object and search by keyword "Seafood", SQL-Builder will find all data cells (table and column) that contain the keyword "Seafood", for you. You may search by table name or column name. Suppose you want to know what tables store first name, you may use the WordBuilder of SQL-Builder, enter "first%name" in the new word edit box and click on the filter button, SQL-Builder will get all tables and all columns where the name is first%name ('%' is wild card).

Conclusion

SQL-Builder increases productivity over the entire enterprise by saving a significant amount of development time for the programmer and Database Administrator and gives the end-user a faster, more flexible method to query relational databases.

Further Information

For more information on SQL-Builder and other products by NQLSoftware please visit our website. Or contact NQLSoftware for a live-on-line demonstration.

Download

SQL BUILDER V4.0 is available free of charge via download. These trial versions are fully functional and valid for 30 days.

Buy Now

You'll get a 40% discount off the regular price of $369.99. And, for a limited time only, we are offering our new DMS (Document Management System) free of charge for customers who purchase SQL-Builder. This offer is valid through 09/30/2005 only.

About DMS

DMS Uses the database to index documents resulting in a very quick response. You can specify directories to search and the maximum number of documents to return. You can search on almost any file including, but not limited to, the following file types: .doc, .pdf (DMS for oracle only), .txt, .rtf, .htm, .html, .xml, .asp, .aspx, .ppt, .xls, and .jpg.

DMS supports Incremental indexing, which detects the following changes to files and updates the index accordingly: Modification, deletion, addition, renaming.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here

Share

About the Author

Tran NQLSoftware
Web Developer
United States United States
No Biography provided

Comments and Discussions

 
QuestionAbout Code PinmemberJimish Parekh8-Oct-13 4:56 
Can I know what libraries you have used for building this project?
QuestionProducts and supplier PinmemberJörgen Sigvardsson31-Aug-05 12:16 
AnswerRe: Products and supplier Pinmembercomputerguru9238225-Feb-06 13:14 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

| Advertise | Privacy | Terms of Use | Mobile
Web01 | 2.8.1411023.1 | Last Updated 31 Aug 2005
Article Copyright 2005 by Tran NQLSoftware
Everything else Copyright © CodeProject, 1999-2014
Layout: fixed | fluid