![]() | |
#21
| |||
| |||
|
|
"Tegiri Nenashi" <tegirinena... (AT) gmail (DOT) com> wrote in message news:0b2f71d0-34b5-4661-a8f6-21a40cdb9989 (AT) n37g2000prc (DOT) googlegroups.com... Given the two relations R and S, the R is a subtype of S or simply *"R is an S" (was this the source of Reinier blunder?-) iff the two conditions hold: 1. R ^ S = R *(where the ^ is natural join operation). This can be expressed succinctly as R < S with generalized subset constraint "<". The immediate consequence is that the attributes of S are the subset of attributes R (formally: R ^ [] < S ^ [] where the "[]" is the relation with empty set of attributes and empty set of tuples, aka DUM). Then, one may add second requirement that 2. Attributes of S form a key in relation R. My question is if the condition #2 is really necessary. Consider the two relations: Animals = [Name] * * * * * bear * * * * * sheep * * * * * wolf ; Carnivores1 = [Name FavoritePrey] * * * * * * *bear deer * * * * * * *wolf sheep ; They satisfy both conditions so that informally we say "Carnivores1" IS-A "Animals". Contrast this with Animals = [Name] * * * * * bear * * * * * sheep * * * * * wolf ; Carnivores2 = [Name Prey] * * * * * * *bear deer * * * * * * *wolf sheep * * * * * * *wolf deer ; I suggest that we still have "Carnivores2" IS-A "Animals". Do you agree? There is a problem here. *Which scheme is better? Employees{taxid,name,startdate} KEY{taxid}, ContractEmployees{taxid,name,startdate,enddate} KEY{taxid}, ContractEmployees[taxid,name,startdate] is a subset of * * Employees[taxid,name,startdate] or Employees{taxid,name,startdate} KEY{taxid}, ContractEmployees{taxid,enddate} KEY{taxid}, ContractEmployees[taxid] is a subset of Employees[taxid] Clearly the second scheme is equivalent to the first with respect to information content, so if a ContractEmployee is an Employee in the first scheme, then it must also be in the second, but in the second scheme, the set of attributes for Employees is not a subset of the set of attributes for ContractEmployees. *I think the effect of the foreign key constraint, namely, that the components of the referenced tuple are effectively 'included' with the referencing tuple, must be taken into account.- Tekstuit oorspronkelijk bericht niet weergeven - - Tekst uit oorspronkelijk bericht weergeven - |
#22
| |||
| |||
|
|
"Tegiri Nenashi" <tegirinena... (AT) gmail (DOT) com> wrote in message news:0b2f71d0-34b5-4661-a8f6-21a40cdb9989 (AT) n37g2000prc (DOT) googlegroups.com... Given the two relations R and S, the R is a subtype of S or simply "R is an S" (was this the source of Reinier blunder?-) iff the two conditions hold: 1. R ^ S = R (where the ^ is natural join operation). This can be expressed succinctly as R < S with generalized subset constraint "<". The immediate consequence is that the attributes of S are the subset of attributes R (formally: R ^ [] < S ^ [] where the "[]" is the relation with empty set of attributes and empty set of tuples, aka DUM). Then, one may add second requirement that 2. Attributes of S form a key in relation R. My question is if the condition #2 is really necessary. Consider the two relations: Animals = [Name] bear sheep wolf ; Carnivores1 = [Name FavoritePrey] bear deer wolf sheep ; They satisfy both conditions so that informally we say "Carnivores1" IS-A "Animals". Contrast this with Animals = [Name] bear sheep wolf ; Carnivores2 = [Name Prey] bear deer wolf sheep wolf deer ; I suggest that we still have "Carnivores2" IS-A "Animals". Do you agree? There is a problem here. Which scheme is better? Employees{taxid,name,startdate} KEY{taxid}, ContractEmployees{taxid,name,startdate,enddate} KEY{taxid}, ContractEmployees[taxid,name,startdate] is a subset of Employees[taxid,name,startdate] or Employees{taxid,name,startdate} KEY{taxid}, ContractEmployees{taxid,enddate} KEY{taxid}, ContractEmployees[taxid] is a subset of Employees[taxid] Clearly the second scheme is equivalent to the first with respect to information content, so if a ContractEmployee is an Employee in the first scheme, then it must also be in the second, but in the second scheme, the set of attributes for Employees is not a subset of the set of attributes for ContractEmployees. I think the effect of the foreign key constraint, namely, that the components of the referenced tuple are effectively 'included' with the referencing tuple, must be taken into account.- Tekst uit oorspronkelijk bericht niet weergeven - - Tekst uit oorspronkelijk bericht weergeven - |
|
QUOTE |
#23
| |||
| |||
|
|
QUOTE"Erwin" <e.sm... (AT) myonline (DOT) be> wrote in message news:9fc21a72-6865-4a73-9183-a897275b6fdf (AT) 37g2000yqm (DOT) googlegroups.com... On 6 mei, 09:00, "Mr. Scott" <do_not_re... (AT) noone (DOT) com> wrote: "Tegiri Nenashi" <tegirinena... (AT) gmail (DOT) com> wrote in message news:0b2f71d0-34b5-4661-a8f6-21a40cdb9989 (AT) n37g2000prc (DOT) googlegroups.com.... Given the two relations R and S, the R is a subtype of S or simply "R is an S" (was this the source of Reinier blunder?-) iff the two conditions hold: 1. R ^ S = R (where the ^ is natural join operation). This can be expressed succinctly as R < S with generalized subset constraint "<". The immediate consequence is that the attributes of S are the subset of attributes R (formally: R ^ [] < S ^ [] where the "[]" is the relation with empty set of attributes and empty set of tuples, aka DUM). Then, one may add second requirement that 2. Attributes of S form a key in relation R. My question is if the condition #2 is really necessary. Consider the two relations: Animals = [Name] bear sheep wolf ; Carnivores1 = [Name FavoritePrey] bear deer wolf sheep ; They satisfy both conditions so that informally we say "Carnivores1" IS-A "Animals". Contrast this with Animals = [Name] bear sheep wolf ; Carnivores2 = [Name Prey] bear deer wolf sheep wolf deer ; I suggest that we still have "Carnivores2" IS-A "Animals". Do you agree? There is a problem here. Which scheme is better? Employees{taxid,name,startdate} KEY{taxid}, ContractEmployees{taxid,name,startdate,enddate} KEY{taxid}, ContractEmployees[taxid,name,startdate] is a subset of Employees[taxid,name,startdate] or Employees{taxid,name,startdate} KEY{taxid}, ContractEmployees{taxid,enddate} KEY{taxid}, ContractEmployees[taxid] is a subset of Employees[taxid] Clearly the second scheme is equivalent to the first with respect to information content, so if a ContractEmployee is an Employee in the first scheme, then it must also be in the second, but in the second scheme, the set of attributes for Employees is not a subset of the set of attributes for ContractEmployees. I think the effect of the foreign key constraint, namely, that the components of the referenced tuple are effectively 'included' with the referencing tuple, must be taken into account.- Tekst uit oorspronkelijk bericht niet weergeven - - Tekst uit oorspronkelijk bericht weergeven - The first is a violation of BCNF. QUOTE No, it's not. *Both schemes are in BCNF. snip>- Tekst uit oorspronkelijk bericht niet weergeven - - Tekst uit oorspronkelijk bericht weergeven - |
|
{name,startdate} holds. And within ContractEmployees, the FD taxid->{name,startdate,enddate} |
#24
| |||
| |||
|
|
On 6 mei, 14:14, "Mr. Scott" <do_not_re... (AT) noone (DOT) com> wrote: QUOTE"Erwin" <e.sm... (AT) myonline (DOT) be> wrote in message news:9fc21a72-6865-4a73-9183-a897275b6fdf (AT) 37g2000yqm (DOT) googlegroups.com... On 6 mei, 09:00, "Mr. Scott" <do_not_re... (AT) noone (DOT) com> wrote: "Tegiri Nenashi" <tegirinena... (AT) gmail (DOT) com> wrote in message news:0b2f71d0-34b5-4661-a8f6-21a40cdb9989 (AT) n37g2000prc (DOT) googlegroups.com.... Given the two relations R and S, the R is a subtype of S or simply "R is an S" (was this the source of Reinier blunder?-) iff the two conditions hold: 1. R ^ S = R (where the ^ is natural join operation). This can be expressed succinctly as R < S with generalized subset constraint "<". The immediate consequence is that the attributes of S are the subset of attributes R (formally: R ^ [] < S ^ [] where the "[]" is the relation with empty set of attributes and empty set of tuples, aka DUM). Then, one may add second requirement that 2. Attributes of S form a key in relation R. My question is if the condition #2 is really necessary. Consider the two relations: Animals = [Name] bear sheep wolf ; Carnivores1 = [Name FavoritePrey] bear deer wolf sheep ; They satisfy both conditions so that informally we say "Carnivores1" IS-A "Animals". Contrast this with Animals = [Name] bear sheep wolf ; Carnivores2 = [Name Prey] bear deer wolf sheep wolf deer ; I suggest that we still have "Carnivores2" IS-A "Animals". Do you agree? There is a problem here. Which scheme is better? Employees{taxid,name,startdate} KEY{taxid}, ContractEmployees{taxid,name,startdate,enddate} KEY{taxid}, ContractEmployees[taxid,name,startdate] is a subset of Employees[taxid,name,startdate] or Employees{taxid,name,startdate} KEY{taxid}, ContractEmployees{taxid,enddate} KEY{taxid}, ContractEmployees[taxid] is a subset of Employees[taxid] Clearly the second scheme is equivalent to the first with respect to information content, so if a ContractEmployee is an Employee in the first scheme, then it must also be in the second, but in the second scheme,the set of attributes for Employees is not a subset of the set of attributes for ContractEmployees. I think the effect of the foreign key constraint, namely, that the components of the referenced tuple are effectively 'included' with the referencing tuple, must be taken into account.- Tekst uit oorspronkelijk bericht niet weergeven - - Tekst uit oorspronkelijk bericht weergeven - The first is a violation of BCNF. QUOTE No, it's not. *Both schemes are in BCNF. snip>- Tekst uit oorspronkelijk bericht niet weergeven - - Tekst uit oorspronkelijk bericht weergeven - OK. *Your example was this : Employees{taxid,name,startdate} KEY{taxid}, ContractEmployees{taxid,name,startdate,enddate} KEY{taxid}, ContractEmployees[taxid,name,startdate] is a subset of * * Employees[taxid,name,startdate] This tells me that within the Employees relvar, the FD taxid->{name,startdate} holds. And within ContractEmployees, the FD taxid->{name,startdate,enddate} holds. And the subset constraint tells me that the name and startdate associated with any given ContractEmployees.taxid must be equal to the name and startdate associated with the corresponding Employees.taxid. Meaning that those two attributes are redundant in ContractEmployees. Not a violation of BCNF ? *My foot.- Tekst uit oorspronkelijk bericht niet weergeven - - Tekst uit oorspronkelijk bericht weergeven - |
#25
| |||
| |||
|
|
QUOTE"Erwin" <e.sm... (AT) myonline (DOT) be> wrote in message news:9fc21a72-6865-4a73-9183-a897275b6fdf (AT) 37g2000yqm (DOT) googlegroups.com... On 6 mei, 09:00, "Mr. Scott" <do_not_re... (AT) noone (DOT) com> wrote: "Tegiri Nenashi" <tegirinena... (AT) gmail (DOT) com> wrote in message news:0b2f71d0-34b5-4661-a8f6-21a40cdb9989 (AT) n37g2000prc (DOT) googlegroups.com... Given the two relations R and S, the R is a subtype of S or simply "R is an S" (was this the source of Reinier blunder?-) iff the two conditions hold: 1. R ^ S = R (where the ^ is natural join operation). This can be expressed succinctly as R < S with generalized subset constraint "<". The immediate consequence is that the attributes of S are the subset of attributes R (formally: R ^ [] < S ^ [] where the "[]" is the relation with empty set of attributes and empty set of tuples, aka DUM). Then, one may add second requirement that 2. Attributes of S form a key in relation R. My question is if the condition #2 is really necessary. Consider the two relations: Animals = [Name] bear sheep wolf ; Carnivores1 = [Name FavoritePrey] bear deer wolf sheep ; They satisfy both conditions so that informally we say "Carnivores1" IS-A "Animals". Contrast this with Animals = [Name] bear sheep wolf ; Carnivores2 = [Name Prey] bear deer wolf sheep wolf deer ; I suggest that we still have "Carnivores2" IS-A "Animals". Do you agree? There is a problem here. Which scheme is better? Employees{taxid,name,startdate} KEY{taxid}, ContractEmployees{taxid,name,startdate,enddate} KEY{taxid}, ContractEmployees[taxid,name,startdate] is a subset of Employees[taxid,name,startdate] or Employees{taxid,name,startdate} KEY{taxid}, ContractEmployees{taxid,enddate} KEY{taxid}, ContractEmployees[taxid] is a subset of Employees[taxid] Clearly the second scheme is equivalent to the first with respect to information content, so if a ContractEmployee is an Employee in the first scheme, then it must also be in the second, but in the second scheme, the set of attributes for Employees is not a subset of the set of attributes for ContractEmployees. I think the effect of the foreign key constraint, namely, that the components of the referenced tuple are effectively 'included' with the referencing tuple, must be taken into account.- Tekst uit oorspronkelijk bericht niet weergeven - - Tekst uit oorspronkelijk bericht weergeven - The first is a violation of BCNF. QUOTE No, it's not. Both schemes are in BCNF. snip>- Tekst uit oorspronkelijk bericht niet weergeven - - Tekst uit oorspronkelijk bericht weergeven - |
|
{name,startdate} holds. And within ContractEmployees, the FD taxid->{name,startdate,enddate} |
|
QUOTE |
#26
| |||
| |||
|
|
On 6 mei, 14:14, "Mr. Scott" <do_not_re... (AT) noone (DOT) com> wrote: QUOTE"Erwin" <e.sm... (AT) myonline (DOT) be> wrote in message news:9fc21a72-6865-4a73-9183-a897275b6fdf (AT) 37g2000yqm (DOT) googlegroups.com... On 6 mei, 09:00, "Mr. Scott" <do_not_re... (AT) noone (DOT) com> wrote: "Tegiri Nenashi" <tegirinena... (AT) gmail (DOT) com> wrote in message news:0b2f71d0-34b5-4661-a8f6-21a40cdb9989 (AT) n37g2000prc (DOT) googlegroups.com... Given the two relations R and S, the R is a subtype of S or simply "R is an S" (was this the source of Reinier blunder?-) iff the two conditions hold: 1. R ^ S = R (where the ^ is natural join operation). This can be expressed succinctly as R < S with generalized subset constraint "<". The immediate consequence is that the attributes of S are the subset of attributes R (formally: R ^ [] < S ^ [] where the "[]" is the relation with empty set of attributes and empty set of tuples, aka DUM). Then, one may add second requirement that 2. Attributes of S form a key in relation R. My question is if the condition #2 is really necessary. Consider the two relations: Animals = [Name] bear sheep wolf ; Carnivores1 = [Name FavoritePrey] bear deer wolf sheep ; They satisfy both conditions so that informally we say "Carnivores1" IS-A "Animals". Contrast this with Animals = [Name] bear sheep wolf ; Carnivores2 = [Name Prey] bear deer wolf sheep wolf deer ; I suggest that we still have "Carnivores2" IS-A "Animals". Do you agree? There is a problem here. Which scheme is better? Employees{taxid,name,startdate} KEY{taxid}, ContractEmployees{taxid,name,startdate,enddate} KEY{taxid}, ContractEmployees[taxid,name,startdate] is a subset of Employees[taxid,name,startdate] or Employees{taxid,name,startdate} KEY{taxid}, ContractEmployees{taxid,enddate} KEY{taxid}, ContractEmployees[taxid] is a subset of Employees[taxid] Clearly the second scheme is equivalent to the first with respect to information content, so if a ContractEmployee is an Employee in the first scheme, then it must also be in the second, but in the second scheme, the set of attributes for Employees is not a subset of the set of attributes for ContractEmployees. I think the effect of the foreign key constraint, namely, that the components of the referenced tuple are effectively 'included' with the referencing tuple, must be taken into account.- Tekst uit oorspronkelijk bericht niet weergeven - - Tekst uit oorspronkelijk bericht weergeven - The first is a violation of BCNF. QUOTE No, it's not. Both schemes are in BCNF. snip>- Tekst uit oorspronkelijk bericht niet weergeven - - Tekst uit oorspronkelijk bericht weergeven - OK. Your example was this : Employees{taxid,name,startdate} KEY{taxid}, ContractEmployees{taxid,name,startdate,enddate} KEY{taxid}, ContractEmployees[taxid,name,startdate] is a subset of Employees[taxid,name,startdate] This tells me that within the Employees relvar, the FD taxid->{name,startdate} holds. And within ContractEmployees, the FD taxid->{name,startdate,enddate} holds. And the subset constraint tells me that the name and startdate associated with any given ContractEmployees.taxid must be equal to the name and startdate associated with the corresponding Employees.taxid. Meaning that those two attributes are redundant in ContractEmployees. Not a violation of BCNF ? My foot.- Tekst uit oorspronkelijk bericht niet weergeven - - Tekst uit oorspronkelijk bericht weergeven - |
|
QUOTE |
#27
| ||||
| ||||
|
|
On 5 mei, 22:56, Tegiri Nenashi <tegirinena... (AT) gmail (DOT) com> wrote: On May 5, 12:41*pm, Erwin <e.sm... (AT) myonline (DOT) be> wrote: ... Not in the same sense that relation algebra prevents graph databases because relation algebra does not understand graphs. This is very imprecise statement. I'll embark upon your typo and suggest that relation algebra (http://en.wikipedia.org/wiki/ Relation_algebra) does exactly that. It manipulates binary relations that are essentially adjacency matrices representing direct acyclic graphs. Yes. *And I know about transitive closure and the concept of generalized transitive closure too, thank you. |
|
... the IP is the single one principle that "proves" (note the quotes) (a) that the relational model can be used to represent _ANY_ information, iow that the relational model has a certain quality of "completeness", and (b) that it allows a simpler form of manipulation than would be possible in any model that is based on some type of "graph algebra". |
|
Another small point is that there is a school of thought which says something about a connection between relation algebra and first order |
|
logic, thereby excluding transitive closure as a possible operator of RA because transitive closure requires recursion and recursion is excluded by FOL. *I don't really understand their point, or why they are trying to make that point, because imo (generalized) transitive closure is a sine qua non for "expressive completeness". *Without transitive closure, certain queries are provably unanswerable, and so TC is needed. *I find that statement about the link with FOL rather vacuous for that reason. |
#28
| |||
| |||
|
|
"Tegiri Nenashi" <tegirinena... (AT) gmail (DOT) com> wrote in message news:0b2f71d0-34b5-4661-a8f6-21a40cdb9989 (AT) n37g2000prc (DOT) googlegroups.com... Given the two relations R and S, the R is a subtype of S or simply *"R is an S" (was this the source of Reinier blunder?-) iff the two conditions hold: 1. R ^ S = R *(where the ^ is natural join operation). This can be expressed succinctly as R < S with generalized subset constraint "<". The immediate consequence is that the attributes of S are the subset of attributes R (formally: R ^ [] < S ^ [] where the "[]" is the relation with empty set of attributes and empty set of tuples, aka DUM). Then, one may add second requirement that 2. Attributes of S form a key in relation R. My question is if the condition #2 is really necessary. Consider the two relations: Animals = [Name] * * * * * bear * * * * * sheep * * * * * wolf ; Carnivores1 = [Name FavoritePrey] * * * * * * *bear deer * * * * * * *wolf sheep ; They satisfy both conditions so that informally we say "Carnivores1" IS-A "Animals". Contrast this with Animals = [Name] * * * * * bear * * * * * sheep * * * * * wolf ; Carnivores2 = [Name Prey] * * * * * * *bear deer * * * * * * *wolf sheep * * * * * * *wolf deer ; I suggest that we still have "Carnivores2" IS-A "Animals". Do you agree? There is a problem here. *Which scheme is better? Employees{taxid,name,startdate} KEY{taxid}, ContractEmployees{taxid,name,startdate,enddate} KEY{taxid}, ContractEmployees[taxid,name,startdate] is a subset of * * Employees[taxid,name,startdate] or Employees{taxid,name,startdate} KEY{taxid}, ContractEmployees{taxid,enddate} KEY{taxid}, ContractEmployees[taxid] is a subset of Employees[taxid] Clearly the second scheme is equivalent to the first with respect to information content, so if a ContractEmployee is an Employee in the first scheme, then it must also be in the second, but in the second scheme, the set of attributes for Employees is not a subset of the set of attributes for ContractEmployees. *I think the effect of the foreign key constraint, namely, that the components of the referenced tuple are effectively 'included' with the referencing tuple, must be taken into account. |
#29
| |||
| |||
|
|
Bob Badour wrote: Reinier Post wrote: |
|
I thought Clinton settled this whole issue already. Cigar anyone? I think Clinton knew his silly language parsing didn't matter to the majority of his (semi-literate) public. What puzzles me is why smart people here spend time on such subjective fooferah and never bring up, say, just what the Information Principle really means. |
#30
| ||||
| ||||
|
|
On May 6, 1:39*am, Erwin <e.sm... (AT) myonline (DOT) be> wrote: On 5 mei, 22:56, Tegiri Nenashi <tegirinena... (AT) gmail (DOT) com> wrote: On May 5, 12:41*pm, Erwin <e.sm... (AT) myonline (DOT) be> wrote: I was referring to deMorgan/Peirce/Tarski relation algebra, which has nothing to do with relational algebra. Kleene star is a natural operation for the former, while its reincarnation in relational model in the form of Transitive Closure looks like an afterthought. It is not even total. |
|
I was implying that relation algebras are perfect abstractions for modeling graphs. Relational model? Hardly. |
|
Again, my impression is that transitive closure doesn't fit into relational model. |
|
As far as Information principle is concerned, here is my attitude: "Relational algebras should be defined with purely equational postulates". Removing the suffix "al" in the first word, this is literally the same how Tarski put it. |
![]() |
| Thread Tools | |
| Display Modes | |
| |