In the theory of
relational databases
A relational database is a (most commonly digital) database based on the relational model of data, as proposed by E. F. Codd in 1970. A system used to maintain relational databases is a relational database management system (RDBMS). Many relatio ...
, a Boolean conjunctive query is a
conjunctive query In database theory, a conjunctive query is a restricted form of first-order queries using the logical conjunction operator. Many first-order queries can be written as conjunctive queries. In particular, a large part of queries issued on relation ...
without distinguished predicates, i.e., a query in the form
, where each
is a relation symbol and each
is a
tuple
In mathematics, a tuple is a finite ordered list (sequence) of elements. An -tuple is a sequence (or ordered list) of elements, where is a non-negative integer. There is only one 0-tuple, referred to as ''the empty tuple''. An -tuple is defi ...
of variables and constants; the number of elements in
is equal to the
arity
Arity () is the number of arguments or operands taken by a function, operation or relation in logic, mathematics, and computer science. In mathematics, arity may also be named ''rank'', but this word can have many other meanings in mathematics. In ...
of
. Such a query evaluates to either true or false depending on whether the relations in the database contain the appropriate tuples of values, i.e. the conjunction is
valid
Validity or Valid may refer to:
Science/mathematics/statistics:
* Validity (logic), a property of a logical argument
* Scientific:
** Internal validity, the validity of causal inferences within scientific studies, usually based on experiments
** ...
according to the facts in the database.
As an example, if a
database schema
The database schema is the structure of a database described in a formal language supported by the database management system (DBMS). The term " schema" refers to the organization of data as a blueprint of how the database is constructed (divid ...
contains the relation symbols (binary, who's the father of whom) and (unary, who is employed), a conjunctive query could be
. This query evaluates to true if there exists an individual who is a child of Mark and employed. In other words, this query expresses the question: "does Mark have an employed child?"
See also
*
Logical conjunction
In logic, mathematics and linguistics, And (\wedge) is the truth-functional operator of logical conjunction; the ''and'' of a set of operands is true if and only if ''all'' of its operands are true. The logical connective that represents thi ...
*
Conjunctive query In database theory, a conjunctive query is a restricted form of first-order queries using the logical conjunction operator. Many first-order queries can be written as conjunctive queries. In particular, a large part of queries issued on relation ...
References
* {{cite journal
, author1=G. Gottlob , author2=N. Leone , author3=F. Scarcello , title = The complexity of acyclic conjunctive queries
, journal = Journal of the ACM
, volume = 48
, issue = 3
, pages = 431–498
, year = 2001
, doi = 10.1145/382780.382783
Boolean algebra