![]() | |
#41
| |||
| |||
|
|
"Erwin" <e.sm... (AT) myonline (DOT) be> wrote in message news:88f215e4-8651-44cb-8d58-07b8dbea4a08 (AT) 37g2000yqm (DOT) googlegroups.com... On 6 mei, 14:51, Erwin <e.sm... (AT) myonline (DOT) be> wrote: 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 Or let me put it differently. If it is indeed true that the given example satisfies BCNF, then I must conclude that normalization as the-formal-method-as-we-know-it, fails to detect and eliminate this kind of redundancy. And if normalization as a formal method fails to detect and eliminate this kind of redundancy, then it is pretty darn useless and we can just as well stop teaching it. QUOTE Well that argument is just plain stupid. Should you stop wearing your seatbelt just because some collisions are so severe that people are seriously injured or die even though they are wearing one?- Tekst uit oorspronkelijk bericht niet weergeven - - Tekst uit oorspronkelijk bericht weergeven - |
|
QUOTE |
#42
| |||
| |||
|
|
"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. |
|
QUOTE |
#43
| |||
| |||
|
|
David BL wrote: On May 6, 9:10 pm, Bob Badour <bbad... (AT) pei (DOT) sympatico.ca> wrote: If one is interested specifically in subtypes of supertypes, a proper subset of a type with a proper superset of operations is a proper subtype of that type. Thus, circle values are a subtype of ellipse values and ellipse variables are a subtype of circle variables. There is no subtype relationship between ellipse variables and circle variables (in either direction). Consider a procedure in an imperative language that is passed a reference to a circle variable. Most generally the variable can be used as an "in-out" parameter, meaning that the variable is both read and written by the procedure. An ellipse variable can only be substituted for out-parameters. Ellipse variables are a proper subset of the variables where one might store a circle, |
|
It has a proper superset of the operations permitted for circle variables allowing one to also store a non-circular ellipse values. Saying that one cannot apply circle value operations to ellipse variables demonstrates nothing more than a confusion between values and variables. One can apply all circle variable operations to ellipse variables. |
#44
| |||
| |||
|
|
On May 7, 9:20 am, Bob Badour <bbad... (AT) pei (DOT) sympatico.ca> wrote: David BL wrote: On May 6, 9:10 pm, Bob Badour <bbad... (AT) pei (DOT) sympatico.ca> wrote: If one is interested specifically in subtypes of supertypes, a proper subset of a type with a proper superset of operations is a proper subtype of that type. Thus, circle values are a subtype of ellipse values and ellipse variables are a subtype of circle variables. There is no subtype relationship between ellipse variables and circle variables (in either direction). Consider a procedure in an imperative language that is passed a reference to a circle variable. Most generally the variable can be used as an "in-out" parameter, meaning that the variable is both read and written by the procedure. An ellipse variable can only be substituted for out-parameters. Ellipse variables are a proper subset of the variables where one might store a circle, Elements of sets are values, never variables. |
|
You cannot talk about subset relationships between sets of variables because there is no such thing as a set of variables. |
|
It has a proper superset of the operations permitted for circle variables allowing one to also store a non-circular ellipse values. Saying that one cannot apply circle value operations to ellipse variables demonstrates nothing more than a confusion between values and variables. One can apply all circle variable operations to ellipse variables. It's not clear to me what is meant exactly by an "operation" that acts on variables instead of values. I would rather use the term "procedure" to avoid confusion with operators in algebraic systems. |
#45
| ||||
| ||||
|
|
OK. *Now I see what you meant by "that typo of mine". *It wasn't a typo. *I deliberately used the term "relation algebra" to denote any algebra that operates on relations. *I did try to follow the link you gave, but it produced an http 404, or some such. |
|
I know an algebra is nothing more than just a set of operators, so I understand that anyone can define any algebra he(/she) likes (I also understand why it takes an extremely bright mind to define one that turns out to be useful), I am even aware of the consequences to the extent that I have written myself in several places that "there is no such thing as _the_ relational algebra", but I do not know how many relation(al) algebras have been defined, let alone that I would know the details of all of them. |
|
I was implying that relation algebras are perfect abstractions for modeling graphs. Relational model? Hardly. Are you suggesting that even with generalized transitive closure being included in the RM, there are still certain graph things that are impossible to do with the RM ? |
|
Again, my impression is that transitive closure doesn't fit into relational model. I have seen the comment that "TC was added to the RA in an ad-hoc fashion after the unanswerability of some queries with Codd's algebra was proved.". *I think I also understand how the formulation/ definition of the generalized version of TC was much the same kind of response when it was proved that even with "regular" TC, queries such as "how many distinct paths exist between a and b" were still unanswerable. *But does that warrant the conclusion that "(G)TC doesn't fit" ? *I'm hesitant to answer that with a "yes". |
#46
| |||
| |||
|
|
David BL wrote: On May 7, 9:20 am, Bob Badour <bbad... (AT) pei (DOT) sympatico.ca> wrote: David BL wrote: On May 6, 9:10 pm, Bob Badour <bbad... (AT) pei (DOT) sympatico.ca> wrote: If one is interested specifically in subtypes of supertypes, a proper subset of a type with a proper superset of operations is a proper subtype of that type. Thus, circle values are a subtype of ellipse values and ellipse variables are a subtype of circle variables. There is no subtype relationship between ellipse variables and circle variables (in either direction). Consider a procedure in an imperative language that is passed a reference to a circle variable. Most generally the variable can be used as an "in-out" parameter, meaning that the variable is both read and written by the procedure. An ellipse variable can only be substituted for out-parameters. Ellipse variables are a proper subset of the variables where one might store a circle, Elements of sets are values, never variables. I am unfamiliar with any restrictions on what goes in sets. |
|
You cannot talk about subset relationships between sets of variables because there is no such thing as a set of variables. Of course there is. Suppose I have a set of 3 variables and a dog { a, b, c, Rosie } ... |
|
It has a proper superset of the operations permitted for circle variables allowing one to also store a non-circular ellipse values. Saying that one cannot apply circle value operations to ellipse variables demonstrates nothing more than a confusion between values and variables. One can apply all circle variable operations to ellipse variables. It's not clear to me what is meant exactly by an "operation" that acts on variables instead of values. I would rather use the term "procedure" to avoid confusion with operators in algebraic systems. Operation is well-defined both for procedural and declarative languages. Operators are symbols that denote operations per the ISO/IEC 2382 standard vocabularies. |
#47
| |||
| |||
|
|
I am unfamiliar with any restrictions on what goes in sets. |
|
Values are immutable. |
#48
| |||
| |||
|
|
On May 7, 9:36 pm, Bob Badour <bbad... (AT) pei (DOT) sympatico.ca> wrote: David BL wrote: On May 7, 9:20 am, Bob Badour <bbad... (AT) pei (DOT) sympatico.ca> wrote: David BL wrote: On May 6, 9:10 pm, Bob Badour <bbad... (AT) pei (DOT) sympatico.ca> wrote: If one is interested specifically in subtypes of supertypes, a proper subset of a type with a proper superset of operations is a proper subtype of that type. Thus, circle values are a subtype of ellipse values and ellipse variables are a subtype of circle variables. There is no subtype relationship between ellipse variables and circle variables (in either direction). Consider a procedure in an imperative language that is passed a reference to a circle variable. Most generally the variable can be used as an "in-out" parameter, meaning that the variable is both read and written by the procedure. An ellipse variable can only be substituted for out-parameters. Ellipse variables are a proper subset of the variables where one might store a circle, Elements of sets are values, never variables. I am unfamiliar with any restrictions on what goes in sets. Values are immutable. Variables accessed by imperative programs are usually mutable. |
|
You cannot talk about subset relationships between sets of variables because there is no such thing as a set of variables. Of course there is. Suppose I have a set of 3 variables and a dog { a, b, c, Rosie } ... No, that is not allowed. A dog is not a value. |
|
It has a proper superset of the operations permitted for circle variables allowing one to also store a non-circular ellipse values. Saying that one cannot apply circle value operations to ellipse variables demonstrates nothing more than a confusion between values and variables. One can apply all circle variable operations to ellipse variables. It's not clear to me what is meant exactly by an "operation" that acts on variables instead of values. I would rather use the term "procedure" to avoid confusion with operators in algebraic systems. Operation is well-defined both for procedural and declarative languages. Operators are symbols that denote operations per the ISO/IEC 2382 standard vocabularies. Yes I agree that an operator is a symbol. What exactly does it mean to "denote an operation"? So what does "operation" mean? |
#49
| |||
| |||
|
|
I am unfamiliar with any restrictions on what goes in sets. Values are immutable. If I may be so bold as to interject my two cents : I suspect you two are talking past one another. |
#50
| |||
| |||
|
|
Values are immutable. *Variables accessed by imperative programs are usually mutable. *Sets are values. *If a set contained a variable then it wouldn't be immutable. |
![]() |
| Thread Tools | |
| Display Modes | |
| |