<s>
The	O
relational	B-Architecture
model	I-Architecture
(	O
RM	O
)	O
is	O
an	O
approach	O
to	O
managing	O
data	O
using	O
a	O
structure	O
and	O
language	O
consistent	O
with	O
first-order	O
predicate	B-Algorithm
logic	O
,	O
first	O
described	O
in	O
1969	O
by	O
English	O
computer	O
scientist	O
Edgar	O
F	O
.	O
Codd	O
,	O
where	O
all	O
data	O
is	O
represented	O
in	O
terms	O
of	O
tuples	B-Application
,	O
grouped	O
into	O
relations	O
.	O
</s>
<s>
A	O
database	O
organized	O
in	O
terms	O
of	O
the	O
relational	B-Architecture
model	I-Architecture
is	O
a	O
relational	B-Application
database	I-Application
.	O
</s>
<s>
The	O
purpose	O
of	O
the	O
relational	B-Architecture
model	I-Architecture
is	O
to	O
provide	O
a	O
declarative	B-Language
method	O
for	O
specifying	O
data	O
and	O
queries	B-Library
:	O
users	O
directly	O
state	O
what	O
information	O
the	O
database	O
contains	O
and	O
what	O
information	O
they	O
want	O
from	O
it	O
,	O
and	O
let	O
the	O
database	B-Application
management	I-Application
system	I-Application
software	O
take	O
care	O
of	O
describing	O
data	O
structures	O
for	O
storing	O
the	O
data	O
and	O
retrieval	O
procedures	O
for	O
answering	O
queries	B-Library
.	O
</s>
<s>
Most	O
relational	B-Application
databases	I-Application
use	O
the	O
SQL	B-Language
data	O
definition	O
and	O
query	B-Language
language	I-Language
;	O
these	O
systems	O
implement	O
what	O
can	O
be	O
regarded	O
as	O
an	O
engineering	O
approximation	O
to	O
the	O
relational	B-Architecture
model	I-Architecture
.	O
</s>
<s>
A	O
table	B-Application
in	O
a	O
SQL	B-Language
database	I-Language
schema	B-Application
corresponds	O
to	O
a	O
predicate	B-Algorithm
variable	O
;	O
the	O
contents	O
of	O
a	O
table	B-Application
to	O
a	O
relation	B-Algorithm
;	O
key	O
constraints	O
,	O
other	O
constraints	O
,	O
and	O
SQL	B-Language
queries	B-Library
correspond	O
to	O
predicates	B-Algorithm
.	O
</s>
<s>
However	O
,	O
SQL	B-Language
databases	I-Language
deviate	O
from	O
the	O
relational	B-Architecture
model	I-Architecture
in	O
many	O
details	O
,	O
and	O
Codd	O
fiercely	O
argued	O
against	O
deviations	O
that	O
compromise	O
the	O
original	O
principles	O
.	O
</s>
<s>
The	O
central	O
idea	O
of	O
a	O
relational	B-Architecture
model	I-Architecture
is	O
to	O
describe	O
a	O
database	O
as	O
a	O
collection	O
of	O
predicates	B-Algorithm
over	O
a	O
finite	O
set	O
of	O
predicate	B-Algorithm
variables	O
,	O
describing	O
constraints	O
on	O
the	O
possible	O
values	O
and	O
combinations	O
of	O
values	O
.	O
</s>
<s>
a	O
set	O
of	O
relations	O
,	O
one	O
per	O
predicate	B-Algorithm
variable	O
,	O
such	O
that	O
all	O
predicates	B-Algorithm
are	O
satisfied	O
.	O
</s>
<s>
A	O
request	O
for	O
information	O
from	O
the	O
database	O
(	O
a	O
database	B-Application
query	I-Application
)	O
is	O
also	O
a	O
predicate	B-Algorithm
.	O
</s>
<s>
Other	O
models	B-General_Concept
include	O
the	O
hierarchical	B-General_Concept
model	I-General_Concept
and	O
network	B-General_Concept
model	I-General_Concept
.	O
</s>
<s>
Some	O
systems	O
using	O
these	O
older	O
architectures	O
are	O
still	O
in	O
use	O
today	O
in	O
data	B-Operating_System
centers	I-Operating_System
with	O
high	O
data	O
volume	O
needs	O
,	O
or	O
where	O
existing	O
systems	O
are	O
so	O
complex	O
and	O
abstract	O
that	O
it	O
would	O
be	O
cost-prohibitive	O
to	O
migrate	O
to	O
systems	O
employing	O
the	O
relational	B-Architecture
model	I-Architecture
.	O
</s>
<s>
Also	O
of	O
note	O
are	O
newer	O
object-oriented	B-Application
databases	I-Application
.	O
</s>
<s>
Several	O
attempts	O
have	O
been	O
made	O
to	O
produce	O
a	O
true	O
implementation	O
of	O
the	O
relational	B-Architecture
database	I-Architecture
model	I-Architecture
as	O
originally	O
defined	O
by	O
Codd	O
and	O
explained	O
by	O
Date	O
,	O
Darwen	O
and	O
others	O
,	O
but	O
none	O
have	O
popular	O
successes	O
so	O
far	O
.	O
</s>
<s>
,	O
Rel	B-Application
is	O
one	O
of	O
the	O
more	O
recent	O
attempts	O
to	O
do	O
this	O
.	O
</s>
<s>
The	O
relational	B-Architecture
model	I-Architecture
was	O
the	O
first	O
database	B-General_Concept
model	I-General_Concept
to	O
be	O
described	O
in	O
formal	O
mathematical	O
terms	O
.	O
</s>
<s>
Hierarchical	O
and	O
network	B-General_Concept
databases	I-General_Concept
existed	O
before	O
relational	B-Application
databases	I-Application
,	O
but	O
their	O
specifications	O
were	O
relatively	O
informal	O
.	O
</s>
<s>
After	O
the	O
relational	B-Architecture
model	I-Architecture
was	O
defined	O
,	O
there	O
were	O
many	O
attempts	O
to	O
compare	O
and	O
contrast	O
the	O
different	O
models	B-General_Concept
,	O
and	O
this	O
led	O
to	O
the	O
emergence	O
of	O
more	O
rigorous	O
descriptions	O
of	O
the	O
earlier	O
models	B-General_Concept
;	O
though	O
the	O
procedural	O
nature	O
of	O
the	O
data	O
manipulation	O
interfaces	O
for	O
hierarchical	O
and	O
network	B-General_Concept
databases	I-General_Concept
limited	O
the	O
scope	O
for	O
formalization	O
.	O
</s>
<s>
The	O
relational	B-Architecture
model	I-Architecture
was	O
developed	O
by	O
Edgar	O
F	O
.	O
Codd	O
as	O
a	O
general	O
model	O
of	O
data	O
,	O
and	O
subsequently	O
promoted	O
by	O
Chris	O
Date	O
and	O
Hugh	O
Darwen	O
among	O
others	O
.	O
</s>
<s>
In	O
their	O
1995	O
The	O
Third	O
Manifesto	O
,	O
Date	O
and	O
Darwen	O
try	O
to	O
demonstrate	O
how	O
the	O
relational	B-Architecture
model	I-Architecture
can	O
accommodate	O
certain	O
"	O
desired	O
"	O
object-oriented	B-Language
features	O
.	O
</s>
<s>
Some	O
years	O
after	O
publication	O
of	O
his	O
1970	O
model	O
,	O
Codd	O
proposed	O
a	O
three-valued	B-Language
logic	I-Language
(	O
True	O
,	O
False	O
,	O
Missing/NULL	O
)	O
version	O
of	O
it	O
to	O
deal	O
with	O
missing	O
information	O
,	O
and	O
in	O
his	O
The	O
Relational	B-Architecture
Model	I-Architecture
for	O
Database	B-Application
Management	I-Application
Version	O
2	O
(	O
1990	O
)	O
he	O
went	O
a	O
step	O
further	O
with	O
a	O
four-valued	O
logic	O
(	O
True	O
,	O
False	O
,	O
Missing	O
but	O
Applicable	O
,	O
Missing	O
but	O
Inapplicable	O
)	O
version	O
.	O
</s>
<s>
SQL	B-Language
's	O
NULL	B-Language
construct	O
was	O
intended	O
to	O
be	O
part	O
of	O
a	O
three-valued	B-Language
logic	I-Language
system	O
,	O
but	O
fell	O
short	O
of	O
that	O
due	O
to	O
logical	O
errors	O
in	O
the	O
standard	O
and	O
in	O
its	O
implementations	O
.	O
</s>
<s>
The	O
fundamental	O
assumption	O
behind	O
a	O
relational	B-Architecture
model	I-Architecture
is	O
that	O
all	O
data	O
is	O
represented	O
as	O
mathematical	O
n-ary	O
relations	O
,	O
an	O
n-ary	O
relation	B-Algorithm
being	O
a	O
subset	O
of	O
the	O
Cartesian	O
product	O
of	O
n	O
domains	O
.	O
</s>
<s>
In	O
the	O
mathematical	O
model	O
,	O
reasoning	O
about	O
such	O
data	O
is	O
done	O
in	O
two-valued	O
predicate	B-Algorithm
logic	O
,	O
meaning	O
there	O
are	O
two	O
possible	O
evaluations	O
for	O
each	O
proposition	O
:	O
either	O
true	O
or	O
false	O
(	O
and	O
in	O
particular	O
no	O
third	O
value	O
such	O
as	O
unknown	O
,	O
or	O
not	O
applicable	O
,	O
either	O
of	O
which	O
are	O
often	O
associated	O
with	O
the	O
concept	O
of	O
NULL	B-Language
)	O
.	O
</s>
<s>
Data	O
are	O
operated	O
upon	O
by	O
means	O
of	O
a	O
relational	B-Application
calculus	I-Application
or	O
relational	B-Algorithm
algebra	I-Algorithm
,	O
these	O
being	O
equivalent	O
in	O
expressive	B-Language
power	I-Language
.	O
</s>
<s>
The	O
relational	B-Architecture
model	I-Architecture
of	O
data	O
permits	O
the	O
database	O
designer	O
to	O
create	O
a	O
consistent	O
,	O
logical	O
representation	O
of	O
information	O
.	O
</s>
<s>
Consistency	O
is	O
achieved	O
by	O
including	O
declared	O
constraints	O
in	O
the	O
database	B-General_Concept
design	I-General_Concept
,	O
which	O
is	O
usually	O
referred	O
to	O
as	O
the	O
logical	B-Application
schema	I-Application
.	O
</s>
<s>
The	O
theory	O
includes	O
a	O
process	O
of	O
database	B-Application
normalization	I-Application
whereby	O
a	O
design	O
with	O
certain	O
desirable	O
properties	O
can	O
be	O
selected	O
from	O
a	O
set	O
of	O
logically	O
equivalent	O
alternatives	O
.	O
</s>
<s>
The	O
access	B-Language
plans	I-Language
and	O
other	O
implementation	O
and	O
operation	O
details	O
are	O
handled	O
by	O
the	O
DBMS	B-General_Concept
engine	O
,	O
and	O
are	O
not	O
reflected	O
in	O
the	O
logical	O
model	O
.	O
</s>
<s>
This	O
contrasts	O
with	O
common	O
practice	O
for	O
SQL	B-Language
DBMSs	O
in	O
which	O
performance	B-Device
tuning	I-Device
often	O
requires	O
changes	O
to	O
the	O
logical	O
model	O
.	O
</s>
<s>
The	O
basic	O
relational	O
building	O
block	O
is	O
the	O
domain	B-Application
or	O
data	B-Application
type	I-Application
,	O
usually	O
abbreviated	O
nowadays	O
to	O
type	O
.	O
</s>
<s>
A	O
tuple	B-Application
is	O
an	O
unordered	O
set	O
of	O
attribute	B-Application
values	O
.	O
</s>
<s>
An	O
attribute	B-Application
is	O
an	O
unordered	O
pair	O
of	O
attribute	B-Application
name	O
and	O
type	O
name	O
.	O
</s>
<s>
An	O
attribute	B-Application
value	O
is	O
a	O
specific	O
valid	O
value	O
for	O
the	O
type	O
of	O
the	O
attribute	B-Application
.	O
</s>
<s>
A	O
relation	B-Algorithm
consists	O
of	O
a	O
heading	O
and	O
a	O
body	O
.	O
</s>
<s>
A	O
body	O
(	O
of	O
an	O
n-ary	O
relation	B-Algorithm
)	O
is	O
a	O
set	O
of	O
n-tuples	O
.	O
</s>
<s>
The	O
heading	O
of	O
the	O
relation	B-Algorithm
is	O
also	O
the	O
heading	O
of	O
each	O
of	O
its	O
tuples	B-Application
.	O
</s>
<s>
A	O
relation	B-Algorithm
is	O
defined	O
as	O
a	O
set	O
of	O
n-tuples	O
.	O
</s>
<s>
In	O
both	O
mathematics	O
and	O
the	O
relational	B-Architecture
database	I-Architecture
model	I-Architecture
,	O
a	O
set	O
is	O
an	O
unordered	O
collection	O
of	O
unique	O
,	O
non-duplicated	O
items	O
,	O
although	O
some	O
DBMSs	O
impose	O
an	O
order	O
to	O
their	O
data	O
.	O
</s>
<s>
In	O
mathematics	O
,	O
a	O
tuple	B-Application
has	O
an	O
order	O
,	O
and	O
allows	O
for	O
duplication	O
.	O
</s>
<s>
E.F.	O
Codd	O
originally	O
defined	O
tuples	B-Application
using	O
this	O
mathematical	O
definition	O
.	O
</s>
<s>
Later	O
,	O
it	O
was	O
one	O
of	O
E.F.	O
Codd	O
's	O
great	O
insights	O
that	O
using	O
attribute	B-Application
names	O
instead	O
of	O
an	O
ordering	O
would	O
be	O
more	O
convenient	O
(	O
in	O
general	O
)	O
in	O
a	O
computer	O
language	O
based	O
on	O
relations	O
.	O
</s>
<s>
Though	O
the	O
concept	O
has	O
changed	O
,	O
the	O
name	O
"	O
tuple	B-Application
"	O
has	O
not	O
.	O
</s>
<s>
An	O
immediate	O
and	O
important	O
consequence	O
of	O
this	O
distinguishing	O
feature	O
is	O
that	O
in	O
the	O
relational	B-Architecture
model	I-Architecture
the	O
Cartesian	O
product	O
becomes	O
commutative	O
.	O
</s>
<s>
A	O
table	B-Application
is	O
an	O
accepted	O
visual	O
representation	O
of	O
a	O
relation	B-Algorithm
;	O
a	O
tuple	B-Application
is	O
similar	O
to	O
the	O
concept	O
of	O
a	O
row	B-Application
.	O
</s>
<s>
A	O
relvar	B-Application
is	O
a	O
named	O
variable	O
of	O
some	O
specific	O
relation	B-Algorithm
type	O
,	O
to	O
which	O
at	O
all	O
times	O
some	O
relation	B-Algorithm
of	O
that	O
type	O
is	O
assigned	O
,	O
though	O
the	O
relation	B-Algorithm
may	O
contain	O
zero	O
tuples	B-Application
.	O
</s>
<s>
The	O
basic	O
principle	O
of	O
the	O
relational	B-Architecture
model	I-Architecture
is	O
the	O
Information	B-Application
Principle	I-Application
:	O
all	O
information	O
is	O
represented	O
by	O
data	O
values	O
in	O
relations	O
.	O
</s>
<s>
In	O
accordance	O
with	O
this	O
Principle	O
,	O
a	O
relational	B-Application
database	I-Application
is	O
a	O
set	O
of	O
relvars	B-Application
and	O
the	O
result	O
of	O
every	O
query	B-Library
is	O
presented	O
as	O
a	O
relation	B-Algorithm
.	O
</s>
<s>
The	O
consistency	O
of	O
a	O
relational	B-Application
database	I-Application
is	O
enforced	O
,	O
not	O
by	O
rules	O
built	O
into	O
the	O
applications	O
that	O
use	O
it	O
,	O
but	O
rather	O
by	O
constraints	O
,	O
declared	O
as	O
part	O
of	O
the	O
logical	B-Application
schema	I-Application
and	O
enforced	O
by	O
the	O
DBMS	B-General_Concept
for	O
all	O
applications	O
.	O
</s>
<s>
In	O
practice	O
,	O
several	O
useful	O
shorthands	O
are	O
expected	O
to	O
be	O
available	O
,	O
of	O
which	O
the	O
most	O
important	O
are	O
candidate	B-Application
key	I-Application
(	O
really	O
,	O
superkey	B-Application
)	O
and	O
foreign	B-Application
key	I-Application
constraints	I-Application
.	O
</s>
<s>
To	O
fully	O
appreciate	O
the	O
relational	B-Architecture
model	I-Architecture
of	O
data	O
it	O
is	O
essential	O
to	O
understand	O
the	O
intended	O
interpretation	O
of	O
a	O
relation	B-Algorithm
.	O
</s>
<s>
The	O
body	O
of	O
a	O
relation	B-Algorithm
is	O
sometimes	O
called	O
its	O
extension	O
.	O
</s>
<s>
This	O
is	O
because	O
it	O
is	O
to	O
be	O
interpreted	O
as	O
a	O
representation	O
of	O
the	O
extension	O
of	O
some	O
predicate	B-Algorithm
,	O
this	O
being	O
the	O
set	O
of	O
true	O
propositions	O
that	O
can	O
be	O
formed	O
by	O
replacing	O
each	O
free	O
variable	O
in	O
that	O
predicate	B-Algorithm
by	O
a	O
name	O
(	O
a	O
term	O
that	O
designates	O
something	O
)	O
.	O
</s>
<s>
There	O
is	O
a	O
one-to-one	B-Algorithm
correspondence	I-Algorithm
between	O
the	O
free	O
variables	O
of	O
the	O
predicate	B-Algorithm
and	O
the	O
attribute	B-Application
names	O
of	O
the	O
relation	B-Algorithm
heading	O
.	O
</s>
<s>
Each	O
tuple	B-Application
of	O
the	O
relation	B-Algorithm
body	O
provides	O
attribute	B-Application
values	O
to	O
instantiate	O
the	O
predicate	B-Algorithm
by	O
substituting	O
each	O
of	O
its	O
free	O
variables	O
.	O
</s>
<s>
The	O
result	O
is	O
a	O
proposition	O
that	O
is	O
deemed	O
,	O
on	O
account	O
of	O
the	O
appearance	O
of	O
the	O
tuple	B-Application
in	O
the	O
relation	B-Algorithm
body	O
,	O
to	O
be	O
true	O
.	O
</s>
<s>
Contrariwise	O
,	O
every	O
tuple	B-Application
whose	O
heading	O
conforms	O
to	O
that	O
of	O
the	O
relation	B-Algorithm
,	O
but	O
which	O
does	O
not	O
appear	O
in	O
the	O
body	O
is	O
deemed	O
to	O
be	O
false	O
.	O
</s>
<s>
This	O
assumption	O
is	O
known	O
as	O
the	O
closed	B-Application
world	I-Application
assumption	I-Application
:	O
it	O
is	O
often	O
violated	O
in	O
practical	O
databases	B-Application
,	O
where	O
the	O
absence	O
of	O
a	O
tuple	B-Application
might	O
mean	O
that	O
the	O
truth	O
of	O
the	O
corresponding	O
proposition	O
is	O
unknown	O
.	O
</s>
<s>
For	O
example	O
,	O
the	O
absence	O
of	O
the	O
tuple	B-Application
( 	O
 '	O
John	O
 '	O
,	O
'	O
Spanish	O
 '	O
)	O
from	O
a	O
table	B-Application
of	O
language	O
skills	O
cannot	O
necessarily	O
be	O
taken	O
as	O
evidence	O
that	O
John	O
does	O
not	O
speak	O
Spanish	O
.	O
</s>
<s>
A	O
data	B-Application
type	I-Application
as	O
used	O
in	O
a	O
typical	O
relational	B-Application
database	I-Application
might	O
be	O
the	O
set	O
of	O
integers	O
,	O
the	O
set	O
of	O
character	O
strings	O
,	O
the	O
set	O
of	O
dates	O
,	O
or	O
the	O
two	O
boolean	O
values	O
true	O
and	O
false	O
,	O
and	O
so	O
on	O
.	O
</s>
<s>
Attribute	B-Application
is	O
the	O
term	O
used	O
in	O
the	O
theory	O
for	O
what	O
is	O
commonly	O
referred	O
to	O
as	O
a	O
column	O
.	O
</s>
<s>
Similarly	O
,	O
table	B-Application
is	O
commonly	O
used	O
in	O
place	O
of	O
the	O
theoretical	O
term	O
relation	B-Algorithm
(	O
though	O
in	O
SQL	B-Language
the	O
term	O
is	O
by	O
no	O
means	O
synonymous	O
with	O
relation	B-Algorithm
)	O
.	O
</s>
<s>
A	O
table	B-Application
data	O
structure	O
is	O
specified	O
as	O
a	O
list	O
of	O
column	O
definitions	O
,	O
each	O
of	O
which	O
specifies	O
a	O
unique	O
column	O
name	O
and	O
the	O
type	O
of	O
the	O
values	O
that	O
are	O
permitted	O
for	O
that	O
column	O
.	O
</s>
<s>
An	O
attribute	B-Application
value	O
is	O
the	O
entry	O
in	O
a	O
specific	O
column	O
and	O
row	B-Application
,	O
such	O
as	O
"	O
John	O
Doe	O
"	O
or	O
"	O
35	O
"	O
.	O
</s>
<s>
A	O
tuple	B-Application
is	O
basically	O
the	O
same	O
thing	O
as	O
a	O
row	B-Application
,	O
except	O
in	O
an	O
SQL	B-Language
DBMS	B-General_Concept
,	O
where	O
the	O
column	O
values	O
in	O
a	O
row	B-Application
are	O
ordered	O
.	O
</s>
<s>
(	O
Tuples	B-Application
are	O
not	O
ordered	O
;	O
instead	O
,	O
each	O
attribute	B-Application
value	O
is	O
identified	O
solely	O
by	O
the	O
attribute	B-Application
name	O
and	O
never	O
by	O
its	O
ordinal	O
position	O
within	O
the	O
tuple	B-Application
.	O
)	O
</s>
<s>
An	O
attribute	B-Application
name	O
might	O
be	O
"	O
name	O
"	O
or	O
"	O
age	O
"	O
.	O
</s>
<s>
A	O
relation	B-Algorithm
is	O
a	O
table	B-Application
structure	O
definition	O
(	O
a	O
set	O
of	O
column	O
definitions	O
)	O
along	O
with	O
the	O
data	O
appearing	O
in	O
that	O
structure	O
.	O
</s>
<s>
A	O
database	O
relvar	B-Application
(	O
relation	B-Application
variable	I-Application
)	O
is	O
commonly	O
known	O
as	O
a	O
base	O
table	B-Application
.	O
</s>
<s>
The	O
heading	O
of	O
its	O
assigned	O
value	O
at	O
any	O
time	O
is	O
as	O
specified	O
in	O
the	O
table	B-Application
declaration	O
and	O
its	O
body	O
is	O
that	O
most	O
recently	O
assigned	O
to	O
it	O
by	O
invoking	O
some	O
update	O
operator	O
(	O
typically	O
,	O
INSERT	O
,	O
UPDATE	O
,	O
or	O
DELETE	O
)	O
.	O
</s>
<s>
The	O
heading	O
and	O
body	O
of	O
the	O
table	B-Application
resulting	O
from	O
evaluation	O
of	O
some	O
query	B-Library
are	O
determined	O
by	O
the	O
definitions	O
of	O
the	O
operators	O
used	O
in	O
the	O
expression	O
of	O
that	O
query	B-Library
.	O
</s>
<s>
(	O
Note	O
that	O
in	O
SQL	B-Language
the	O
heading	O
is	O
not	O
always	O
a	O
set	O
of	O
column	O
definitions	O
as	O
described	O
above	O
,	O
because	O
it	O
is	O
possible	O
for	O
a	O
column	O
to	O
have	O
no	O
name	O
and	O
also	O
for	O
two	O
or	O
more	O
columns	O
to	O
have	O
the	O
same	O
name	O
.	O
</s>
<s>
Also	O
,	O
the	O
body	O
is	O
not	O
always	O
a	O
set	O
of	O
rows	O
because	O
in	O
SQL	B-Language
it	O
is	O
possible	O
for	O
the	O
same	O
row	B-Application
to	O
appear	O
more	O
than	O
once	O
in	O
the	O
same	O
body	O
.	O
)	O
</s>
<s>
SQL	B-Language
,	O
initially	O
pushed	O
as	O
the	O
standard	O
language	O
for	O
relational	B-Application
databases	I-Application
,	O
deviates	O
from	O
the	O
relational	B-Architecture
model	I-Architecture
in	O
several	O
places	O
.	O
</s>
<s>
The	O
current	O
ISO	O
SQL	B-Language
standard	O
does	O
n't	O
mention	O
the	O
relational	B-Architecture
model	I-Architecture
or	O
use	O
relational	O
terms	O
or	O
concepts	O
.	O
</s>
<s>
However	O
,	O
it	O
is	O
possible	O
to	O
create	O
a	O
database	O
conforming	O
to	O
the	O
relational	B-Architecture
model	I-Architecture
using	O
SQL	B-Language
if	O
one	O
does	O
not	O
use	O
certain	O
SQL	B-Language
features	O
.	O
</s>
<s>
The	O
following	O
deviations	O
from	O
the	O
relational	B-Architecture
model	I-Architecture
have	O
been	O
noted	O
in	O
SQL	B-Language
.	O
</s>
<s>
Note	O
that	O
few	O
database	O
servers	O
implement	O
the	O
entire	O
SQL	B-Language
standard	O
and	O
in	O
particular	O
do	O
not	O
allow	O
some	O
of	O
these	O
deviations	O
.	O
</s>
<s>
Whereas	O
NULL	B-Language
is	O
ubiquitous	O
,	O
for	O
example	O
,	O
allowing	O
duplicate	O
column	O
names	O
within	O
a	O
table	B-Application
or	O
anonymous	O
columns	O
is	O
uncommon	O
.	O
</s>
<s>
The	O
same	O
row	B-Application
can	O
appear	O
more	O
than	O
once	O
in	O
an	O
SQL	B-Application
table	I-Application
.	O
</s>
<s>
The	O
same	O
tuple	B-Application
cannot	O
appear	O
more	O
than	O
once	O
in	O
a	O
relation	B-Algorithm
.	O
</s>
<s>
A	O
column	O
in	O
an	O
SQL	B-Application
table	I-Application
can	O
be	O
unnamed	O
and	O
thus	O
unable	O
to	O
be	O
referenced	O
in	O
expressions	O
.	O
</s>
<s>
The	O
relational	B-Architecture
model	I-Architecture
requires	O
every	O
attribute	B-Application
to	O
be	O
named	O
and	O
referenceable	O
.	O
</s>
<s>
Two	O
or	O
more	O
columns	O
of	O
the	O
same	O
SQL	B-Application
table	I-Application
can	O
have	O
the	O
same	O
name	O
and	O
therefore	O
cannot	O
be	O
referenced	O
,	O
on	O
account	O
of	O
the	O
obvious	O
ambiguity	O
.	O
</s>
<s>
The	O
relational	B-Architecture
model	I-Architecture
requires	O
every	O
attribute	B-Application
to	O
be	O
referenceable	O
.	O
</s>
<s>
The	O
order	O
of	O
columns	O
in	O
an	O
SQL	B-Application
table	I-Application
is	O
defined	O
and	O
significant	O
,	O
one	O
consequence	O
being	O
that	O
SQL	B-Language
's	O
implementations	O
of	O
Cartesian	O
product	O
and	O
union	O
are	O
both	O
noncommutative	O
.	O
</s>
<s>
The	O
relational	B-Architecture
model	I-Architecture
requires	O
there	O
to	O
be	O
no	O
significance	O
to	O
any	O
ordering	O
of	O
the	O
attributes	O
of	O
a	O
relation	B-Algorithm
.	O
</s>
<s>
Updates	O
to	O
a	O
view	B-Language
defined	O
without	O
CHECK	O
OPTION	O
can	O
be	O
accepted	O
but	O
the	O
resulting	O
update	O
to	O
the	O
database	O
does	O
not	O
necessarily	O
have	O
the	O
expressed	O
effect	O
on	O
its	O
target	O
.	O
</s>
<s>
For	O
example	O
,	O
an	O
invocation	O
of	O
INSERT	O
can	O
be	O
accepted	O
but	O
the	O
inserted	O
rows	O
might	O
not	O
all	O
appear	O
in	O
the	O
view	B-Language
,	O
or	O
an	O
invocation	O
of	O
UPDATE	O
can	O
result	O
in	O
rows	O
disappearing	O
from	O
the	O
view	B-Language
.	O
</s>
<s>
The	O
relational	B-Architecture
model	I-Architecture
requires	O
updates	O
to	O
a	O
view	B-Language
to	O
have	O
the	O
same	O
effect	O
as	O
if	O
the	O
view	B-Language
were	O
a	O
base	O
relvar	B-Application
.	O
</s>
<s>
SQL	B-Language
requires	O
every	O
table	B-Application
to	O
have	O
at	O
least	O
one	O
column	O
,	O
but	O
there	O
are	O
two	O
relations	O
of	O
degree	O
zero	O
(	O
of	O
cardinality	B-Language
one	O
and	O
zero	O
)	O
and	O
they	O
are	O
needed	O
to	O
represent	O
extensions	O
of	O
predicates	B-Algorithm
that	O
contain	O
no	O
free	O
variables	O
.	O
</s>
<s>
This	O
special	O
mark	O
can	O
appear	O
instead	O
of	O
a	O
value	O
wherever	O
a	O
value	O
can	O
appear	O
in	O
SQL	B-Language
,	O
in	O
particular	O
in	O
place	O
of	O
a	O
column	O
value	O
in	O
some	O
row	B-Application
.	O
</s>
<s>
The	O
deviation	O
from	O
the	O
relational	B-Architecture
model	I-Architecture
arises	O
from	O
the	O
fact	O
that	O
the	O
implementation	O
of	O
this	O
ad	O
hoc	O
concept	O
in	O
SQL	B-Language
involves	O
the	O
use	O
of	O
three-valued	B-Language
logic	I-Language
,	O
under	O
which	O
the	O
comparison	O
of	O
NULL	B-Language
with	O
itself	O
does	O
not	O
yield	O
true	O
but	O
instead	O
yields	O
the	O
third	O
truth	O
value	O
,	O
unknown	O
;	O
similarly	O
the	O
comparison	O
NULL	B-Language
with	O
something	O
other	O
than	O
itself	O
does	O
not	O
yield	O
false	O
but	O
instead	O
yields	O
unknown	O
.	O
</s>
<s>
It	O
is	O
because	O
of	O
this	O
behavior	O
in	O
comparisons	O
that	O
NULL	B-Language
is	O
described	O
as	O
a	O
mark	O
rather	O
than	O
a	O
value	O
.	O
</s>
<s>
The	O
relational	B-Architecture
model	I-Architecture
depends	O
on	O
the	O
law	O
of	O
excluded	O
middle	O
under	O
which	O
anything	O
that	O
is	O
not	O
true	O
is	O
false	O
and	O
anything	O
that	O
is	O
not	O
false	O
is	O
true	O
;	O
it	O
also	O
requires	O
every	O
tuple	B-Application
in	O
a	O
relation	B-Algorithm
body	O
to	O
have	O
a	O
value	O
for	O
every	O
attribute	B-Application
of	O
that	O
relation	B-Algorithm
.	O
</s>
<s>
SQL	B-Language
itself	O
uses	O
NULL	B-Language
for	O
several	O
purposes	O
other	O
than	O
to	O
represent	O
"	O
value	O
unknown	O
"	O
.	O
</s>
<s>
For	O
example	O
,	O
the	O
sum	O
of	O
the	O
empty	O
set	O
is	O
NULL	B-Language
,	O
meaning	O
zero	O
,	O
the	O
average	O
of	O
the	O
empty	O
set	O
is	O
NULL	B-Language
,	O
meaning	O
undefined	O
,	O
and	O
NULL	B-Language
appearing	O
in	O
the	O
result	O
of	O
a	O
LEFT	O
JOIN	B-Language
can	O
mean	O
"	O
no	O
value	O
because	O
there	O
is	O
no	O
matching	O
row	B-Application
in	O
the	O
right-hand	O
operand	O
"	O
.	O
</s>
<s>
There	O
are	O
ways	O
to	O
design	O
tables	O
to	O
avoid	O
the	O
need	O
for	O
NULL	B-Language
,	O
typically	O
what	O
may	O
be	O
considered	O
or	O
resemble	O
high	O
degrees	O
of	O
database	B-Application
normalization	I-Application
,	O
but	O
many	O
find	O
such	O
impractical	O
.	O
</s>
<s>
Users	O
(	O
or	O
programs	O
)	O
request	O
data	O
from	O
a	O
relational	B-Application
database	I-Application
by	O
sending	O
it	O
a	O
query	B-Library
that	O
is	O
written	O
in	O
a	O
special	O
language	O
,	O
usually	O
a	O
dialect	O
of	O
SQL	B-Language
.	O
</s>
<s>
Although	O
SQL	B-Language
was	O
originally	O
intended	O
for	O
end-users	O
,	O
it	O
is	O
much	O
more	O
common	O
for	O
SQL	B-Language
queries	B-Library
to	O
be	O
embedded	O
into	O
software	O
that	O
provides	O
an	O
easier	O
user	O
interface	O
.	O
</s>
<s>
Many	O
Web	O
sites	O
,	O
such	O
as	O
Wikipedia	O
,	O
perform	O
SQL	B-Language
queries	B-Library
when	O
generating	O
pages	O
.	O
</s>
<s>
In	O
response	O
to	O
a	O
query	B-Library
,	O
the	O
database	O
returns	O
a	O
result	O
set	O
,	O
which	O
is	O
just	O
a	O
list	O
of	O
rows	O
containing	O
the	O
answers	O
.	O
</s>
<s>
The	O
simplest	O
query	B-Library
is	O
just	O
to	O
return	O
all	O
the	O
rows	O
from	O
a	O
table	B-Application
,	O
but	O
more	O
often	O
,	O
the	O
rows	O
are	O
filtered	O
in	O
some	O
way	O
to	O
return	O
just	O
the	O
answer	O
wanted	O
.	O
</s>
<s>
Often	O
,	O
data	O
from	O
multiple	O
tables	O
are	O
combined	O
into	O
one	O
,	O
by	O
doing	O
a	O
join	B-Language
.	O
</s>
<s>
In	O
practice	O
,	O
relational	B-Application
database	I-Application
management	I-Application
systems	I-Application
rewrite	O
(	O
"	O
optimize	B-Language
"	O
)	O
queries	B-Library
to	O
perform	O
faster	O
,	O
using	O
a	O
variety	O
of	O
techniques	O
.	O
</s>
<s>
There	O
are	O
a	O
number	O
of	O
relational	O
operations	O
in	O
addition	O
to	O
join	B-Language
.	O
</s>
<s>
These	O
include	O
project	O
(	O
the	O
process	O
of	O
eliminating	O
some	O
of	O
the	O
columns	O
)	O
,	O
restrict	O
(	O
the	O
process	O
of	O
eliminating	O
some	O
of	O
the	O
rows	O
)	O
,	O
union	O
(	O
a	O
way	O
of	O
combining	O
two	O
tables	O
with	O
similar	O
structures	O
)	O
,	O
difference	O
(	O
that	O
lists	O
the	O
rows	O
in	O
one	O
table	B-Application
that	O
are	O
not	O
found	O
in	O
the	O
other	O
)	O
,	O
intersect	O
(	O
that	O
lists	O
the	O
rows	O
found	O
in	O
both	O
tables	O
)	O
,	O
and	O
product	O
(	O
mentioned	O
above	O
,	O
which	O
combines	O
each	O
row	B-Application
of	O
one	O
table	B-Application
with	O
each	O
row	B-Application
of	O
the	O
other	O
)	O
.	O
</s>
<s>
These	O
include	O
semi-join	O
,	O
outer	O
operators	O
such	O
as	O
outer	O
join	B-Language
and	O
outer	O
union	O
,	O
and	O
various	O
forms	O
of	O
division	O
.	O
</s>
<s>
Then	O
there	O
are	O
operators	O
to	O
rename	O
columns	O
,	O
and	O
summarizing	O
or	O
aggregating	O
operators	O
,	O
and	O
if	O
you	O
permit	O
relation	B-Algorithm
values	O
as	O
attributes	O
(	O
relation-valued	B-Application
attribute	I-Application
)	O
,	O
then	O
operators	O
such	O
as	O
group	O
and	O
ungroup	O
.	O
</s>
<s>
The	O
SELECT	O
statement	O
in	O
SQL	B-Language
serves	O
to	O
handle	O
all	O
of	O
these	O
except	O
for	O
the	O
group	O
and	O
ungroup	O
operators	O
.	O
</s>
<s>
The	O
flexibility	O
of	O
relational	B-Application
databases	I-Application
allows	O
programmers	O
to	O
write	O
queries	B-Library
that	O
were	O
not	O
anticipated	O
by	O
the	O
database	O
designers	O
.	O
</s>
<s>
As	O
a	O
result	O
,	O
relational	B-Application
databases	I-Application
can	O
be	O
used	O
by	O
multiple	O
applications	O
in	O
ways	O
the	O
original	O
designers	O
did	O
not	O
foresee	O
,	O
which	O
is	O
especially	O
important	O
for	O
databases	B-Application
that	O
might	O
be	O
used	O
for	O
a	O
long	O
time	O
(	O
perhaps	O
several	O
decades	O
)	O
.	O
</s>
<s>
This	O
has	O
made	O
the	O
idea	O
and	O
implementation	O
of	O
relational	B-Application
databases	I-Application
very	O
popular	O
with	O
businesses	O
.	O
</s>
<s>
A	O
database	O
that	O
is	O
in	O
the	O
first	O
normal	B-Application
form	I-Application
is	O
vulnerable	O
to	O
all	O
types	O
of	O
anomalies	O
,	O
while	O
a	O
database	O
that	O
is	O
in	O
the	O
domain/key	O
normal	B-Application
form	I-Application
has	O
no	O
modification	O
anomalies	O
.	O
</s>
<s>
Normal	B-Application
forms	I-Application
are	O
hierarchical	O
in	O
nature	O
.	O
</s>
<s>
That	O
is	O
,	O
the	O
lowest	O
level	O
is	O
the	O
first	O
normal	B-Application
form	I-Application
,	O
and	O
the	O
database	O
cannot	O
meet	O
the	O
requirements	O
for	O
higher	O
level	O
normal	B-Application
forms	I-Application
without	O
first	O
having	O
met	O
all	O
the	O
requirements	O
of	O
the	O
lesser	O
normal	B-Application
forms	I-Application
.	O
</s>
<s>
An	O
idealized	O
,	O
very	O
simple	O
example	O
of	O
a	O
description	O
of	O
some	O
relvars	B-Application
(	O
relation	B-Application
variables	I-Application
)	O
and	O
their	O
attributes	O
:	O
</s>
<s>
In	O
this	O
design	O
we	O
have	O
six	O
relvars	B-Application
:	O
Customer	O
,	O
Order	O
,	O
Order	O
Line	O
,	O
Invoice	O
,	O
Invoice	O
Line	O
and	O
Product	O
.	O
</s>
<s>
The	O
bold	O
,	O
underlined	O
attributes	O
are	O
candidate	B-Application
keys	I-Application
.	O
</s>
<s>
The	O
non-bold	O
,	O
underlined	O
attributes	O
are	O
foreign	B-Application
keys	I-Application
.	O
</s>
<s>
Usually	O
one	O
candidate	B-Application
key	I-Application
is	O
chosen	O
to	O
be	O
called	O
the	O
primary	B-Application
key	I-Application
and	O
used	O
in	O
preference	O
over	O
the	O
other	O
candidate	B-Application
keys	I-Application
,	O
which	O
are	O
then	O
called	O
alternate	B-Application
keys	I-Application
.	O
</s>
<s>
A	O
candidate	B-Application
key	I-Application
is	O
a	O
unique	O
identifier	O
enforcing	O
that	O
no	O
tuple	B-Application
will	O
be	O
duplicated	O
;	O
this	O
would	O
make	O
the	O
relation	B-Algorithm
into	O
something	O
else	O
,	O
namely	O
a	O
bag	O
,	O
by	O
violating	O
the	O
basic	O
definition	O
of	O
a	O
set	O
.	O
</s>
<s>
Both	O
foreign	B-Application
keys	I-Application
and	O
superkeys	B-Application
(	O
that	O
includes	O
candidate	B-Application
keys	I-Application
)	O
can	O
be	O
composite	O
,	O
that	O
is	O
,	O
can	O
be	O
composed	O
of	O
several	O
attributes	O
.	O
</s>
<s>
Below	O
is	O
a	O
tabular	O
depiction	O
of	O
a	O
relation	B-Algorithm
of	O
our	O
example	O
Customer	O
relvar	B-Application
;	O
a	O
relation	B-Algorithm
can	O
be	O
thought	O
of	O
as	O
a	O
value	O
that	O
can	O
be	O
attributed	O
to	O
a	O
relvar	B-Application
.	O
</s>
<s>
If	O
we	O
attempted	O
to	O
insert	O
a	O
new	O
customer	O
with	O
the	O
ID	O
1234567890	O
,	O
this	O
would	O
violate	O
the	O
design	O
of	O
the	O
relvar	B-Application
since	O
Customer	O
ID	O
is	O
a	O
primary	B-Application
key	I-Application
and	O
we	O
already	O
have	O
a	O
customer	O
1234567890	O
.	O
</s>
<s>
The	O
DBMS	B-General_Concept
must	O
reject	O
a	O
transaction	B-General_Concept
such	O
as	O
this	O
that	O
would	O
render	O
the	O
database	O
inconsistent	O
by	O
a	O
violation	O
of	O
an	O
integrity	O
constraint	O
.	O
</s>
<s>
Foreign	B-Application
keys	I-Application
are	O
integrity	O
constraints	O
enforcing	O
that	O
the	O
value	O
of	O
the	O
attribute	B-Application
set	O
is	O
drawn	O
from	O
a	O
candidate	B-Application
key	I-Application
in	O
another	O
relation	B-Algorithm
.	O
</s>
<s>
For	O
example	O
,	O
in	O
the	O
Order	O
relation	B-Algorithm
the	O
attribute	B-Application
Customer	O
ID	O
is	O
a	O
foreign	B-Application
key	I-Application
.	O
</s>
<s>
A	O
join	B-Language
is	O
the	O
operation	O
that	O
draws	O
on	O
information	O
from	O
several	O
relations	O
at	O
once	O
.	O
</s>
<s>
By	O
joining	O
relvars	B-Application
from	O
the	O
example	O
above	O
we	O
could	O
query	B-Library
the	O
database	O
for	O
all	O
of	O
the	O
Customers	O
,	O
Orders	O
,	O
and	O
Invoices	O
.	O
</s>
<s>
If	O
we	O
only	O
wanted	O
the	O
tuples	B-Application
for	O
a	O
specific	O
customer	O
,	O
we	O
would	O
specify	O
this	O
using	O
a	O
restriction	O
condition	O
.	O
</s>
<s>
If	O
we	O
wanted	O
to	O
retrieve	O
all	O
of	O
the	O
Orders	O
for	O
Customer	O
1234567890	O
,	O
we	O
could	O
query	B-Library
the	O
database	O
to	O
return	O
every	O
row	B-Application
in	O
the	O
Order	O
table	B-Application
with	O
Customer	O
ID	O
1234567890	O
and	O
join	B-Language
the	O
Order	O
table	B-Application
to	O
the	O
Order	O
Line	O
table	B-Application
based	O
on	O
Order	O
No	O
.	O
</s>
<s>
There	O
is	O
a	O
flaw	O
in	O
our	O
database	B-General_Concept
design	I-General_Concept
above	O
.	O
</s>
<s>
The	O
Invoice	O
relvar	B-Application
contains	O
an	O
Order	O
No	O
attribute	B-Application
.	O
</s>
<s>
So	O
,	O
each	O
tuple	B-Application
in	O
the	O
Invoice	O
relvar	B-Application
will	O
have	O
one	O
Order	O
No	O
,	O
which	O
implies	O
that	O
there	O
is	O
precisely	O
one	O
Order	O
for	O
each	O
Invoice	O
.	O
</s>
<s>
Additionally	O
the	O
Order	O
relvar	B-Application
contains	O
an	O
Invoice	O
No	O
attribute	B-Application
,	O
implying	O
that	O
each	O
Order	O
has	O
a	O
corresponding	O
Invoice	O
.	O
</s>
<s>
This	O
is	O
a	O
many-to-many	B-Application
relationship	O
between	O
Order	O
and	O
Invoice	O
(	O
also	O
called	O
a	O
non-specific	O
relationship	O
)	O
.	O
</s>
<s>
To	O
represent	O
this	O
relationship	O
in	O
the	O
database	O
a	O
new	O
relvar	B-Application
should	O
be	O
introduced	O
whose	O
role	O
is	O
to	O
specify	O
the	O
correspondence	O
between	O
Orders	O
and	O
Invoices	O
:	O
</s>
<s>
Now	O
,	O
the	O
Order	O
relvar	B-Application
has	O
a	O
one-to-many	B-Application
relationship	I-Application
to	O
the	O
OrderInvoice	O
table	B-Application
,	O
as	O
does	O
the	O
Invoice	O
relvar	B-Application
.	O
</s>
<s>
If	O
we	O
want	O
to	O
retrieve	O
every	O
Invoice	O
for	O
a	O
particular	O
Order	O
,	O
we	O
can	O
query	B-Library
for	O
all	O
orders	O
where	O
Order	O
No	O
in	O
the	O
Order	O
relation	B-Algorithm
equals	O
the	O
Order	O
No	O
in	O
OrderInvoice	O
,	O
and	O
where	O
Invoice	O
No	O
in	O
OrderInvoice	O
equals	O
the	O
Invoice	O
No	O
in	O
Invoice	O
.	O
</s>
<s>
Basic	O
notions	O
in	O
the	O
relational	B-Architecture
model	I-Architecture
are	O
relation	B-Algorithm
names	O
and	O
attribute	B-Application
names	O
.	O
</s>
<s>
Our	O
first	O
definition	O
concerns	O
the	O
notion	O
of	O
tuple	B-Application
,	O
which	O
formalizes	O
the	O
notion	O
of	O
row	B-Application
or	O
record	O
in	O
a	O
table	B-Application
:	O
</s>
<s>
A	O
tuple	B-Application
is	O
a	O
partial	B-Algorithm
function	I-Algorithm
from	O
attribute	B-Application
names	O
to	O
atomic	O
values	O
.	O
</s>
<s>
A	O
header	O
is	O
a	O
finite	O
set	O
of	O
attribute	B-Application
names	O
.	O
</s>
<s>
The	O
projection	B-Algorithm
of	O
a	O
tuple	B-Application
on	O
a	O
finite	O
set	O
of	O
attributes	O
is	O
.	O
</s>
<s>
The	O
next	O
definition	O
defines	O
relation	B-Algorithm
that	O
formalizes	O
the	O
contents	O
of	O
a	O
table	B-Application
as	O
it	O
is	O
defined	O
in	O
the	O
relational	B-Architecture
model	I-Architecture
.	O
</s>
<s>
A	O
relation	B-Algorithm
is	O
a	O
tuple	B-Application
with	O
,	O
the	O
header	O
,	O
and	O
,	O
the	O
body	O
,	O
a	O
set	O
of	O
tuples	B-Application
that	O
all	O
have	O
the	O
domain	B-Application
.	O
</s>
<s>
Such	O
a	O
relation	B-Algorithm
closely	O
corresponds	O
to	O
what	O
is	O
usually	O
called	O
the	O
extension	O
of	O
a	O
predicate	B-Algorithm
in	O
first-order	O
logic	O
except	O
that	O
here	O
we	O
identify	O
the	O
places	O
in	O
the	O
predicate	B-Algorithm
with	O
attribute	B-Application
names	O
.	O
</s>
<s>
Usually	O
in	O
the	O
relational	B-Architecture
model	I-Architecture
a	O
database	B-Application
schema	I-Application
is	O
said	O
to	O
consist	O
of	O
a	O
set	O
of	O
relation	B-Algorithm
names	O
,	O
the	O
headers	O
that	O
are	O
associated	O
with	O
these	O
names	O
and	O
the	O
constraints	O
that	O
should	O
hold	O
for	O
every	O
instance	O
of	O
the	O
database	B-Application
schema	I-Application
.	O
</s>
<s>
A	O
relation	B-Algorithm
universe	O
over	O
a	O
header	O
is	O
a	O
non-empty	O
set	O
of	O
relations	O
with	O
header	O
.	O
</s>
<s>
A	O
relation	B-Language
schema	I-Language
consists	O
of	O
a	O
header	O
and	O
a	O
predicate	B-Algorithm
that	O
is	O
defined	O
for	O
all	O
relations	O
with	O
header	O
.	O
</s>
<s>
A	O
relation	B-Algorithm
satisfies	O
a	O
relation	B-Language
schema	I-Language
if	O
it	O
has	O
header	O
and	O
satisfies	O
.	O
</s>
<s>
One	O
of	O
the	O
simplest	O
and	O
most	O
important	O
types	O
of	O
relation	B-Algorithm
constraints	O
is	O
the	O
key	O
constraint	O
.	O
</s>
<s>
It	O
tells	O
us	O
that	O
in	O
every	O
instance	O
of	O
a	O
certain	O
relational	O
schema	B-Application
the	O
tuples	B-Application
can	O
be	O
identified	O
by	O
their	O
values	O
for	O
certain	O
attributes	O
.	O
</s>
<s>
A	O
superkey	B-Application
is	O
a	O
set	O
of	O
column	O
headers	O
for	O
which	O
the	O
values	O
of	O
those	O
columns	O
concatenated	O
are	O
unique	O
across	O
all	O
rows	O
.	O
</s>
<s>
A	O
superkey	B-Application
is	O
written	O
as	O
a	O
finite	O
set	O
of	O
attribute	B-Application
names	O
.	O
</s>
<s>
A	O
superkey	B-Application
holds	O
in	O
a	O
relation	B-Algorithm
if	O
:	O
</s>
<s>
there	O
exist	O
no	O
two	O
distinct	O
tuples	B-Application
such	O
that	O
.	O
</s>
<s>
A	O
superkey	B-Application
holds	O
in	O
a	O
relation	B-Algorithm
universe	O
if	O
it	O
holds	O
in	O
all	O
relations	O
in	O
.	O
</s>
<s>
Theorem	O
:	O
A	O
superkey	B-Application
holds	O
in	O
a	O
relation	B-Algorithm
universe	O
over	O
if	O
and	O
only	O
if	O
and	O
holds	O
in	O
.	O
</s>
<s>
A	O
candidate	B-Application
key	I-Application
is	O
a	O
superkey	B-Application
that	O
cannot	O
be	O
further	O
subdivided	O
to	O
form	O
another	O
superkey	B-Application
.	O
</s>
<s>
A	O
superkey	B-Application
holds	O
as	O
a	O
candidate	B-Application
key	I-Application
for	O
a	O
relation	B-Algorithm
universe	O
if	O
it	O
holds	O
as	O
a	O
superkey	B-Application
for	O
and	O
there	O
is	O
no	O
proper	O
subset	O
of	O
that	O
also	O
holds	O
as	O
a	O
superkey	B-Application
for	O
.	O
</s>
<s>
Functional	B-Application
dependency	I-Application
is	O
the	O
property	O
that	O
a	O
value	O
in	O
a	O
tuple	B-Application
may	O
be	O
derived	O
from	O
another	O
value	O
in	O
that	O
tuple	B-Application
.	O
</s>
<s>
A	O
functional	B-Application
dependency	I-Application
(	O
FD	O
for	O
short	O
)	O
is	O
written	O
as	O
for	O
finite	O
sets	O
of	O
attribute	B-Application
names	O
.	O
</s>
<s>
A	O
functional	B-Application
dependency	I-Application
holds	O
in	O
a	O
relation	B-Algorithm
if	O
:	O
</s>
<s>
tuples	B-Application
,	O
</s>
<s>
A	O
functional	B-Application
dependency	I-Application
holds	O
in	O
a	O
relation	B-Algorithm
universe	O
if	O
it	O
holds	O
in	O
all	O
relations	O
in	O
.	O
</s>
<s>
A	O
functional	B-Application
dependency	I-Application
is	O
trivial	O
under	O
a	O
header	O
if	O
it	O
holds	O
in	O
all	O
relation	B-Algorithm
universes	O
over	O
.	O
</s>
<s>
Armstrong	B-Application
's	I-Application
axioms	I-Application
:	O
The	O
closure	O
of	O
a	O
set	O
of	O
FDs	O
under	O
a	O
header	O
,	O
written	O
as	O
,	O
is	O
the	O
smallest	O
superset	O
of	O
such	O
that	O
:	O
</s>
<s>
Theorem	O
:	O
Armstrong	B-Application
's	I-Application
axioms	I-Application
are	O
sound	O
and	O
complete	O
;	O
given	O
a	O
header	O
and	O
a	O
set	O
of	O
FDs	O
that	O
only	O
contain	O
subsets	O
of	O
,	O
if	O
and	O
only	O
if	O
holds	O
in	O
all	O
relation	B-Algorithm
universes	O
over	O
in	O
which	O
all	O
FDs	O
in	O
hold	O
.	O
</s>
<s>
The	O
completion	O
of	O
an	O
attribute	B-Application
set	O
can	O
be	O
used	O
to	O
compute	O
if	O
a	O
certain	O
dependency	O
is	O
in	O
the	O
closure	O
of	O
a	O
set	O
of	O
FDs	O
.	O
</s>
