QBE (Query By Example)

QBE is a feature that is included in many types of database applications so that it can provide a user-friendly method to run database queries.

The full form of QBE is ” Query By Example .”

If there is no QBE, then a user must write input commands with the help of correct SQL (Structured Query Language) syntax. It is a standard language that is supported by almost all database programs.

At the same time, if its syntax is a bit wrong, then the query gives you wrong results or sometimes does not provide any result.

This Query By Example feature provides a very easy interface for a user to enter these queries. In exchange for writing a full SQL command here, the user only has to fill the blanks or select any items that can be used to define the query that they want to perform.

For example, if a user wants to select an entry from a table named “Table3″ with an ID of 234. While using SQL, the user has to input the command, ” SELECT * FROM Table3 WHERE ID = 234 “.

At the same time, the QBE interface allows the user to click only in Table3, in such a way, all one has to do is type ” 123 ” in the ID field and click ” Search “.

QBE is offered with most database programs, while the interface is very different between applications.

For example, Microsoft Access has a QBE interface called ” Query Design View “, while it is completely graphical.

The phpMyAdmin application uses MySQL, which offers a web-based interface where users have to select a query operator and then fill in the blanks with search terms.

Whatever the QBE implementation is provided in a program, they do the same thing – which is to make it easier to run database queries and also to remove the frustrations of SQL errors.

« Back to Wiki Index