Select (SQL)

As selection is known in the computer science, the selection of data objects from a dataset. The data contained in a database are available only through selection. In the relational algebra, the selection of one of five operators used in relational databases.

Task

In this case, data objects are selected for their properties to display it to export, modify ( update ) or to use as a reference for comparison. Here we can distinguish between unique requests that return only a single tuple as a result and those that provide a list of tuples.

Implementation

The particular implementation is highly dependent on the used data base. Since such systems are designed from its conception to the discovery of records, not a linear search is used. Such a search through large amounts of data is inefficient and often not technically feasible. Here instead are indices used, which make it with a key to find data quickly in a dataset. Such indices use so-called index structures. One focus is the realization mainly on the scalability and parallelization over multiple computers as well as minimizing disk accesses.

Examples

Today, SQL has become established on the market as the standard query language for relational database systems. A selection is made here about the so-called " WHERE" clause, in which the selection criteria are specified. The introductory keyword "SELECT" SQL query against it implements the projection that is the restriction of the result tuple to individual attributes:

  • "SELECT * FROM table ": Returns all rows ( = tuple ) of the table.
  • "SELECT * FROM table WHERE a = 25 ": Are those tuples whose attribute 'a' has the value 25.
  • "SELECT name FROM table WHERE a = 25 ': Returns the attribute ' Name ' of those tuples whose attribute ' a ' has the value 25.
  • SQL
  • Relational database management system
721984
de