dbTalk Databases Forums  

Foreign keys

comp.databases.theory comp.databases.theory


Discuss Foreign keys in the comp.databases.theory forum.



Reply
 
Thread Tools Display Modes
  #141  
Old   
Kira Yamato
 
Posts: n/a

Default Re: Foreign keys - 01-16-2008 , 06:22 PM






On 2008-01-16 17:37:02 -0500, Jan Hidders <hidders (AT) gmail (DOT) com> said:

Quote:
On 15 jan, 08:24, Kira Yamato <kira... (AT) earthlink (DOT) net> wrote:
On 2008-01-14 21:18:57 -0500, "Evan Keel" <evank... (AT) sbcglobal (DOT) net> said:

Always a physical issue. Never a theory issue.Agree?

Foreign keys are functional dependencies across two relations.

More specifically, let
* * * * R1(K1, A1, B1)
be a relation with attribute sets K1, A1 and B1 where K1 is R1's
primary key and B1 is a foreign key to the relation
* * * * R2(K2, A2)
where K2 is R2's primary key and A2 is the set of its remaining attributes
.

Then the foreign key B1 represents the functional dependency
* * * * B1 --> A2,
which is the functional dependency across two relation I mentioned in
the first sentence.

Furthermore, through transitivity by the functional dependency K1 --
B1, the foreign key also represents the inter-relational functional
dependency
* * * * K1 --> A2.

Am I correct to say this?

Not really. Your observation that sometimes the inference rules are
the same for functional and inclusion dependencies is correct, but
unfortunately this is not true in general. For example, the
augmentation rule does not always hold for inclusion dependencies. In
fact, axiomatizing the combination of functional and inclusion
dependencies is a notoriously difficult problem and in the past there
has been intensive research on that subject.
I think my initial confusion came from my misunderstanding that
functional dependencies can be defined across relations.

However, after reading the definition more carefully, functional
dependency is only defined within a single relation.

Foreign keys, on the other hand, represent inter-relational
constraints. It takes on a different definition.

Consequently, they take on different inference rules, as you stated.

I apologize for my confusion. Especially to Brian Selzer. And thanks
for both yours and his corrections.

--

-kira



Reply With Quote
  #142  
Old   
Kira Yamato
 
Posts: n/a

Default Re: Foreign keys - 01-16-2008 , 06:22 PM






On 2008-01-16 17:37:02 -0500, Jan Hidders <hidders (AT) gmail (DOT) com> said:

Quote:
On 15 jan, 08:24, Kira Yamato <kira... (AT) earthlink (DOT) net> wrote:
On 2008-01-14 21:18:57 -0500, "Evan Keel" <evank... (AT) sbcglobal (DOT) net> said:

Always a physical issue. Never a theory issue.Agree?

Foreign keys are functional dependencies across two relations.

More specifically, let
* * * * R1(K1, A1, B1)
be a relation with attribute sets K1, A1 and B1 where K1 is R1's
primary key and B1 is a foreign key to the relation
* * * * R2(K2, A2)
where K2 is R2's primary key and A2 is the set of its remaining attributes
.

Then the foreign key B1 represents the functional dependency
* * * * B1 --> A2,
which is the functional dependency across two relation I mentioned in
the first sentence.

Furthermore, through transitivity by the functional dependency K1 --
B1, the foreign key also represents the inter-relational functional
dependency
* * * * K1 --> A2.

Am I correct to say this?

Not really. Your observation that sometimes the inference rules are
the same for functional and inclusion dependencies is correct, but
unfortunately this is not true in general. For example, the
augmentation rule does not always hold for inclusion dependencies. In
fact, axiomatizing the combination of functional and inclusion
dependencies is a notoriously difficult problem and in the past there
has been intensive research on that subject.
I think my initial confusion came from my misunderstanding that
functional dependencies can be defined across relations.

However, after reading the definition more carefully, functional
dependency is only defined within a single relation.

Foreign keys, on the other hand, represent inter-relational
constraints. It takes on a different definition.

Consequently, they take on different inference rules, as you stated.

I apologize for my confusion. Especially to Brian Selzer. And thanks
for both yours and his corrections.

--

-kira



Reply With Quote
  #143  
Old   
Kira Yamato
 
Posts: n/a

Default Re: Foreign keys - 01-16-2008 , 06:22 PM



On 2008-01-16 17:37:02 -0500, Jan Hidders <hidders (AT) gmail (DOT) com> said:

Quote:
On 15 jan, 08:24, Kira Yamato <kira... (AT) earthlink (DOT) net> wrote:
On 2008-01-14 21:18:57 -0500, "Evan Keel" <evank... (AT) sbcglobal (DOT) net> said:

Always a physical issue. Never a theory issue.Agree?

Foreign keys are functional dependencies across two relations.

More specifically, let
* * * * R1(K1, A1, B1)
be a relation with attribute sets K1, A1 and B1 where K1 is R1's
primary key and B1 is a foreign key to the relation
* * * * R2(K2, A2)
where K2 is R2's primary key and A2 is the set of its remaining attributes
.

Then the foreign key B1 represents the functional dependency
* * * * B1 --> A2,
which is the functional dependency across two relation I mentioned in
the first sentence.

Furthermore, through transitivity by the functional dependency K1 --
B1, the foreign key also represents the inter-relational functional
dependency
* * * * K1 --> A2.

Am I correct to say this?

Not really. Your observation that sometimes the inference rules are
the same for functional and inclusion dependencies is correct, but
unfortunately this is not true in general. For example, the
augmentation rule does not always hold for inclusion dependencies. In
fact, axiomatizing the combination of functional and inclusion
dependencies is a notoriously difficult problem and in the past there
has been intensive research on that subject.
I think my initial confusion came from my misunderstanding that
functional dependencies can be defined across relations.

However, after reading the definition more carefully, functional
dependency is only defined within a single relation.

Foreign keys, on the other hand, represent inter-relational
constraints. It takes on a different definition.

Consequently, they take on different inference rules, as you stated.

I apologize for my confusion. Especially to Brian Selzer. And thanks
for both yours and his corrections.

--

-kira



Reply With Quote
  #144  
Old   
Kira Yamato
 
Posts: n/a

Default Re: Foreign keys - 01-16-2008 , 06:22 PM



On 2008-01-16 17:37:02 -0500, Jan Hidders <hidders (AT) gmail (DOT) com> said:

Quote:
On 15 jan, 08:24, Kira Yamato <kira... (AT) earthlink (DOT) net> wrote:
On 2008-01-14 21:18:57 -0500, "Evan Keel" <evank... (AT) sbcglobal (DOT) net> said:

Always a physical issue. Never a theory issue.Agree?

Foreign keys are functional dependencies across two relations.

More specifically, let
* * * * R1(K1, A1, B1)
be a relation with attribute sets K1, A1 and B1 where K1 is R1's
primary key and B1 is a foreign key to the relation
* * * * R2(K2, A2)
where K2 is R2's primary key and A2 is the set of its remaining attributes
.

Then the foreign key B1 represents the functional dependency
* * * * B1 --> A2,
which is the functional dependency across two relation I mentioned in
the first sentence.

Furthermore, through transitivity by the functional dependency K1 --
B1, the foreign key also represents the inter-relational functional
dependency
* * * * K1 --> A2.

Am I correct to say this?

Not really. Your observation that sometimes the inference rules are
the same for functional and inclusion dependencies is correct, but
unfortunately this is not true in general. For example, the
augmentation rule does not always hold for inclusion dependencies. In
fact, axiomatizing the combination of functional and inclusion
dependencies is a notoriously difficult problem and in the past there
has been intensive research on that subject.
I think my initial confusion came from my misunderstanding that
functional dependencies can be defined across relations.

However, after reading the definition more carefully, functional
dependency is only defined within a single relation.

Foreign keys, on the other hand, represent inter-relational
constraints. It takes on a different definition.

Consequently, they take on different inference rules, as you stated.

I apologize for my confusion. Especially to Brian Selzer. And thanks
for both yours and his corrections.

--

-kira



Reply With Quote
  #145  
Old   
Kira Yamato
 
Posts: n/a

Default Re: Foreign keys - 01-16-2008 , 06:22 PM



On 2008-01-16 17:37:02 -0500, Jan Hidders <hidders (AT) gmail (DOT) com> said:

Quote:
On 15 jan, 08:24, Kira Yamato <kira... (AT) earthlink (DOT) net> wrote:
On 2008-01-14 21:18:57 -0500, "Evan Keel" <evank... (AT) sbcglobal (DOT) net> said:

Always a physical issue. Never a theory issue.Agree?

Foreign keys are functional dependencies across two relations.

More specifically, let
* * * * R1(K1, A1, B1)
be a relation with attribute sets K1, A1 and B1 where K1 is R1's
primary key and B1 is a foreign key to the relation
* * * * R2(K2, A2)
where K2 is R2's primary key and A2 is the set of its remaining attributes
.

Then the foreign key B1 represents the functional dependency
* * * * B1 --> A2,
which is the functional dependency across two relation I mentioned in
the first sentence.

Furthermore, through transitivity by the functional dependency K1 --
B1, the foreign key also represents the inter-relational functional
dependency
* * * * K1 --> A2.

Am I correct to say this?

Not really. Your observation that sometimes the inference rules are
the same for functional and inclusion dependencies is correct, but
unfortunately this is not true in general. For example, the
augmentation rule does not always hold for inclusion dependencies. In
fact, axiomatizing the combination of functional and inclusion
dependencies is a notoriously difficult problem and in the past there
has been intensive research on that subject.
I think my initial confusion came from my misunderstanding that
functional dependencies can be defined across relations.

However, after reading the definition more carefully, functional
dependency is only defined within a single relation.

Foreign keys, on the other hand, represent inter-relational
constraints. It takes on a different definition.

Consequently, they take on different inference rules, as you stated.

I apologize for my confusion. Especially to Brian Selzer. And thanks
for both yours and his corrections.

--

-kira



Reply With Quote
  #146  
Old   
Evan Keel
 
Posts: n/a

Default Re: Foreign keys - 01-17-2008 , 10:08 AM




"Kira Yamato" <kirakun (AT) earthlink (DOT) net> wrote

Quote:
On 2008-01-14 21:18:57 -0500, "Evan Keel" <evankeel (AT) sbcglobal (DOT) net> said:

Always a physical issue. Never a theory issue.Agree?

Foreign keys are functional dependencies across two relations.

More specifically, let
R1(K1, A1, B1)
be a relation with attribute sets K1, A1 and B1 where K1 is R1's
primary key and B1 is a foreign key to the relation
R2(K2, A2)
where K2 is R2's primary key and A2 is the set of its remaining
attributes.

Then the foreign key B1 represents the functional dependency
B1 --> A2,
which is the functional dependency across two relation I mentioned in
the first sentence.

Furthermore, through transitivity by the functional dependency K1 --
B1, the foreign key also represents the inter-relational functional
dependency
K1 --> A2.

Am I correct to say this?

--

-kira

Not reading the whole thread (big mistake on my part), but how about the
instance where a foreign key can be null?. No functional dependecy but
legit.

Evan




Reply With Quote
  #147  
Old   
Evan Keel
 
Posts: n/a

Default Re: Foreign keys - 01-17-2008 , 10:08 AM




"Kira Yamato" <kirakun (AT) earthlink (DOT) net> wrote

Quote:
On 2008-01-14 21:18:57 -0500, "Evan Keel" <evankeel (AT) sbcglobal (DOT) net> said:

Always a physical issue. Never a theory issue.Agree?

Foreign keys are functional dependencies across two relations.

More specifically, let
R1(K1, A1, B1)
be a relation with attribute sets K1, A1 and B1 where K1 is R1's
primary key and B1 is a foreign key to the relation
R2(K2, A2)
where K2 is R2's primary key and A2 is the set of its remaining
attributes.

Then the foreign key B1 represents the functional dependency
B1 --> A2,
which is the functional dependency across two relation I mentioned in
the first sentence.

Furthermore, through transitivity by the functional dependency K1 --
B1, the foreign key also represents the inter-relational functional
dependency
K1 --> A2.

Am I correct to say this?

--

-kira

Not reading the whole thread (big mistake on my part), but how about the
instance where a foreign key can be null?. No functional dependecy but
legit.

Evan




Reply With Quote
  #148  
Old   
Evan Keel
 
Posts: n/a

Default Re: Foreign keys - 01-17-2008 , 10:08 AM




"Kira Yamato" <kirakun (AT) earthlink (DOT) net> wrote

Quote:
On 2008-01-14 21:18:57 -0500, "Evan Keel" <evankeel (AT) sbcglobal (DOT) net> said:

Always a physical issue. Never a theory issue.Agree?

Foreign keys are functional dependencies across two relations.

More specifically, let
R1(K1, A1, B1)
be a relation with attribute sets K1, A1 and B1 where K1 is R1's
primary key and B1 is a foreign key to the relation
R2(K2, A2)
where K2 is R2's primary key and A2 is the set of its remaining
attributes.

Then the foreign key B1 represents the functional dependency
B1 --> A2,
which is the functional dependency across two relation I mentioned in
the first sentence.

Furthermore, through transitivity by the functional dependency K1 --
B1, the foreign key also represents the inter-relational functional
dependency
K1 --> A2.

Am I correct to say this?

--

-kira

Not reading the whole thread (big mistake on my part), but how about the
instance where a foreign key can be null?. No functional dependecy but
legit.

Evan




Reply With Quote
  #149  
Old   
Evan Keel
 
Posts: n/a

Default Re: Foreign keys - 01-17-2008 , 10:08 AM




"Kira Yamato" <kirakun (AT) earthlink (DOT) net> wrote

Quote:
On 2008-01-14 21:18:57 -0500, "Evan Keel" <evankeel (AT) sbcglobal (DOT) net> said:

Always a physical issue. Never a theory issue.Agree?

Foreign keys are functional dependencies across two relations.

More specifically, let
R1(K1, A1, B1)
be a relation with attribute sets K1, A1 and B1 where K1 is R1's
primary key and B1 is a foreign key to the relation
R2(K2, A2)
where K2 is R2's primary key and A2 is the set of its remaining
attributes.

Then the foreign key B1 represents the functional dependency
B1 --> A2,
which is the functional dependency across two relation I mentioned in
the first sentence.

Furthermore, through transitivity by the functional dependency K1 --
B1, the foreign key also represents the inter-relational functional
dependency
K1 --> A2.

Am I correct to say this?

--

-kira

Not reading the whole thread (big mistake on my part), but how about the
instance where a foreign key can be null?. No functional dependecy but
legit.

Evan




Reply With Quote
  #150  
Old   
Evan Keel
 
Posts: n/a

Default Re: Foreign keys - 01-17-2008 , 10:08 AM




"Kira Yamato" <kirakun (AT) earthlink (DOT) net> wrote

Quote:
On 2008-01-14 21:18:57 -0500, "Evan Keel" <evankeel (AT) sbcglobal (DOT) net> said:

Always a physical issue. Never a theory issue.Agree?

Foreign keys are functional dependencies across two relations.

More specifically, let
R1(K1, A1, B1)
be a relation with attribute sets K1, A1 and B1 where K1 is R1's
primary key and B1 is a foreign key to the relation
R2(K2, A2)
where K2 is R2's primary key and A2 is the set of its remaining
attributes.

Then the foreign key B1 represents the functional dependency
B1 --> A2,
which is the functional dependency across two relation I mentioned in
the first sentence.

Furthermore, through transitivity by the functional dependency K1 --
B1, the foreign key also represents the inter-relational functional
dependency
K1 --> A2.

Am I correct to say this?

--

-kira

Not reading the whole thread (big mistake on my part), but how about the
instance where a foreign key can be null?. No functional dependecy but
legit.

Evan




Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.