Selection (relational algebra)
- Selection (relational algebra)
In relational algebra, a selection (sometimes called a restriction to avoid confusion with SQL's use of SELECT) is a unary operation written as or where:
* and are attribute names
* is a binary operation in the set
* is a value constant
* is a relation
The selection selects all those tuples in for which holds between the and the attribute.
The selection selects all those tuples in for which holds between the attribute and the value .
For an example, consider the following tables where the first table gives the relation , the second table gives the result of and the third table gives the result of .
|
More formally the semantics of the selection is defined asfollows:
:
:
The result of the selection is only defined if the attribute names that it mentions are in the heading of the relation that it operates upon.
In computer languages it is expected that any truth-valued expression be permitted as the selection condition rather than restricting it to be a simple comparison.
In SQL, selections are performed by using WHERE
definitions in SELECT
, UPDATE
, and DELETE
statements, but note that the selection condition can result in any of three truth values ("true", "false" and "unknown") instead of the usual two.
ee also
* Generalized selection
Wikimedia Foundation.
2010.
Look at other dictionaries:
Relational algebra — Not to be confused with Relation algebra. Relational algebra, an offshoot of first order logic (and of algebra of sets), deals with a set of finitary relations (see also relation (database)) that is closed under certain operators. These operators … Wikipedia
Selection (disambiguation) — Selection may refer to:* Selection, in the context of biological evolution * in computer science ** Selection algorithm, an algorithm that finds the k th smallest number in a list ** Selection (genetic algorithm) ** Selection (relational algebra) … Wikipedia
Relational database — A visual diagram showing the relationship between the two tables, as indicated by the arrow A relational database matches data by using common characteristics found within the data set. The resulting groups of data uses the relational model (a… … Wikipedia
Relational Database Management System — Eine relationale Datenbank dient zur elektronischen Datenverwaltung in Computersystemen und beruht auf dem relationalen Datenbankmodell. Dieses wurde 1970 von Edgar F. Codd erstmals vorgeschlagen und ist bis heute, trotz einiger Kritikpunkte, ein … Deutsch Wikipedia
Relational Database Management Systems — Eine relationale Datenbank dient zur elektronischen Datenverwaltung in Computersystemen und beruht auf dem relationalen Datenbankmodell. Dieses wurde 1970 von Edgar F. Codd erstmals vorgeschlagen und ist bis heute, trotz einiger Kritikpunkte, ein … Deutsch Wikipedia
Generalized selection — In relational algebra, a generalized selection is a unary operation written as sigma varphi(R) where varphi is a propositional formula that consists of atoms as allowed in the normal selection and the logical operators and (and), or (or) and lnot … Wikipedia
Object-relational impedance mismatch — The object relational impedance mismatch is a set of conceptual and technical difficulties that are often encountered when a relational database management system (RDBMS) is being used by a program written in an object oriented programming… … Wikipedia
Rete — эффективный алгоритм сопоставления с образцом для продукционных систем, экспертных систем и баз знаний , созданный Чарльзом Форги из Университета Карнеги Меллона. Впервые был описан в рабочем документе 1974 года, затем в докторской диссертации… … Википедия
Алгоритм Rete — Rete[1] эффективный алгоритм сопоставления с образцом для продукционных систем, экспертных систем и баз знаний, созданный Чарльзом Форги из Университета Карнеги Меллона. Впервые был описан в рабочем документе 1974 года, затем в докторской… … Википедия
Charles Sanders Peirce — B … Wikipedia