Query

Query

in

A query is a method for storing or retrieving content from or into a database based on specific criteria. These storage or retrieval statements are presented as questions to the database in a specific format. Databases use query languages to define the formats of these queries. Most traditional relational databases use a dialect of Structured Query Language (SQL) such as T-SQL, SQL-92, PL-SQL, pgSQL, or PL/SQL. Plum uses databases to store data for many of our IVR applications.

There are two possible types of queries. These types are select query and action query. A select query is the basic retrieval query. The most common keywords for this query are SELECT, FROM, ORDER BY, LIMIT, WHERE, LIKE, and AND. The action query has many different abilities like inserting, updating, and deleting. The most common keywords for this query are CREATE TABLE, INSERT INTO, UPDATE, DELETE FROM, VALUES, WHERE, and AND.

Good database design usually attempts to organize information so that a piece of data is never kept in more than one location at once. This is a key principle of correctly using relational databases: if data is not stored in multiple locations, it is impossible for information in the database to become internally inconsistent, since there is only one location to be updated. Linking tables together via foreign keys allow queries against multiple tables to retrieve all needed information for a task; this technique is called a join. Only in extreme circumstances where join performance becomes a bottleneck should data be denormalized, which means to condense multiple tables of related data into a larger table with possibly repetitive information in each row.

The basic syntax of a retrieval query contains: what fields should be returned to the application, which table or tables to reference, what the key link between tables is (if more than two tables are used), and the selection criteria. An example of this would be SELECT return_value FROM new_table WHERE call_id = 3.

Related links

Related terms

for "Query"

Search Glossary

Term of the Day

Conjoint analysis is a technique that is used to estimate the value subjects place on a product or service’s attributes or features.