![]() | |
#31
| |||
| |||
|
|
On 12 mei, 02:12, Bob Badour <bbad... (AT) pei (DOT) sympatico.ca> wrote: Doesn't everyone have a self Itching to wonder whether that depends on the meaning of the word "have" ... |
#32
| |||
| |||
|
|
Tegiri Nenashi wrote: |
|
My attempt onto formal HAS-A definition fails, because it follows that x HAS-A x for any relation x, while in the set theory x HAS-A x doesn't hold for at least some x... Doesn't everyone have a self? |
#33
| |||
| |||
|
|
On Tue, 11 May 2010 21:12:43 -0300, Bob Badour bbadour (AT) pei (DOT) sympatico.ca> wrote: Tegiri Nenashi wrote: [snip] My attempt onto formal HAS-A definition fails, because it follows that x HAS-A x for any relation x, while in the set theory x HAS-A x doesn't hold for at least some x... Doesn't everyone have a self? No. 1) I *am* a self. 2) I do not have any employees, keep slaves, etc. |
#34
| |||
| |||
|
|
On 12 mei, 00:30, Tegiri Nenashi <tegirinena... (AT) gmail (DOT) com> wrote: IMO there is a benchmark formal definition for both HAS-A and IS-A already. Both are set theory concepts: HAS-A = "element of" IS-A = "subset of" ... I'm not that sure about the HAS-A. Certainly, one can assert that a set of attributes has an attribute, but this is quite different from saying that a relation has an attribute. A relation has a body and a heading. *So a relation can be viewed as a set of two members, after which your formalism can be made to apply. And a heading is a set of attribute declarations. *So under the assumption of "has-a" being transitive, I have indeed made a relation "have an" attribute in the formal sense you spoke of. |
|
(PS - second problem, now that I'm on it : what if you disagree with the body-heading view of a relation, and want to insist that a relation _IS_ a set of tuples, i.e. it does _NOT_ "have" a heading in the foregoing sense, |
|
but rather the heading that it "has" is just a function of the body (e.g. projecting away the values from each member of the body to retain only the attribute names and the attribute types) ? *Then the "having" of something (e.g. an attribute) can also be a consequence of a function being applied to something else (the body). *In other words the "having" of something also applies if the "RHS" of your 'element-of' formal concept is in fact any arbitrary function applied to some set (just so long as that arbitrary function yields another set).). |
#35
| |||
| |||
|
|
Again, the IS-A case seems easier because we already have subset relationship defined for each pair of "attribute- compatible" relations. |
|
I'm not that sure about the HAS-A. |
|
In addition to that, the algebraic picture [which many of you are aware I'm promoting] tries to demote attributes from being first-class citizens of relational model... |
#36
| |||
| |||
|
|
On May 11, 5:19*pm, Erwin <e.sm... (AT) myonline (DOT) be> wrote: On 12 mei, 00:30, Tegiri Nenashi <tegirinena... (AT) gmail (DOT) com> wrote: IMO there is a benchmark formal definition for both HAS-A and IS-A already. Both are set theory concepts: HAS-A = "element of" IS-A = "subset of" ... I'm not that sure about the HAS-A. Certainly, one can assert that a set of attributes has an attribute, but this is quite different from saying that a relation has an attribute. A relation has a body and a heading. *So a relation can be viewed as a set of two members, after which your formalism can be made to apply. And a heading is a set of attribute declarations. *So under the assumption of "has-a" being transitive, I have indeed made a relation "have an" attribute in the formal sense you spoke of. Nope, if we aspire to cast HAS-A after set membership, then transitivity has to be sacrificed. (PS - second problem, now that I'm on it : what if you disagree with the body-heading view of a relation, and want to insist that a relation _IS_ a set of tuples, i.e. it does _NOT_ "have" a heading in the foregoing sense, If you exclude heading from relation, then how do you represent an empty relation? There is only one empty set, but multiple empty relations! |
|
but rather the heading that it "has" is just a function of the body (e.g. projecting away the values from each member of the body to retain only the attribute names and the attribute types) ? *Then the "having" of something (e.g. an attribute) can also be a consequence of a function being applied to something else (the body). *In other words the "having" of something also applies if the "RHS" of your 'element-of' formal concept is in fact any arbitrary function applied to some set (just so long as that arbitrary function yields another set).). I lost you there. The best course of actions in such circumstances to support your idea with an example |
#37
| |||
| |||
|
|
See for example "Applied mathematics for database professionals", which builds on the work from the authors' tutor, Bert De Brock. |
|
A body is a set of tuples. *Tuples themselves are a set of ordered triples (attributename, typename, value). *For a body to conform to the prescriptions of the RM, it is required that in each tuple appearing in the body, the set of attributename/typename pairs that appear in the tuple is the same. *That set of attributename/typename pairs is the heading. Now there is a view of relations that a relation 'has' both a body and a heading, and that the body 'must conform to' the "other component" of the relation, i.e. the heading. |
|
There is another view of relations in that a relation does not 'have' a heading as such. *With the consequence that "obtaining the heading" can only be achieved by "actually doing the heading extraction operation" on the body. That "heading extraction operation" consisting of taking each tuple, taking each attribute of such a tuple, "projecting away" the value from that attribute, retaining only {attributename typename}, adding that set to a pair to form the "tuple type" of the tuple under inspection, adding the tuple type so obtained to some set (the set of tuple types found in the body), and at the end verifying that that set is a singleton (and for the nitpickers : all of this is modulo type inheritance issues). |
#38
| |||
| |||
|
|
On May 12, 12:30*am, Tegiri Nenashi <tegirinena... (AT) gmail (DOT) com> wrote: Again, the IS-A case seems easier because we already have subset relationship defined for each pair of "attribute- compatible" relations. I consider x IS-A y as a relation named y with a unique constraint on x. *Your thoughts? |
|
I'm not that sure about the HAS-A. I consider x HAS-A y as a relation which includes attributes x and y. A unique constraint on y denotes aggregation, the lack of it association. |
|
In addition to that, the algebraic picture [which many of you are aware I'm promoting] tries to demote attributes from being first-class citizens of relational model... I know you often talk of relational lattices, which I still don't comprehend, nor do I understand what you mean here. *I would like to, if you care to promote your view to me. |
#39
| |||
| |||
|
|
On May 12, 4:31*am, Erwin <e.sm... (AT) myonline (DOT) be> wrote: See for example "Applied mathematics for database professionals", which builds on the work from the authors' tutor, Bert De Brock. Page#, please? |
|
In foreword Date & Darwen say that there is only one empty relation (when ignoring types). This indicates that by "empty relation" they meant something else, I suspect R00 (aka DUM). I thought standard definition for an empty relation requires it to have empty set of tuples only (with no constraint on the header). |
|
There is another view of relations in that a relation does not 'have' a heading as such. So how exactly is it done for an empty relation? There is no tuples! |
#40
| |||
| |||
|
|
On page 95, bottom paragraph of the section discussing "the definition of a table", we find for example : "Even the empty set is a table. *In fact, under Definition 5-1 (...), the empty set is a table over any set. *..." (Between brackets : the choice of the term "table" here is because the intended audience of the book is, first and foremost, SQL practitioners. *I'm quite sure that the authors knew what the better term is.) |
|
I suspect that the "multiple typed empty relations versus one single empty relation for all (relation) types" relates closely to whether the intent is to define a data manipulation language. *D&D have that intent, so they need assignment, so they need to address/resolve the issues caused by "one single empty relation for all types". *AM4DP does not have that intent (its prime intent is to define a database design specification language that has solid foundations in maths), so they don't run into things such as 'assignment' and 'compile-time type checking' and such. *So they can cleanly get away with the "one single empty relation for all relation types" position. |
![]() |
| Thread Tools | |
| Display Modes | |
| |