![]() | |
#11
| |||
| |||
|
|
Vadim Tropashko wrote: On Apr 19, 1:06*pm, r... (AT) raampje (DOT) lan (Reinier Post) wrote: ... "is a" does have a simple, useful and consistent definition for the relational model: for relvars R, S, we can write * R is a S as a shorthand for: * + all attributes of S are attributes of R; * + those attributes are a (possibly super)key of R, and * + R projected on those attributes is always a subset of S. *... Are you saying "R is a S" is eqivalent to "R join S = R"? Hmmm ... that seems a nice shorthand for the first and third clause, but it doesn't imply the second one. |
#12
| |||||
| |||||
|
|
On Apr 20, 3:03*pm, r... (AT) raampje (DOT) lan (Reinier Post) wrote: Vadim Tropashko wrote: On Apr 19, 1:06*pm, r... (AT) raampje (DOT) lan (Reinier Post) wrote: ... "is a" does have a simple, useful and consistent definition for the relational model: for relvars R, S, we can write * R is a S as a shorthand for: * + all attributes of S are attributes of R; * + those attributes are a (possibly super)key of R, and * + R projected on those attributes is always a subset of S. *... Are you saying "R is a S" is eqivalent to "R join S = R"? Hmmm ... that seems a nice shorthand for the first and third clause, but it doesn't imply the second one. |
|
Well, let's approach this question from math perspective. I suggest the "is a" is some [partial] order between a pair of relations, so it has to honor 3 laws: R < R R < S & S < R -> R = S R < S & S < T -> R < T One can prove that the order defined via join satisfies all them. The first one follows from join idempotence, R ^ R = R the second one from join symmetry, R ^ S = S ^ Y |
|
and the third one from join associativity given: 1. R ^ S = R 2, S ^ T = S ------------ R ^ T = (R ^ S) ^ T = R ^ (S ^ T) = R ^ S = R There are two more idempotent symmetric relational algebra operations (one is D&D <AND>) that give rize to some other order relations. |
|
However, there is the strong reason to suspect that the order defined by join is the most important one (and, therefore, is candidate to represent "is a"). This is because the order introduced via generalized union (or relational algebra projection) coinsides it! |
|
So, you are suggesting that your definition gives rize to yet another order relation? Can you prove its three defining properties?- Hide quotedtext - |
#13
| ||||
| ||||
|
|
On Apr 20, 3:03*pm, r... (AT) raampje (DOT) lan (Reinier Post) wrote: Vadim Tropashko wrote: Are you saying "R is a S" is eqivalent to "R join S = R"? Hmmm ... that seems a nice shorthand for the first and third clause, but it doesn't imply the second one. Well, let's approach this question from math perspective. I suggest the "is a" is some [partial] order between a pair of relations, so it has to honor 3 laws: R < R R < S & S < R -> R = S R < S & S < T -> R < T One can prove that the order defined via join satisfies all them. |
|
However, there is the strong reason to suspect that the order defined by join is the most important one (and, therefore, is candidate to represent "is a"). This is because the order introduced via generalized union (or relational algebra projection) coinsides it! |
|
So, you are suggesting that your definition gives rize to yet another order relation? Can you prove its three defining properties? |
#14
| |||
| |||
|
|
Vadim Tropashko wrote: [I've removed some empty lines] On Apr 20, 3:03*pm, r... (AT) raampje (DOT) lan (Reinier Post) wrote: Vadim Tropashko wrote: Are you saying "R is a S" is eqivalent to "R join S = R"? Hmmm ... that seems a nice shorthand for the first and third clause, but it doesn't imply the second one. Well, let's approach this question from math perspective. I suggest the "is a" is some [partial] order between a pair of relations, so it has to honor 3 laws: R < R R < S & S < R -> R = S R < S & S < T -> R < T One can prove that the order defined via join satisfies all them. Certainly. *But these properties don't uniquely determine the order. I haven't checked it, but I bet the definition obtained by adding the second clause satisfies them as well. [...] However, there is the strong reason to suspect that the order defined by join is the most important one (and, therefore, is candidate to represent "is a"). This is because the order introduced via generalized union (or relational algebra projection) coinsides it! Not strong enough. *Without the second clause, you're talking about aggregation, or in Silberschatz et al.'s terms, a weak entity: an entity (the "whole") being used to identify another (the "part"). The "is a" relationship is more restricted in that the "whole"-"part" relationship is one-to-at-most-one. So, you are suggesting that your definition gives rize to yet another order relation? Can you prove its three defining properties? I gave the three defining properties. I'm not sure why you're asking for an alternative. |
#15
| |||
| |||
|
|
[...] More importantly, I don't quite follow your definition. Suppose you have two relations Circles = [centerX centerY radius] 0 0 10 10 0 20 ; Ellipses = [centerX centerY axisX axisY] 0 0 10 10 10 0 20 20 0 10 10 50 ; these don't match your definition. |
|
Or perhaps you want to correct the "radius" attribute name to match say "axisX", then I still fail to see how it would match your definition. |
#16
| |||
| |||
|
|
It wouldn't. Remove radius from Circles or add it to Elliupses, and these two particular instances will match, but in general it still won't be a case of "is-a" because in general, the same Circle may correspond to different Ellipses, which my second clause forbids. |
#17
| |||
| |||
|
|
Tegiri Nenashi wrote: [...] More importantly, I don't quite follow your definition. Suppose you have two relations Circles = [centerX centerY radius] * * * * * *0 * * * *0 * * * 10 * * * * * *10 * * *0 * * * 20 ; Ellipses = [centerX centerY axisX axisY] * * * * * *0 * * * *0 * * * 10 * * * 10 * * * * * *10 * * *0 * * * 20 * * * 20 * * * * * *0 * * * 10 * * *10 * * * 50 ; these don't match your definition. True. Or perhaps you want to correct the "radius" attribute name to match say "axisX", then I still fail to see how it would match your definition. It wouldn't. *Remove radius from Circles or add it to Elliupses, and these two particular instances will match, but in general it still won't be a case of "is-a" because in general, the same Circle may correspond to different Ellipses, which my second clause forbids. I also gave the rationale for restricting "is a" in this way: it doesn't involve any reasoning about domain values. (Except reasoning involving equality.) I didn't invent this notion of "is a", I have it from a textbook and I believe it is pretty standard. |
#18
| ||||
| ||||
|
|
On Apr 23, 3:27*pm, r... (AT) raampje (DOT) lan (Reinier Post) wrote: |
|
I didn't invent this notion of "is a", I have it from a textbook and I believe it is pretty standard. I still don't follow. First, let's reiterate that we are considering the case when both relations have different set of attributes: if attribute set is the same, then subtyping is trivially subset relation. In a way we are after generalization of subset onto arbitrary pair of relations. |
|
Again, I have a problem with Circles and Ellipses. First, if one removes the Radius attribute from a circle, then it becomes a Point! |
|
Second, why would I add redundant attributes to a Circle? If the idea is to make both relations to have the same set of attributes, then we go back to the previous paragraph: I'm interested to see a convincing example of two relations with different sets of attributes that fits your definition. |
#19
| |||
| |||
|
|
Tegiri Nenashi wrote: Second, why would I add redundant attributes to a Circle? If the idea is to make both relations to have the same set of attributes, then we go back to the previous paragraph: I'm interested to see a convincing example of two relations with different sets of attributes that fits your definition. Person: first name, last name, date of birth Citizen: first name, last name, date of birth, country of citizenship I've done some student instructions with that textbook and I still use the same ER modelling technique for myself; I've noticed that this is-a comes up pretty often, and that it is helpful, i.e. many |
|
modelling errors I see can be explained in terms of "is-a being overlooked" or "is-a being modeled incorrectly". It is also fairly common in tools. |
#20
| |||
| |||
|
|
On Apr 25, 3:02 pm, r... (AT) raampje (DOT) lan (Reinier Post) wrote: Tegiri Nenashi wrote: Second, why would I add redundant attributes to a Circle? If the idea is to make both relations to have the same set of attributes, then we go back to the previous paragraph: I'm interested to see a convincing example of two relations with different sets of attributes that fits your definition. * Person: first name, last name, date of birth * Citizen: first name, last name, date of birth, country of citizenship I've done some student instructions with that textbook and I still use the same ER modelling technique for myself; I've noticed that this is-a comes up pretty often, and that it is helpful, i.e. many Does "is-a" come up because it follows naturally from the design process? Or does it come up the same way that Object Oriented comes up these days in programming discussions ie being shoe-horned into the conversation whether needed or not? How is this is-a concept "helpful" as you claim? For example, I can't imagine myself every creating a database with the separate Person and Citizen tables above. modelling errors I see can be explained in terms of "is-a being overlooked" or "is-a being modeled incorrectly". *It is also fairly common in tools. And what happens if we simply banish "is-a" from our thinking and vocabulary entirely? Are those modelling errors eliminated? What do we lose by sacrificing this hierarchical notion? |
![]() |
| Thread Tools | |
| Display Modes | |
| |