<s>
In	O
a	O
relational	B-Application
database	I-Application
,	O
a	O
weak	B-Application
entity	I-Application
is	O
an	O
entity	O
that	O
cannot	O
be	O
uniquely	O
identified	O
by	O
its	O
attributes	O
alone	O
;	O
therefore	O
,	O
it	O
must	O
use	O
a	O
foreign	B-Application
key	I-Application
in	O
conjunction	O
with	O
its	O
attributes	O
to	O
create	O
a	O
primary	B-Application
key	I-Application
.	O
</s>
<s>
The	O
foreign	B-Application
key	I-Application
is	O
typically	O
a	O
primary	B-Application
key	I-Application
of	O
an	O
entity	O
it	O
is	O
related	O
to	O
.	O
</s>
<s>
The	O
foreign	B-Application
key	I-Application
is	O
an	O
attribute	O
of	O
the	O
identifying	O
(	O
or	O
owner	O
,	O
parent	O
,	O
or	O
dominant	O
)	O
entity	O
set	O
.	O
</s>
<s>
Each	O
element	O
in	O
the	O
weak	B-Application
entity	I-Application
set	I-Application
must	O
have	O
a	O
relationship	O
with	O
exactly	O
one	O
element	O
in	O
the	O
owner	O
entity	O
set	O
,	O
and	O
therefore	O
,	O
the	O
relationship	O
cannot	O
be	O
a	O
many-to-many	O
relationship	O
.	O
</s>
<s>
In	O
entity	B-Architecture
relationship	I-Architecture
diagrams	I-Architecture
(	O
ER	B-Architecture
diagrams	I-Architecture
)	O
,	O
a	O
weak	B-Application
entity	I-Application
set	I-Application
is	O
indicated	O
by	O
a	O
bold	O
(	O
or	O
double-lined	O
)	O
rectangle	O
(	O
the	O
entity	O
)	O
connected	O
by	O
a	O
bold	O
(	O
or	O
double-lined	O
)	O
type	O
arrow	O
to	O
a	O
bold	O
(	O
or	O
double-lined	O
)	O
diamond	O
(	O
the	O
relationship	O
)	O
.	O
</s>
<s>
This	O
type	O
of	O
relationship	O
is	O
called	O
an	O
identifying	O
relationship	O
and	O
in	O
IDEF1X	B-Application
notation	O
it	O
is	O
represented	O
by	O
an	O
oval	O
entity	O
rather	O
than	O
a	O
square	O
entity	O
for	O
base	O
tables	O
.	O
</s>
<s>
An	O
identifying	O
relationship	O
is	O
one	O
where	O
the	O
primary	B-Application
key	I-Application
is	O
populated	O
to	O
the	O
child	O
weak	B-Application
entity	I-Application
as	O
a	O
primary	B-Application
key	I-Application
in	O
that	O
entity	O
.	O
</s>
<s>
In	O
general	O
(	O
though	O
not	O
necessarily	O
)	O
a	O
weak	B-Application
entity	I-Application
does	O
not	O
have	O
any	O
items	O
in	O
its	O
primary	B-Application
key	I-Application
other	O
than	O
its	O
inherited	O
primary	B-Application
key	I-Application
and	O
a	O
sequence	O
number	O
.	O
</s>
<s>
There	O
are	O
two	O
types	O
of	O
weak	B-Application
entities	I-Application
:	O
associative	B-Application
entities	I-Application
and	O
subtype	O
entities	O
.	O
</s>
<s>
The	O
latter	O
represents	O
a	O
crucial	O
type	O
of	O
normalization	B-Application
,	O
where	O
the	O
super-type	O
entity	O
inherits	O
its	O
attributes	O
to	O
subtype	O
entities	O
based	O
on	O
the	O
value	O
of	O
the	O
discriminator	B-Language
.	O
</s>
<s>
In	O
IDEF1X	B-Application
,	O
a	O
government	O
standard	O
for	O
capturing	O
requirements	O
,	O
possible	O
sub-type	O
relationships	O
are	O
:	O
</s>
<s>
A	O
classic	O
example	O
of	O
a	O
weak	B-Application
entity	I-Application
without	O
a	O
sub-type	O
relationship	O
would	O
be	O
the	O
"	O
header/detail	O
'	O
records	O
in	O
many	O
real	O
world	O
situations	O
such	O
as	O
claims	O
,	O
orders	O
and	O
invoices	O
,	O
where	O
the	O
header	O
captures	O
information	O
common	O
across	O
all	O
forms	O
and	O
the	O
detail	O
captures	O
information	O
specific	O
to	O
individual	O
items	O
.	O
</s>
<s>
Given	O
the	O
discriminator	B-Language
PARTY	O
TYPE	O
(	O
which	O
could	O
be	O
individual	O
,	O
partnership	O
,	O
C	O
Corporation	O
,	O
Sub	O
Chapter	O
S	O
Association	O
,	O
Association	O
,	O
Governmental	O
Unit	O
,	O
Quasi-governmental	O
agency	O
)	O
the	O
two	O
subtype	O
entities	O
are	O
PERSON	O
,	O
which	O
contains	O
individual-specific	O
information	O
such	O
as	O
first	O
and	O
last	O
name	O
and	O
date	O
of	O
birth	O
,	O
and	O
ORGANIZATION	O
,	O
which	O
would	O
contain	O
such	O
attributes	O
as	O
the	O
legal	O
name	O
,	O
and	O
organizational	O
hierarchies	O
such	O
as	O
cost	O
centers	O
.	O
</s>
<s>
The	O
sub-types	O
are	O
considered	O
derived	O
tables	O
,	O
which	O
correspond	O
to	O
weak	B-Application
entities	I-Application
.	O
</s>
<s>
Referential	B-General_Concept
integrity	I-General_Concept
is	O
enforced	O
via	O
cascading	O
updates	O
and	O
deletes	O
.	O
</s>
<s>
The	O
database	O
would	O
contain	O
a	O
table	O
identifying	O
customers	O
by	O
a	O
customer	O
number	O
(	O
primary	B-Application
key	I-Application
)	O
;	O
another	O
identifying	O
the	O
products	O
that	O
can	O
be	O
sold	O
by	O
a	O
product	O
number	O
(	O
primary	B-Application
key	I-Application
)	O
;	O
and	O
it	O
would	O
contain	O
a	O
pair	O
of	O
tables	O
describing	O
orders	O
.	O
</s>
<s>
One	O
of	O
the	O
tables	O
could	O
be	O
called	O
Orders	O
and	O
it	O
would	O
have	O
an	O
order	O
number	O
(	O
primary	B-Application
key	I-Application
)	O
to	O
identify	O
this	O
order	O
uniquely	O
,	O
and	O
would	O
contain	O
a	O
customer	O
number	O
(	O
foreign	B-Application
key	I-Application
)	O
to	O
identify	O
who	O
the	O
products	O
are	O
being	O
sold	O
to	O
,	O
plus	O
other	O
information	O
such	O
as	O
the	O
date	O
and	O
time	O
when	O
the	O
order	O
was	O
placed	O
,	O
how	O
it	O
will	O
be	O
paid	O
for	O
,	O
where	O
it	O
is	O
to	O
be	O
shipped	O
to	O
,	O
and	O
so	O
on	O
.	O
</s>
<s>
The	O
other	O
table	O
could	O
be	O
called	O
OrderItem	O
;	O
it	O
would	O
be	O
identified	O
by	O
a	O
compound	O
key	O
consisting	O
of	O
both	O
the	O
order	O
number	O
(	O
foreign	B-Application
key	I-Application
)	O
and	O
an	O
item	O
line	O
number	O
;	O
with	O
other	O
non-primary	O
key	O
attributes	O
such	O
as	O
the	O
product	O
number	O
(	O
foreign	B-Application
key	I-Application
)	O
that	O
was	O
ordered	O
,	O
the	O
quantity	O
,	O
the	O
price	O
,	O
any	O
discount	O
,	O
any	O
special	O
options	O
,	O
and	O
so	O
on	O
.	O
</s>
<s>
The	O
OrderItem	O
table	O
stores	O
weak	B-Application
entities	I-Application
precisely	O
because	O
an	O
OrderItem	O
has	O
no	O
meaning	O
independent	O
of	O
the	O
Order	O
.	O
</s>
<s>
An	O
order	O
would	O
not	O
exist	O
without	O
a	O
product	O
and	O
a	O
person	O
to	O
create	O
the	O
order	O
,	O
so	O
it	O
could	O
be	O
argued	O
that	O
an	O
order	O
would	O
be	O
described	O
as	O
a	O
weak	B-Application
entity	I-Application
and	O
that	O
products	O
ordered	O
would	O
be	O
a	O
multivalue	O
attribute	O
of	O
the	O
order	O
.	O
</s>
