<s>
A	O
relational	O
database	O
is	O
a	O
(	O
most	O
commonly	O
digital	O
)	O
database	O
based	O
on	O
the	O
relational	B-Architecture
model	I-Architecture
of	O
data	O
,	O
as	O
proposed	O
by	O
E	O
.	O
F	O
.	O
Codd	O
in	O
1970	O
.	O
</s>
<s>
A	O
system	O
used	O
to	O
maintain	O
relational	O
databases	O
is	O
a	O
relational	B-Application
database	I-Application
management	I-Application
system	I-Application
(	O
RDBMS	O
)	O
.	O
</s>
<s>
Many	O
relational	O
database	O
systems	O
are	O
equipped	O
with	O
the	O
option	O
of	O
using	O
SQL	B-Language
(	O
Structured	B-Language
Query	I-Language
Language	I-Language
)	O
for	O
querying	O
and	O
updating	O
the	O
database	O
.	O
</s>
<s>
Codd	O
introduced	O
the	O
term	O
in	O
his	O
research	O
paper	O
"	O
A	O
Relational	B-Architecture
Model	I-Architecture
of	O
Data	O
for	O
Large	O
Shared	O
Data	O
Banks	O
"	O
.	O
</s>
<s>
One	O
well-known	O
definition	O
of	O
what	O
constitutes	O
a	O
relational	O
database	O
system	O
is	O
composed	O
of	O
Codd	B-Application
's	I-Application
12	I-Application
rules	I-Application
.	O
</s>
<s>
However	O
,	O
no	O
commercial	O
implementations	O
of	O
the	O
relational	B-Architecture
model	I-Architecture
conform	O
to	O
all	O
of	O
Codd	B-Application
's	I-Application
rules	I-Application
,	O
so	O
the	O
term	O
has	O
gradually	O
come	O
to	O
describe	O
a	O
broader	O
class	O
of	O
database	O
systems	O
,	O
which	O
at	O
a	O
minimum	O
:	O
</s>
<s>
Present	O
the	O
data	O
to	O
the	O
user	O
as	O
relations	B-Language
(	O
a	O
presentation	O
in	O
tabular	O
form	O
,	O
i.e.	O
</s>
<s>
as	O
a	O
collection	O
of	O
tables	B-Application
with	O
each	O
table	B-Application
consisting	O
of	O
a	O
set	O
of	O
rows	B-Application
and	O
columns	B-Application
)	O
;	O
</s>
<s>
In	O
1974	O
,	O
IBM	O
began	O
developing	O
System	B-Application
R	I-Application
,	O
a	O
research	O
project	O
to	O
develop	O
a	O
prototype	O
RDBMS	O
.	O
</s>
<s>
The	O
first	O
system	O
sold	O
as	O
an	O
RDBMS	O
was	O
Multics	B-Application
Relational	I-Application
Data	I-Application
Store	I-Application
(	O
June	O
1976	O
)	O
.	O
</s>
<s>
Oracle	B-Application
was	O
released	O
in	O
1979	O
by	O
Relational	O
Software	O
,	O
now	O
Oracle	B-Application
Corporation	I-Application
.	O
</s>
<s>
Ingres	B-Application
and	O
IBM	B-Application
BS12	I-Application
followed	O
.	O
</s>
<s>
Other	O
examples	O
of	O
an	O
RDBMS	O
include	O
IBM	B-Application
Db2	I-Application
,	O
SAP	B-Application
Sybase	I-Application
ASE	I-Application
,	O
and	O
Informix	B-Application
.	O
</s>
<s>
In	O
1984	O
,	O
the	O
first	O
RDBMS	O
for	O
Macintosh	B-Device
began	O
being	O
developed	O
,	O
code-named	O
Silver	O
Surfer	O
,	O
and	O
was	O
released	O
in	O
1987	O
as	O
4th	B-Language
Dimension	I-Language
and	O
known	O
today	O
as	O
4D	B-Language
.	O
</s>
<s>
The	O
first	O
systems	O
that	O
were	O
relatively	O
faithful	O
implementations	O
of	O
the	O
relational	B-Architecture
model	I-Architecture
were	O
from	O
:	O
</s>
<s>
The	O
most	O
common	O
definition	O
of	O
an	O
RDBMS	O
is	O
a	O
product	O
that	O
presents	O
a	O
view	O
of	O
data	O
as	O
a	O
collection	O
of	O
rows	B-Application
and	O
columns	B-Application
,	O
even	O
if	O
it	O
is	O
not	O
based	O
strictly	O
upon	O
relational	B-Architecture
theory	I-Architecture
.	O
</s>
<s>
By	O
this	O
definition	O
,	O
RDBMS	O
products	O
typically	O
implement	O
some	O
but	O
not	O
all	O
of	O
Codd	B-Application
's	I-Application
12	I-Application
rules	I-Application
.	O
</s>
<s>
A	O
second	O
school	O
of	O
thought	O
argues	O
that	O
if	O
a	O
database	O
does	O
not	O
implement	O
all	O
of	O
Codd	B-Application
's	I-Application
rules	I-Application
(	O
or	O
the	O
current	O
understanding	O
on	O
the	O
relational	B-Architecture
model	I-Architecture
,	O
as	O
expressed	O
by	O
Christopher	O
J	O
.	O
</s>
<s>
As	O
of	O
2009	O
,	O
most	O
commercial	O
relational	O
DBMSs	O
employ	O
SQL	B-Language
as	O
their	O
query	B-Language
language	I-Language
.	O
</s>
<s>
Alternative	O
query	B-Language
languages	I-Language
have	O
been	O
proposed	O
and	O
implemented	O
,	O
notably	O
the	O
pre-1996	O
implementation	O
of	O
Ingres	B-Language
QUEL	I-Language
.	O
</s>
<s>
A	O
relational	B-Architecture
model	I-Architecture
organizes	O
data	O
into	O
one	O
or	O
more	O
tables	B-Application
(	O
or	O
"	O
relations	B-Language
"	O
)	O
of	O
columns	B-Application
and	O
rows	B-Application
,	O
with	O
a	O
unique	O
key	O
identifying	O
each	O
row	O
.	O
</s>
<s>
Rows	B-Application
are	O
also	O
called	O
records	O
or	O
tuples	B-Application
.	O
</s>
<s>
Columns	B-Application
are	O
also	O
called	O
attributes	B-General_Concept
.	O
</s>
<s>
Generally	O
,	O
each	O
table/relation	O
represents	O
one	O
"	O
entity	O
type	O
"	O
(	O
such	O
as	O
customer	O
or	O
product	O
)	O
.	O
</s>
<s>
The	O
rows	B-Application
represent	O
instances	O
of	O
that	O
type	O
of	O
entity	O
(	O
such	O
as	O
"	O
Lee	O
"	O
or	O
"	O
chair	O
"	O
)	O
and	O
the	O
columns	B-Application
represent	O
values	O
attributed	O
to	O
that	O
instance	O
(	O
such	O
as	O
address	O
or	O
price	O
)	O
.	O
</s>
<s>
Each	O
row	O
in	O
a	O
table	B-Application
has	O
its	O
own	O
unique	O
key	O
.	O
</s>
<s>
Rows	B-Application
in	O
a	O
table	B-Application
can	O
be	O
linked	O
to	O
rows	B-Application
in	O
other	O
tables	B-Application
by	O
adding	O
a	O
column	O
for	O
the	O
unique	O
key	O
of	O
the	O
linked	O
row	O
(	O
such	O
columns	B-Application
are	O
known	O
as	O
foreign	B-Application
keys	I-Application
)	O
.	O
</s>
<s>
Part	O
of	O
this	O
processing	O
involves	O
consistently	O
being	O
able	O
to	O
select	B-Language
or	O
modify	O
one	O
and	O
only	O
one	O
row	O
in	O
a	O
table	B-Application
.	O
</s>
<s>
Therefore	O
,	O
most	O
physical	O
implementations	O
have	O
a	O
unique	O
primary	B-Application
key	I-Application
(	O
PK	O
)	O
for	O
each	O
row	O
in	O
a	O
table	B-Application
.	O
</s>
<s>
When	O
a	O
new	O
row	O
is	O
written	O
to	O
the	O
table	B-Application
,	O
a	O
new	O
unique	O
value	O
for	O
the	O
primary	B-Application
key	I-Application
is	O
generated	O
;	O
this	O
is	O
the	O
key	O
that	O
the	O
system	O
uses	O
primarily	O
for	O
accessing	O
the	O
table	B-Application
.	O
</s>
<s>
Other	O
,	O
more	O
natural	B-Application
keys	I-Application
may	O
also	O
be	O
identified	O
and	O
defined	O
as	O
alternate	B-Application
keys	I-Application
(	O
AK	O
)	O
.	O
</s>
<s>
Often	O
several	O
columns	B-Application
are	O
needed	O
to	O
form	O
an	O
AK	O
(	O
this	O
is	O
one	O
reason	O
why	O
a	O
single	O
integer	O
column	O
is	O
usually	O
made	O
the	O
PK	O
)	O
.	O
</s>
<s>
Both	O
PKs	O
and	O
AKs	O
have	O
the	O
ability	O
to	O
uniquely	O
identify	O
a	O
row	O
within	O
a	O
table	B-Application
.	O
</s>
<s>
The	O
primary	B-Application
keys	I-Application
within	O
a	O
database	O
are	O
used	O
to	O
define	O
the	O
relationships	O
among	O
the	O
tables	B-Application
.	O
</s>
<s>
When	O
a	O
PK	O
migrates	O
to	O
another	O
table	B-Application
,	O
it	O
becomes	O
a	O
foreign	B-Application
key	I-Application
in	O
the	O
other	O
table	B-Application
.	O
</s>
<s>
When	O
each	O
cell	O
can	O
contain	O
only	O
one	O
value	O
and	O
the	O
PK	O
migrates	O
into	O
a	O
regular	O
entity	O
table	B-Application
,	O
this	O
design	O
pattern	O
can	O
represent	O
either	O
a	O
one-to-one	B-Application
or	O
one-to-many	B-Application
relationship	O
.	O
</s>
<s>
Most	O
relational	O
database	O
designs	O
resolve	O
many-to-many	B-Application
relationships	O
by	O
creating	O
an	O
additional	O
table	B-Application
that	O
contains	O
the	O
PKs	O
from	O
both	O
of	O
the	O
other	O
entity	O
tables	B-Application
the	O
relationship	O
becomes	O
an	O
entity	O
;	O
the	O
resolution	O
table	B-Application
is	O
then	O
named	O
appropriately	O
and	O
the	O
two	O
FKs	O
are	O
combined	O
to	O
form	O
a	O
PK	O
.	O
</s>
<s>
The	O
migration	O
of	O
PKs	O
to	O
other	O
tables	B-Application
is	O
the	O
second	O
major	O
reason	O
why	O
system-assigned	O
integers	O
are	O
used	O
normally	O
as	O
PKs	O
;	O
there	O
is	O
usually	O
neither	O
efficiency	O
nor	O
clarity	O
in	O
migrating	O
a	O
bunch	O
of	O
other	O
types	O
of	O
columns	B-Application
.	O
</s>
<s>
Relationships	O
are	O
a	O
logical	O
connection	O
between	O
different	O
tables	B-Application
,	O
established	O
on	O
the	O
basis	O
of	O
interaction	O
among	O
these	O
tables	B-Application
.	O
</s>
<s>
In	O
order	O
for	O
a	O
database	O
management	O
system	O
(	O
DBMS	O
)	O
to	O
operate	O
efficiently	O
and	O
accurately	O
,	O
it	O
must	O
use	O
ACID	B-Operating_System
transactions	I-Operating_System
.	O
</s>
<s>
Part	O
of	O
the	O
programming	O
within	O
a	O
RDBMS	O
is	O
accomplished	O
using	O
stored	B-General_Concept
procedures	I-General_Concept
(	O
SPs	O
)	O
.	O
</s>
<s>
For	O
increased	O
security	O
,	O
the	O
system	O
design	O
may	O
grant	O
access	O
to	O
only	O
the	O
stored	B-General_Concept
procedures	I-General_Concept
and	O
not	O
directly	O
to	O
the	O
tables	B-Application
.	O
</s>
<s>
Fundamental	O
stored	B-General_Concept
procedures	I-General_Concept
contain	O
the	O
logic	O
needed	O
to	O
insert	O
new	O
and	O
update	O
existing	O
data	O
.	O
</s>
<s>
Codd	O
's	O
view	O
of	O
what	O
qualifies	O
as	O
an	O
RDBMS	O
is	O
summarized	O
in	O
Codd	B-Application
's	I-Application
12	I-Application
rules	I-Application
.	O
</s>
<s>
Other	O
models	O
besides	O
the	O
relational	B-Architecture
model	I-Architecture
include	O
the	O
hierarchical	B-General_Concept
database	I-General_Concept
model	I-General_Concept
and	O
the	O
network	B-General_Concept
model	I-General_Concept
.	O
</s>
<s>
The	O
table	B-Application
below	O
summarizes	O
some	O
of	O
the	O
most	O
important	O
relational	O
database	O
terms	O
and	O
the	O
corresponding	O
SQL	B-Language
term	O
:	O
</s>
<s>
SQL	B-Language
term	O
Relational	O
database	O
term	O
Description	O
Row	O
Tuple	B-Application
or	O
record	O
A	O
data	O
set	O
representing	O
a	O
single	O
item	O
Column	O
Attribute	O
or	O
field	O
A	O
labeled	O
element	O
of	O
a	O
tuple	B-Application
,	O
e.g.	O
</s>
<s>
In	O
a	O
relational	O
database	O
,	O
a	O
relation	B-Language
is	O
a	O
set	O
of	O
tuples	B-Application
that	O
have	O
the	O
same	O
attributes	B-General_Concept
.	O
</s>
<s>
A	O
tuple	B-Application
usually	O
represents	O
an	O
object	O
and	O
information	O
about	O
that	O
object	O
.	O
</s>
<s>
A	O
relation	B-Language
is	O
usually	O
described	O
as	O
a	O
table	B-Application
,	O
which	O
is	O
organized	O
into	O
rows	B-Application
and	O
columns	B-Application
.	O
</s>
<s>
All	O
the	O
data	O
referenced	O
by	O
an	O
attribute	O
are	O
in	O
the	O
same	O
domain	B-Application
and	O
conform	O
to	O
the	O
same	O
constraints	O
.	O
</s>
<s>
The	O
relational	B-Architecture
model	I-Architecture
specifies	O
that	O
the	O
tuples	B-Application
of	O
a	O
relation	B-Language
have	O
no	O
specific	O
order	O
and	O
that	O
the	O
tuples	B-Application
,	O
in	O
turn	O
,	O
impose	O
no	O
order	O
on	O
the	O
attributes	B-General_Concept
.	O
</s>
<s>
Applications	O
access	O
data	O
by	O
specifying	O
queries	O
,	O
which	O
use	O
operations	O
such	O
as	O
select	B-Language
to	O
identify	O
tuples	B-Application
,	O
project	O
to	O
identify	O
attributes	B-General_Concept
,	O
and	O
join	O
to	O
combine	O
relations	B-Language
.	O
</s>
<s>
Relations	B-Language
can	O
be	O
modified	O
using	O
the	O
insert	O
,	O
delete	O
,	O
and	O
update	O
operators	O
.	O
</s>
<s>
New	O
tuples	B-Application
can	O
supply	O
explicit	O
values	O
or	O
be	O
derived	O
from	O
a	O
query	B-Language
.	O
</s>
<s>
Similarly	O
,	O
queries	O
identify	O
tuples	B-Application
for	O
updating	O
or	O
deleting	O
.	O
</s>
<s>
Tuples	B-Application
by	O
definition	O
are	O
unique	O
.	O
</s>
<s>
If	O
the	O
tuple	B-Application
contains	O
a	O
candidate	B-Application
or	O
primary	B-Application
key	I-Application
then	O
obviously	O
it	O
is	O
unique	O
;	O
however	O
,	O
a	O
primary	B-Application
key	I-Application
need	O
not	O
be	O
defined	O
for	O
a	O
row	O
or	O
record	O
to	O
be	O
a	O
tuple	B-Application
.	O
</s>
<s>
The	O
definition	O
of	O
a	O
tuple	B-Application
requires	O
that	O
it	O
be	O
unique	O
,	O
but	O
does	O
not	O
require	O
a	O
primary	B-Application
key	I-Application
to	O
be	O
defined	O
.	O
</s>
<s>
Because	O
a	O
tuple	B-Application
is	O
unique	O
,	O
its	O
attributes	B-General_Concept
by	O
definition	O
constitute	O
a	O
superkey	B-Application
.	O
</s>
<s>
All	O
data	O
are	O
stored	O
and	O
accessed	O
via	O
relations	B-Language
.	O
</s>
<s>
Relations	B-Language
that	O
store	O
data	O
are	O
called	O
"	O
base	O
relations	B-Language
"	O
,	O
and	O
in	O
implementations	O
are	O
called	O
"	O
tables	B-Application
"	O
.	O
</s>
<s>
Other	O
relations	B-Language
do	O
not	O
store	O
data	O
,	O
but	O
are	O
computed	O
by	O
applying	O
relational	O
operations	O
to	O
other	O
relations	B-Language
.	O
</s>
<s>
These	O
relations	B-Language
are	O
sometimes	O
called	O
"	O
derived	O
relations	B-Language
"	O
.	O
</s>
<s>
In	O
implementations	O
these	O
are	O
called	O
"	O
views	B-Language
"	O
or	O
"	O
queries	O
"	O
.	O
</s>
<s>
Derived	O
relations	B-Language
are	O
convenient	O
in	O
that	O
they	O
act	O
as	O
a	O
single	O
relation	B-Language
,	O
even	O
though	O
they	O
may	O
grab	O
information	O
from	O
several	O
relations	B-Language
.	O
</s>
<s>
Also	O
,	O
derived	O
relations	B-Language
can	O
be	O
used	O
as	O
an	O
abstraction	B-Architecture
layer	I-Architecture
.	O
</s>
<s>
A	O
domain	B-Application
describes	O
the	O
set	O
of	O
possible	O
values	O
for	O
a	O
given	O
attribute	O
,	O
and	O
can	O
be	O
considered	O
a	O
constraint	O
on	O
the	O
value	O
of	O
the	O
attribute	O
.	O
</s>
<s>
Mathematically	O
,	O
attaching	O
a	O
domain	B-Application
to	O
an	O
attribute	O
means	O
that	O
any	O
value	O
for	O
the	O
attribute	O
must	O
be	O
an	O
element	O
of	O
the	O
specified	O
set	O
.	O
</s>
<s>
The	O
character	O
string	O
"	O
ABC	O
"	O
,	O
for	O
instance	O
,	O
is	O
not	O
in	O
the	O
integer	O
domain	B-Application
,	O
but	O
the	O
integer	O
value	O
123	O
is	O
.	O
</s>
<s>
Another	O
example	O
of	O
domain	B-Application
describes	O
the	O
possible	O
values	O
for	O
the	O
field	O
"	O
CoinFace	O
"	O
as	O
(	O
"	O
Heads	O
"	O
,	O
"	O
Tails	O
"	O
)	O
.	O
</s>
<s>
Constraints	O
are	O
often	O
used	O
to	O
make	O
it	O
possible	O
to	O
further	O
restrict	O
the	O
domain	B-Application
of	O
an	O
attribute	O
.	O
</s>
<s>
SQL	B-Language
implements	O
constraint	O
functionality	O
in	O
the	O
form	O
of	O
check	B-Language
constraints	I-Language
.	O
</s>
<s>
Constraints	O
restrict	O
the	O
data	O
that	O
can	O
be	O
stored	O
in	O
relations	B-Language
.	O
</s>
<s>
Constraints	O
can	O
apply	O
to	O
single	O
attributes	B-General_Concept
,	O
to	O
a	O
tuple	B-Application
(	O
restricting	O
combinations	O
of	O
attributes	B-General_Concept
)	O
or	O
to	O
an	O
entire	O
relation	B-Language
.	O
</s>
<s>
Since	O
every	O
attribute	O
has	O
an	O
associated	O
domain	B-Application
,	O
there	O
are	O
constraints	O
(	O
domain	B-Application
constraints	O
)	O
.	O
</s>
<s>
The	O
two	O
principal	O
rules	O
for	O
the	O
relational	B-Architecture
model	I-Architecture
are	O
known	O
as	O
entity	O
integrity	O
and	O
referential	B-General_Concept
integrity	I-General_Concept
.	O
</s>
<s>
Every	O
relation/table	O
has	O
a	O
primary	B-Application
key	I-Application
,	O
this	O
being	O
a	O
consequence	O
of	O
a	O
relation	B-Language
being	O
a	O
set	O
.	O
</s>
<s>
A	O
primary	B-Application
key	I-Application
uniquely	O
specifies	O
a	O
tuple	B-Application
within	O
a	O
table	B-Application
.	O
</s>
<s>
While	O
natural	O
attributes	B-General_Concept
(	O
attributes	B-General_Concept
used	O
to	O
describe	O
the	O
data	O
being	O
entered	O
)	O
are	O
sometimes	O
good	O
primary	B-Application
keys	I-Application
,	O
surrogate	B-Application
keys	I-Application
are	O
often	O
used	O
instead	O
.	O
</s>
<s>
A	O
surrogate	B-Application
key	I-Application
is	O
an	O
artificial	O
attribute	O
assigned	O
to	O
an	O
object	O
which	O
uniquely	O
identifies	O
it	O
(	O
for	O
instance	O
,	O
in	O
a	O
table	B-Application
of	O
information	O
about	O
students	O
at	O
a	O
school	O
they	O
might	O
all	O
be	O
assigned	O
a	O
student	O
ID	O
in	O
order	O
to	O
differentiate	O
them	O
)	O
.	O
</s>
<s>
The	O
surrogate	B-Application
key	I-Application
has	O
no	O
intrinsic	O
(	O
inherent	O
)	O
meaning	O
,	O
but	O
rather	O
is	O
useful	O
through	O
its	O
ability	O
to	O
uniquely	O
identify	O
a	O
tuple	B-Application
.	O
</s>
<s>
Another	O
common	O
occurrence	O
,	O
especially	O
in	O
regard	O
to	O
N:M	O
cardinality	O
is	O
the	O
composite	B-Application
key	I-Application
.	O
</s>
<s>
A	O
composite	B-Application
key	I-Application
is	O
a	O
key	O
made	O
up	O
of	O
two	O
or	O
more	O
attributes	B-General_Concept
within	O
a	O
table	B-Application
that	O
(	O
together	O
)	O
uniquely	O
identify	O
a	O
record	O
.	O
</s>
<s>
Foreign	B-Application
key	I-Application
refers	O
to	O
a	O
field	O
in	O
a	O
relational	O
table	B-Application
that	O
matches	O
the	O
primary	B-Application
key	I-Application
column	O
of	O
another	O
table	B-Application
.	O
</s>
<s>
Foreign	B-Application
keys	I-Application
need	O
not	O
have	O
unique	O
values	O
in	O
the	O
referencing	O
relation	B-Language
.	O
</s>
<s>
A	O
foreign	B-Application
key	I-Application
can	O
be	O
used	O
to	O
cross-reference	O
tables	B-Application
,	O
and	O
it	O
effectively	O
uses	O
the	O
values	O
of	O
attributes	B-General_Concept
in	O
the	O
referenced	O
relation	B-Language
to	O
restrict	O
the	O
domain	B-Application
of	O
one	O
or	O
more	O
attributes	B-General_Concept
in	O
the	O
referencing	O
relation	B-Language
.	O
</s>
<s>
The	O
concept	O
is	O
described	O
formally	O
as	O
:	O
"	O
For	O
all	O
tuples	B-Application
in	O
the	O
referencing	O
relation	B-Language
projected	O
over	O
the	O
referencing	O
attributes	B-General_Concept
,	O
there	O
must	O
exist	O
a	O
tuple	B-Application
in	O
the	O
referenced	O
relation	B-Language
projected	O
over	O
those	O
same	O
attributes	B-General_Concept
such	O
that	O
the	O
values	O
in	O
each	O
of	O
the	O
referencing	O
attributes	B-General_Concept
match	O
the	O
corresponding	O
values	O
in	O
the	O
referenced	O
attributes.	O
"	O
</s>
<s>
A	O
stored	B-General_Concept
procedure	I-General_Concept
is	O
executable	O
code	O
that	O
is	O
associated	O
with	O
,	O
and	O
generally	O
stored	O
in	O
,	O
the	O
database	O
.	O
</s>
<s>
Stored	B-General_Concept
procedures	I-General_Concept
usually	O
collect	O
and	O
customize	O
common	O
operations	O
,	O
like	O
inserting	O
a	O
tuple	B-Application
into	O
a	O
relation	B-Language
,	O
gathering	O
statistical	O
information	O
about	O
usage	O
patterns	O
,	O
or	O
encapsulating	O
complex	O
business	B-Architecture
logic	I-Architecture
and	O
calculations	O
.	O
</s>
<s>
Frequently	O
they	O
are	O
used	O
as	O
an	O
application	B-Application
programming	I-Application
interface	I-Application
(	O
API	B-Application
)	O
for	O
security	O
or	O
simplicity	O
.	O
</s>
<s>
Implementations	O
of	O
stored	B-General_Concept
procedures	I-General_Concept
on	O
SQL	B-Language
RDBMS	O
's	O
often	O
allow	O
developers	O
to	O
take	O
advantage	O
of	O
procedural	B-Application
extensions	O
(	O
often	O
vendor-specific	O
)	O
to	O
the	O
standard	O
declarative	B-Language
SQL	B-Language
syntax	O
.	O
</s>
<s>
Stored	B-General_Concept
procedures	I-General_Concept
are	O
not	O
part	O
of	O
the	O
relational	B-Architecture
database	I-Architecture
model	I-Architecture
,	O
but	O
all	O
commercial	O
implementations	O
include	O
them	O
.	O
</s>
<s>
Indices	O
can	O
be	O
created	O
on	O
any	O
combination	O
of	O
attributes	B-General_Concept
on	O
a	O
relation	B-Language
.	O
</s>
<s>
Queries	O
that	O
filter	O
using	O
those	O
attributes	B-General_Concept
can	O
find	O
matching	O
tuples	B-Application
directly	O
using	O
the	O
index	O
(	O
similar	O
to	O
Hash	B-Algorithm
table	I-Algorithm
lookup	O
)	O
,	O
without	O
having	O
to	O
check	O
each	O
tuple	B-Application
in	O
turn	O
.	O
</s>
<s>
Relational	O
databases	O
typically	O
supply	O
multiple	O
indexing	O
techniques	O
,	O
each	O
of	O
which	O
is	O
optimal	O
for	O
some	O
combination	O
of	O
data	O
distribution	O
,	O
relation	B-Language
size	O
,	O
and	O
typical	O
access	O
pattern	O
.	O
</s>
<s>
Indices	O
are	O
usually	O
implemented	O
via	O
B+	O
trees	O
,	O
R-trees	B-Library
,	O
and	O
bitmaps	B-Data_Structure
.	O
</s>
<s>
The	O
use	O
of	O
efficient	O
indexes	O
on	O
both	O
primary	O
and	O
foreign	B-Application
keys	I-Application
can	O
dramatically	O
improve	O
query	B-Language
performance	O
.	O
</s>
<s>
This	O
is	O
because	O
B-tree	O
indexes	O
result	O
in	O
query	B-Language
times	O
proportional	O
to	O
log(n )	O
where	B-Language
n	O
is	O
the	O
number	O
of	O
rows	B-Application
in	O
a	O
table	B-Application
and	O
hash	O
indexes	O
result	O
in	O
constant	O
time	O
queries	O
(	O
no	O
size	O
dependency	O
as	O
long	O
as	O
the	O
relevant	O
part	O
of	O
the	O
index	O
fits	O
into	O
memory	O
)	O
.	O
</s>
<s>
Queries	O
made	O
against	O
the	O
relational	O
database	O
,	O
and	O
the	O
derived	O
relvars	B-Application
in	O
the	O
database	O
are	O
expressed	O
in	O
a	O
relational	B-Application
calculus	I-Application
or	O
a	O
relational	B-Algorithm
algebra	I-Algorithm
.	O
</s>
<s>
In	O
his	O
original	O
relational	B-Algorithm
algebra	I-Algorithm
,	O
Codd	O
introduced	O
eight	O
relational	O
operators	O
in	O
two	O
groups	O
of	O
four	O
operators	O
each	O
.	O
</s>
<s>
The	O
union	O
operator	O
( υ	O
)	O
combines	O
the	O
tuples	B-Application
of	O
two	O
relations	B-Language
and	O
removes	O
all	O
duplicate	O
tuples	B-Application
from	O
the	O
result	O
.	O
</s>
<s>
The	O
relational	O
union	O
operator	O
is	O
equivalent	O
to	O
the	O
SQL	B-Language
UNION	I-Language
operator	O
.	O
</s>
<s>
The	O
intersection	O
operator	O
( ∩	O
)	O
produces	O
the	O
set	O
of	O
tuples	B-Application
that	O
two	O
relations	B-Language
share	O
in	O
common	O
.	O
</s>
<s>
Intersection	O
is	O
implemented	O
in	O
SQL	B-Language
in	O
the	O
form	O
of	O
the	O
INTERSECT	O
operator	O
.	O
</s>
<s>
The	O
set	O
difference	O
operator	O
(	O
-	O
)	O
acts	O
on	O
two	O
relations	B-Language
and	O
produces	O
the	O
set	O
of	O
tuples	B-Application
from	O
the	O
first	O
relation	B-Language
that	O
do	O
not	O
exist	O
in	O
the	O
second	O
relation	B-Language
.	O
</s>
<s>
Difference	O
is	O
implemented	O
in	O
SQL	B-Language
in	O
the	O
form	O
of	O
the	O
EXCEPT	O
or	O
MINUS	O
operator	O
.	O
</s>
<s>
The	O
cartesian	O
product	O
(	O
X	O
)	O
of	O
two	O
relations	B-Language
is	O
a	O
join	O
that	O
is	O
not	O
restricted	O
by	O
any	O
criteria	O
,	O
resulting	O
in	O
every	O
tuple	B-Application
of	O
the	O
first	O
relation	B-Language
being	O
matched	O
with	O
every	O
tuple	B-Application
of	O
the	O
second	O
relation	B-Language
.	O
</s>
<s>
The	O
cartesian	O
product	O
is	O
implemented	O
in	O
SQL	B-Language
as	O
the	O
Cross	O
join	O
operator	O
.	O
</s>
<s>
The	O
selection	O
,	O
or	O
restriction	O
,	O
operation	O
( σ	O
)	O
retrieves	O
tuples	B-Application
from	O
a	O
relation	B-Language
,	O
limiting	O
the	O
results	O
to	O
only	O
those	O
that	O
meet	O
a	O
specific	O
criterion	O
,	O
i.e.	O
</s>
<s>
The	O
SQL	B-Language
equivalent	O
of	O
selection	O
is	O
the	O
SELECT	B-Language
query	B-Language
statement	O
with	O
a	O
WHERE	B-Language
clause	O
.	O
</s>
<s>
The	O
projection	B-Algorithm
operation	I-Algorithm
( π	O
)	O
extracts	O
only	O
the	O
specified	O
attributes	B-General_Concept
from	O
a	O
tuple	B-Application
or	O
set	O
of	O
tuples	B-Application
.	O
</s>
<s>
In	O
this	O
type	O
of	O
join	O
,	O
two	O
relations	B-Language
are	O
connected	O
by	O
their	O
common	O
attributes	B-General_Concept
.	O
</s>
<s>
MySQL	B-Application
's	O
approximation	O
of	O
a	O
natural	O
join	O
is	O
the	O
Inner	O
join	O
operator	O
.	O
</s>
<s>
In	O
SQL	B-Language
,	O
an	O
INNER	O
JOIN	O
prevents	O
a	O
cartesian	O
product	O
from	O
occurring	O
when	O
there	O
are	O
two	O
tables	B-Application
in	O
a	O
query	B-Language
.	O
</s>
<s>
For	O
each	O
table	B-Application
added	O
to	O
a	O
SQL	B-Language
Query	I-Language
,	O
one	O
additional	O
INNER	O
JOIN	O
is	O
added	O
to	O
prevent	O
a	O
cartesian	O
product	O
.	O
</s>
<s>
Thus	O
,	O
for	O
N	O
tables	B-Application
in	O
an	O
SQL	B-Language
query	I-Language
,	O
there	O
must	O
be	O
N−1	O
INNER	O
JOINS	O
to	O
prevent	O
a	O
cartesian	O
product	O
.	O
</s>
<s>
The	O
relational	O
division	O
( ÷	O
)	O
operation	O
is	O
a	O
slightly	O
more	O
complex	O
operation	O
and	O
essentially	O
involves	O
using	O
the	O
tuples	B-Application
of	O
one	O
relation	B-Language
(	O
the	O
dividend	O
)	O
to	O
partition	O
a	O
second	O
relation	B-Language
(	O
the	O
divisor	O
)	O
.	O
</s>
<s>
Other	O
operators	O
have	O
been	O
introduced	O
or	O
proposed	O
since	O
Codd	O
's	O
introduction	O
of	O
the	O
original	O
eight	O
including	O
relational	O
comparison	O
operators	O
and	O
extensions	O
that	O
offer	O
support	O
for	O
nesting	O
and	O
hierarchical	B-General_Concept
data	I-General_Concept
,	O
among	O
others	O
.	O
</s>
<s>
Normalization	O
was	O
first	O
proposed	O
by	O
Codd	O
as	O
an	O
integral	O
part	O
of	O
the	O
relational	B-Architecture
model	I-Architecture
.	O
</s>
<s>
An	O
alternative	O
definition	O
for	O
a	O
relational	B-Application
database	I-Application
management	I-Application
system	I-Application
is	O
a	O
database	O
management	O
system	O
(	O
DBMS	O
)	O
based	O
on	O
the	O
relational	B-Architecture
model	I-Architecture
.	O
</s>
<s>
Relational	O
databases	O
have	O
often	O
replaced	O
legacy	O
hierarchical	B-General_Concept
databases	I-General_Concept
and	O
network	B-General_Concept
databases	I-General_Concept
,	O
because	O
RDBMS	O
were	O
easier	O
to	O
implement	O
and	O
administer	O
.	O
</s>
<s>
Nonetheless	O
,	O
relational	O
stored	O
data	O
received	O
continued	O
,	O
unsuccessful	O
challenges	O
by	O
object	B-Application
database	I-Application
management	I-Application
systems	I-Application
in	O
the	O
1980s	O
and	O
1990s	O
,	O
(	O
which	O
were	O
introduced	O
in	O
an	O
attempt	O
to	O
address	O
the	O
so-called	O
object	B-Architecture
–	I-Architecture
relational	I-Architecture
impedance	I-Architecture
mismatch	I-Architecture
between	O
relational	O
databases	O
and	O
object-oriented	O
application	O
programs	O
)	O
,	O
as	O
well	O
as	O
by	O
XML	B-Application
database	I-Application
management	O
systems	O
in	O
the	O
1990s	O
.	O
</s>
<s>
However	O
,	O
due	O
to	O
the	O
expanse	O
of	O
technologies	O
,	O
such	O
as	O
horizontal	O
scaling	O
of	O
computer	B-Architecture
clusters	I-Architecture
,	O
NoSQL	B-General_Concept
databases	O
have	O
recently	O
become	O
popular	O
as	O
an	O
alternative	O
to	O
RDBMS	O
databases	O
.	O
</s>
<s>
Distributed	B-Language
Relational	I-Language
Database	I-Language
Architecture	I-Language
(	O
DRDA	B-Language
)	O
was	O
designed	O
by	O
a	O
workgroup	O
within	O
IBM	O
in	O
the	O
period	O
1988	O
to	O
1994	O
.	O
</s>
<s>
DRDA	B-Language
enables	O
network	O
connected	O
relational	O
databases	O
to	O
cooperate	O
to	O
fulfill	O
SQL	B-Language
requests	O
.	O
</s>
<s>
The	O
messages	O
,	O
protocols	O
,	O
and	O
structural	O
components	O
of	O
DRDA	B-Language
are	O
defined	O
by	O
the	O
Distributed	B-Operating_System
Data	I-Operating_System
Management	I-Operating_System
Architecture	I-Operating_System
.	O
</s>
<s>
According	O
to	O
DB-Engines	B-Application
,	O
in	O
January	O
2023	O
the	O
most	O
popular	O
systems	O
on	O
the	O
db-engines.com	O
web	O
site	O
were	O
:	O
</s>
<s>
According	O
to	O
research	O
company	O
Gartner	O
,	O
in	O
2011	O
,	O
the	O
five	O
leading	O
proprietary	B-Application
software	I-Application
relational	O
database	O
vendors	O
by	O
revenue	O
were	O
Oracle	B-Application
(	O
48.8	O
%	O
)	O
,	O
IBM	O
(	O
20.2	O
%	O
)	O
,	O
Microsoft	O
(	O
17.0	O
%	O
)	O
,	O
SAP	B-Application
including	O
Sybase	B-Application
(	O
4.6	O
%	O
)	O
,	O
and	O
Teradata	O
(	O
3.7	O
%	O
)	O
.	O
</s>
