Re: slotted notation -summary

> 
> maybe an example could help you correct me.
> 
> Suppose we have a class Person, with attributes
>    Class Person
>       customerstatus: (GOLD, SILVER, BRONZE)
>       age: interger
>       revenue: integer
> 
> and we have an object of that class
>    Bob(customerstatus->GOLD, age->25, revenue->100000)
> 
> It seems to me that I can translate this into a conjunction of binary 
> relations:
>    customerstatus(bob, GOLD) and age(Bob, 25) and revenue(Bob, 100000)
> without adding or losing any information.

But the above is not slotted notation. You probably meant

object(id->bob,customerstatus->Gold)
object(id->bob,age->25)
object(id->bob,revenue->100000)

That is, all objects are translated into a single slotted relation.
This is possible. Any such notation can be encoded in any other.

What I mean was that the relational model is a subset of the
object-oriented model. This means that each tuple in any relation
can be represented as an object and so we don't have any encoding.
There is simply an inclusion.

So, your question below boils down to how does one represent tuples as
objects.  The simplest way is to say that a tuple
<slot1->a,slot2->b,slot3->c> in a relation p is represented as an object
with id p_id(a,b,c). That is, as 
p_id(a,b,c)(slot1->a,slot2->b,slot3->c)

So, each tuple is mapped to a uniquely defined object, so the relational
data model is a proper subset of the object-oriented data model.

But, as we discussed, you can *encode* the object-oriented data model in the
relational model. It is just that the object-oriented model is not a subset
of the relational model.

Hope this is clear now.

Now, another interesting issue is what kind of round-tripping are we
supposed to allow/require/support. For instance, what about

slotted-objects -> RIF Core -> nonslotted-relational

and back? Or should we worry only about  language<->core ?


	--michael  

> On the other hand, if I have the relational predicate
>     Person(GOLD, 25, 100000)
> I cannot transform it into the OO form without adding some kind of 
> identifier for the person, which I may not need or want (e.g. if all my 
> rule is concerned with is that these values are in that relation) or 
> which may even not make sense in some cases.
> 
> Christian
> 
> Christian de Sainte Marie wrote:
> 
> > Michael Kifer wrote:
> > 
> >> No, I said just the opposite! What you want is wrong.
> >>
> >> When I said "You want to map ..." you misunderstood me.
> >> This expression was supposed to explain what you should really want, 
> >> if you
> >> saw the issue clearly.
> > 
> > 
> > Oh, ok, I get it. Btw, I certainly do not claim to see the issue clearly 
> > (which is why I try to get a clearer view :-).
> > 
> > So, what you say is that we should do, if anything is:
> > 
> >>>>
> >>>> [...] to map the relational slotted notation to the OO slotted notation
> >>>> - not the other way around. Relational slotted notation implies that 
> >>>> object
> >>>> Ids are inaccessible, while OO notation assumes that they are. So, 
> >>>> you can
> >>>> map OO to relational slots in a certain sense.
> > 
> > 
> > I do not understand what you mean.
> > 
> > Here is what I understood. It would help me if you pinpointed where I am 
> > wrong:
> > 
> > The relational slotted notation p(slot1->val1,...,slotn->valn) says that 
> > the tuple (val1 ... valn) belongs to relation p, where val1 plays role 
> > slot1 etc. The same expression, if it were in OO slotted notation, would 
> > mean that object p has values vla1 to vlan in slots slot1 to slotn: so, 
> > it certainly says that val1 to valn are related in the proper roles 
> > (thus implying the relational notation); it also says that the relation 
> > is embodied in object p, which the relational notation does not say 
> > (thus the relational notation does not imply the OO notation).
> > 
> > If this is (or, maybe, if this were) correct, one could transform from 
> > OO slotted notation to relational, but not the reverse. Hence my proposal.
> > 
> > You tell me that it is wrong: can you help me understannd why?
> > 
> > Christian

Received on Tuesday, 9 January 2007 18:39:22 UTC