Query By Example


Query By Example (QBE) is a database search technique that allows users to search for information by presenting it with an example or template of the data for which it’s searching. The system then uses that example to generate a query and find matching records. It is a commonly used approach in various database management systems.


The phonetics of the keyword “Query By Example” can be described as follows:- Query: /ˈkweri/- By: /bai/- Example: /ɪɡˈzæmpəl/

Key Takeaways

Sure, here are three main takeaways about Query By Example:“`html

  1. Query by Example (QBE) is a database query language for relational databases. It is a high-level, non-procedural, English-like language with powerful capabilities. It allows users to request data from a database by constructing a visual representation of what they want to retrieve.
  2. In QBE, a user creates a simplified query grid and fills it with examples of data that need to be retrieved. The system then generates the SQL code needed to retrieve that specific information. This makes it user-friendly, particularly for non-programmers, simplifying the retrieval process and reducing errors.
  3. Despite its benefits, QBE has some limitations. It’s less flexible than SQL and other procedural languages, meaning it might not be suitable for more complex queries. Additionally, it may require more management and maintenance if schemas or database structures are altered.



Query By Example (QBE) technology is important as it provides a user-friendly method of structuring database searches. Users don’t have to know the specific programming language associated with the database to extract information, this method allows users to look for results by providing an example dataset instead. This makes the process of data mining easier, more inclusive, and accessible to non-technical personnel. Also, QBE can be used to simplify the formation of complex queries, making it an ideal tool for relational databases and data analysis. Overall, QBE helps in improving the efficiency and effectiveness of data retrieval.


Query By Example (QBE) is a technology utilized primarily in databases to facilitate a more user-friendly search operation. The purpose of QBE is to provide a simplified approach for users to extract specific data from databases, enabling those without specialist knowledge of structured query language (SQL) to make complex data inquiries. Users are provided with a tabular template or “example” where they can input values or make specifications, which the system interprets and translates into a SQL query to fetch the required information.QBE is particularly popular in the realm of business data management given its impressive versatility and ease of use. For instance, in database administration, it is efficiently used for compiling reports or extracting specific subsets of data based on customizable criteria. In a retail business, a manager might use QBE to extract customer purchasing data by specifying certain parameters such as date, amount, and product type. Essentially, QBE enables non-technical users to interact with databases and extract key insights without needing expert-level database querying skills.


1. Database Management: Query By Example (QBE) is a widely used feature in various database management systems. For instance, in Microsoft Access, users can enter data in a “form” that resembles an empty record. The system then uses this input to search for matching records in the database. This makes it easier for people who are not skilled in structured query language (SQL) to find the information they need.2. Online Shopping: Websites like Amazon or eBay use a type of QBE where customers can enter or select specific attributes to find a product, such as a particular brand, color, size, and price range. The system generates a query based on these inputs and returns a list of matching products.3. Job Search Websites: Platforms like LinkedIn, Indeed, and Glassdoor allow users to enter specific criteria (location, job title, experience level, salary range, etc) to search for job postings. This is another application of QBE, where the system finds and displays the job listings that match the user’s provided criteria.

Frequently Asked Questions(FAQ)

**Q1: What is Query By Example (QBE)?**A1: Query By Example (QBE) is a user-friendly query language used for relational databases. It enables users to request data based on a model or example, rather than a strict syntax.**Q2: How does Query By Example work?**A2: In QBE, a user fills out a grid or template, also known as the query-by-example box, to request specific information from the database. The fields filled with values are used as criteria for the search, returning data that matches that criteria.**Q3: Who developed Query By Example?**A3: Query By Example was first developed by Moshé M. Zloof at IBM Research during the 1970s as a part of the System R database software.**Q4: What makes QBE different from SQL or other database query languages?**A4: Unlike SQL or other languages, QBE allows users to construct queries by filling out forms or templates. Thus, users don’t need to understand complex syntax or query structures. This makes it more accessible for novices or non-technical users.**Q5: Can you use Query By Example in Microsoft Access?**A5: Yes, QBE techniques are often used in popular database management systems like Microsoft Access, where users can visually construct queries in the Design View.**Q6: Does QBE work on all types of databases?**A6: QBE is mainly designed for relational databases. While it can potentially be used with other types, it is best suited for tables with relationships.**Q7: Is knowledge of coding necessary to use Query By Example?**A7: Not usually. The primary advantage of QBE is that it doesn’t require users to know specific coding or query syntax to extract data from a database.**Q8: What is a QBE grid?**A8: The QBE grid is the space where the user enters the search criteria. Each column represents an attribute or field of the database, and the user places criteria in these columns to specify the desired data.**Q9: Can QBE handle complex queries?**A9: Yes. While it’s very user-friendly for simple queries, QBE can also manage more complex scenarios involving multiple tables and advanced search criteria. **Q10: How efficient is Query by Example when handling large databases?**A10: QBE’s efficiency depends on the specific database system. Generally, QBE performs well with large databases, but performance can be impacted by the size and complexity of queries.

Related Tech Terms

  • Structured Query Language (SQL)
  • Database Management System (DBMS)
  • Relational Database
  • Data Retrieval
  • User Interface

Sources for More Information


About The Authors

The DevX Technology Glossary is reviewed by technology experts and writers from our community. Terms and definitions continue to go under updates to stay relevant and up-to-date. These experts help us maintain the almost 10,000+ technology terms on DevX. Our reviewers have a strong technical background in software development, engineering, and startup businesses. They are experts with real-world experience working in the tech industry and academia.

See our full expert review panel.

These experts include:


About Our Editorial Process

At DevX, we’re dedicated to tech entrepreneurship. Our team closely follows industry shifts, new products, AI breakthroughs, technology trends, and funding announcements. Articles undergo thorough editing to ensure accuracy and clarity, reflecting DevX’s style and supporting entrepreneurs in the tech sphere.

See our full editorial policy.

More Technology Terms

Technology Glossary

Table of Contents