What’s the example query?

Print anything with Printful



Query example (QBE) is a language for relational databases that allows users to complete information they know about the data they are looking for. It simplifies SQL queries and can be used through a form or data entry application. It is used in Microsoft Outlook Web Access for recipient lookup.

Query example (QBE) is a query language for relational databases similar to Structured Query Language (SQL). The “for example” part of this data collection language allows the person or application trying to retrieve data from the relational database to complete the information it knows about the data it is looking for. The Query example method could include a form that the user would complete to generate a database-understandable SQL query.

For example, suppose there was a database full of employees in an organization and this information was made available to employees in case they needed to communicate with other employees. The database that stores the information includes commands like select fname from dependent where lname = ‘smith’, however many people don’t understand this kind of syntax. The query for example can help with this. The following statement:

select fname, lname, extension from employees where lname =’smith’

instructs the database to examine the employee information table and display all first names (fname), last names (lname), and extensions (extension) where the last name field contains the value smith. Using a QBE-style query, the user looking for this information could supply the information he knows, surname = ‘smith’, and see the information relating to that surname. This allows the employee to provide an example of what she is looking for and see the results returned.

The query sent to the database in the previous example looks like the SQL statement shown above, even though the person doing the search only told the database that the last name was Smith and therefore what elements he needed to know, the first name, last name, extension. Since most queries use for example a form or data entry application, the dependents of the table could be hard-coded into the system so users don’t have to worry about them.

Another similar example is the recipient lookup used by Microsoft Outlook Web Access®. When someone clicks the To field header, another form opens for that person to complete what they know and click the Find button, all records that match the specified sample will be returned, and the employee can do click on the correct information to use it in an email message.




Protect your devices with Threat Protection by NordVPN


Skip to content