Term Library / Concept card

What is database query? Plain-English meaning

A database query is a request for specific information from a database, written in a language the database understands, such as SQL.

Back to Term LibraryBrowse Articles

Path: /term/database-query

Definition

A database query is a request for specific information from a database, written in a language the database understands, such as SQL.

Also seen as: query, SQL query, database search

Term library detailsSources attached
Library
Part of the Term Library
Format
Concept card
Last updated
September 7, 2026
Topic
Technology & Internet
Sources and further reading
2
Related articles
5

Plain-English explanation

A database is a structured collection of data, like a digital filing cabinet. A query is the question you ask the database, and the database returns the matching records. Queries can be simple, like asking for one customer's name, or complex, like combining data from multiple tables. They are essential for retrieving, updating, or deleting data efficiently without manually scanning everything.

Why it matters

Queries are how applications and users get value from data. When you search for a product on a website, check your bank balance, or look up a word in an online dictionary, a query is happening behind the scenes. Understanding queries helps you appreciate how data is organized and retrieved, and why performance matters.

Concrete example

Imagine a database for a library. A query might be: 'SELECT title, author FROM books WHERE genre = 'Science Fiction' AND year > 2000;' This asks the database to return the titles and authors of all science fiction books published after 2000. The database scans its records and returns a list of matching books.

Often confused with

People often confuse a database query with a database itself. A database is the storage system, while a query is the request for data. Another confusion is thinking queries are only for searching; they can also insert, update, or delete records.

Short definition: A database query is a request for specific information from a database, written in a language the database understands, such as SQL.

Plain-English explanation

A database is a structured collection of data, like a digital filing cabinet. A query is the question you ask the database, and the database returns the matching records. Queries can be simple, like asking for one customer's name, or complex, like combining data from multiple tables. They are essential for retrieving, updating, or deleting data efficiently without manually scanning everything.

Why it matters

Queries are how applications and users get value from data. When you search for a product on a website, check your bank balance, or look up a word in an online dictionary, a query is happening behind the scenes. Understanding queries helps you appreciate how data is organized and retrieved, and why performance matters.

Concrete example

Imagine a database for a library. A query might be: 'SELECT title, author FROM books WHERE genre = 'Science Fiction' AND year > 2000;' This asks the database to return the titles and authors of all science fiction books published after 2000. The database scans its records and returns a list of matching books.

Common confusion

People often confuse a database query with a database itself. A database is the storage system, while a query is the request for data. Another confusion is thinking queries are only for searching; they can also insert, update, or delete records.

Related terms

database, SQL, table, record, index

How people actually use it

Software developers write queries to fetch user records, generate reports, and update data. Analysts use query languages like SQL to explore data and answer business questions.

Related terms explained

SQL

SQL (Structured Query Language) is a standardized programming language used to manage and query relational databases. It includes commands for selecting, inserting, updating, and deleting data.

Example: The SQL command "SELECT * FROM customers WHERE age > 30" retrieves all customers over 30.

relational database

A relational database organizes data into tables with rows and columns, linked by keys. It is the most common type of database for structured data.

Example: An e-commerce site might use a relational database with tables for products, orders, and customers.

index

A database index is a data structure that speeds up data retrieval operations on a table. It works like an index in a book, allowing quick lookup of rows based on column values.

Example: Creating an index on an email column makes a query for a specific email return instantly instead of scanning the whole table.

query optimization

Query optimization is the process of improving a query's execution efficiency, often by using indexes or rewriting the query. It aims to reduce response time and resource usage.

Example: Rewriting a query to filter rows before joining tables can significantly speed up performance.

Practical tips

Array

Common questions

Array

Key takeaways

Array

Step by step

Array

More context

The concept of database queries dates back to the 1970s with the development of SQL at IBM, based on relational algebra. Query optimization is a major field in database research, with modern DBMSs using cost-based optimizers to choose efficient execution plans. NoSQL databases like MongoDB use JSON-like query syntax, and graph databases use pattern-matching queries (e.g., Cypher).

Sources and further reading

  1. What is a Database?Amazon Web ServicesDatabases store and organize data on servers so applications can find and update records reliably.
  2. PLANTS DatabaseU.S. Department of AgricultureThe PLANTS Database provides information about plants, flowers, and trees that grow across regions, including how plants grow through photosynthesis, how pollination spreads them, and how compost improves garden soil.