dbTalk Databases Forums  

On formal HAS-A definition

comp.databases.theory comp.databases.theory


Discuss On formal HAS-A definition in the comp.databases.theory forum.



Reply
 
Thread Tools Display Modes
  #31  
Old   
Bob Badour
 
Posts: n/a

Default Re: On formal HAS-A definition - 05-11-2010 , 08:39 PM






Erwin wrote:

Quote:
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" ...
I think the correct phraseology is: That depends on the meaning has has.

Reply With Quote
  #32  
Old   
Gene Wirchenko
 
Posts: n/a

Default Re: On formal HAS-A definition - 05-11-2010 , 10:26 PM






On Tue, 11 May 2010 21:12:43 -0300, Bob Badour
<bbadour (AT) pei (DOT) sympatico.ca> wrote:

Quote:
Tegiri Nenashi wrote:
[snip]

Quote:
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.

Sincerely,

Gene Wirchenko

Reply With Quote
  #33  
Old   
Bob Badour
 
Posts: n/a

Default Re: On formal HAS-A definition - 05-12-2010 , 12:01 AM



Gene Wirchenko wrote:

Quote:
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.
In other words, both operations have the same identity element.

Reply With Quote
  #34  
Old   
Tegiri Nenashi
 
Posts: n/a

Default Re: On formal HAS-A definition - 05-12-2010 , 12:14 AM



On May 11, 5:19*pm, Erwin <e.sm... (AT) myonline (DOT) be> wrote:
Quote:
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.

Quote:
(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!

Quote:
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.

Reply With Quote
  #35  
Old   
Nilone
 
Posts: n/a

Default Re: On formal HAS-A definition - 05-12-2010 , 03:53 AM



On May 12, 12:30*am, Tegiri Nenashi <tegirinena... (AT) gmail (DOT) com> wrote:
Quote:
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?

Quote:
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.

Quote:
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.

Reply With Quote
  #36  
Old   
Erwin
 
Posts: n/a

Default Re: On formal HAS-A definition - 05-12-2010 , 07:31 AM



On 12 mei, 06:14, Tegiri Nenashi <tegirinena... (AT) gmail (DOT) com> wrote:
Quote:
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!
There is no universal agreement on that. See for example "Applied
mathematics for database professionals", which builds on the work from
the authors' tutor, Bert De Brock.

Quote:
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
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).

Doing that really is "applying some function to the body", no ?

But actually, I don't think it matters much any more because of your
statement about having to accept non-transitivity.

Reply With Quote
  #37  
Old   
Tegiri Nenashi
 
Posts: n/a

Default Re: On formal HAS-A definition - 05-12-2010 , 12:12 PM



On May 12, 4:31*am, Erwin <e.sm... (AT) myonline (DOT) be> wrote:
Quote:
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).

BTW, here is algebraic characterization of an empty relation x

x < R00

that is

x ^ R00 = x

Quote:
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.
I support it. Here is algebraic characterization (Fundamental
Decomposition Identity)

x = (x ^ R00) v (x ^ R11)

We can interpret relation x as being [generalized] union of the two
parts: the header -- x ^ R00 -- that is relation with empty content,
and the body -- x ^ R11 -- which lost all information about
attributes.

To lighten up FDI within a more familiar context, here is Boolean
Algebra identity (which name escaped me at the moment)

x = (x ^ y) v (x ^ -y)

Given that R00 and R11 are "inverse complements" of each other, that
is

R11 = R00`' = R00'`

one can expect that Generalized FDI in the form:

x = (x ^ y) v (x ^ y'`)

and

x = (x ^ y) v (x ^ y`')

and indeed one of them is RL identity (and, curiously, the other one
is not!)

Quote:
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).
So how exactly is it done for an empty relation? There is no tuples!

Reply With Quote
  #38  
Old   
Tegiri Nenashi
 
Posts: n/a

Default Re: On formal HAS-A definition - 05-12-2010 , 12:26 PM



On May 12, 12:53*am, Nilone <rea... (AT) gmail (DOT) com> wrote:
Quote:
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 lost. Example, please?

Quote:
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.
Well, I was impressed by Smith&Smith "Aggregation and Generalization"
paper a while while ago, but since the rise of UML avoid using these
terms. Again, example, please.

Quote:
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.
Well, how about "Gentle introduction to relational lattice"? Better
yet, you appears to have solid programming background, so I assume
downloading http://qbql.googlecode.com/svn/trunk/dist/qbql.jar
or even checking in QBQL project in Eclipse wouldn't be a problem?

Reply With Quote
  #39  
Old   
Erwin
 
Posts: n/a

Default Re: On formal HAS-A definition - 05-12-2010 , 02:54 PM



On 12 mei, 18:12, Tegiri Nenashi <tegirinena... (AT) gmail (DOT) com> wrote:
Quote:
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?
Eurhm, page 1 to 330, I would say. The book consistently references
the empty relation as FI (you know, the circle with the "forward
slash" intersecting it), untyped.

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.)



Quote:
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).
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.



Quote:
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!
I don't know. It is not my preferred point of view either. I suspect
proponents of this point of view would address this problem by saying
that the empty relation does not have any particular heading/type.
Once again, I suspect whether one can get away with that position
depends on the intended goal to achieve.

Reply With Quote
  #40  
Old   
Tegiri Nenashi
 
Posts: n/a

Default Re: On formal HAS-A definition - 05-12-2010 , 05:36 PM



On May 12, 11:54*am, Erwin <e.sm... (AT) myonline (DOT) be> wrote:
Quote:
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.)
This is shocking revelation to me. I failed to imagine somebody would
ever consider the two relations

PersonSalary = [name salary];

and

PersonName = [name];

to be identical. An informal argument is that any nonempty relation
carries over information about the header (attribute set), and empty
relation loses it. This is very unnatural break of continuity from
mathematical perspective. I'm pretty sure if somebody would ever come
with axiomatization of their table algebra, it would have weird
properties. For one thing, if I add it to RL axioms:

x ^ y = y ^ x.
(x ^ y) ^ z = x ^ (y ^ z).
x ^ (x v y) = x.
x v y = y v x.
(x v y) v z = x v (y v z).
x v (x ^ y) = x.

x ^ (y v z) = (x ^ (z v (R00 ^ y))) v (x ^ (y v (R00 ^ z))).

x ^ R00 = y ^ R00.

then it immediately derives distributivity of ^ over v. There
certainly is a counterexample for distributivity with all three
relations being nonempty:

z = [p q r]
0 a 0
0 c 0
1 a 0
;
y = [q]
a
;
x = [p]
1
;

Quote:
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.
Now I that you are kindly explained this passage, I'll venture off,
because they start with the false premise that there is a single empty
relation.

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 - 2012, Jelsoft Enterprises Ltd.