Query

In computing, a query generally refers to a database request. When a user browses a website or uses an application, database queries happen in the background almost all the time. For example, dynamic websites send database requests with the opening of every new page.

Databases generally store data in multiple tables that hold descriptors along with records of information. A query retrieves data from different tables, organizes it and displays it by the commands. There are select queries that fetch information, action queries that manipulate data, and combination queries of select and action to perform more complex data management tasks, such as modifying or deleting.

Queries need to be written according to a pre-defined code for a database to understand them. Such code is also known as a query language. Structured Query Language (SQL) is the most well-known but there are also others, such as DMX, AQL and Datalog.

Query has a different meaning in the context of web search. There it refers to keywords that a user types to the search engine. These keywords are processed using an algorithm that retrieves related results from the search index. After this, the results are displayed on the Search Engine Results Page (SERP).