Object IDs vs relational keys?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Object IDs vs relational keys?

Amir Ansari
>From my background reading on object databases:

"A relational database represents data relationships by having matching primary key-foreign key data. There are no data structures within the database that form links between the tables; the relationships are used as needed by joining tables. In direct contrast, a pure object-oriented database 'hard codes' its relationships by including object identifiers within an object to indicate other objects to which it is related."  (Object-Oriented Database Design, Jan L Harrington, Chapter 3)

I've pored over the Magma documentation and mailing list, but couldn't find any explicit discussion of object identifiers in this context. I understand that Chris is loth to use OIDs (http://lists.squeakfoundation.org/pipermail/magma/2005-August/000027.html), so what's the alternative? What is the Magma analog of 'joining' tables using primary/foreign keys?

Amir
_______________________________________________
Magma mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/magma
Reply | Threaded
Open this post in threaded view
|

Re: Object IDs vs relational keys?

Chris Muller-3
Hi Amir, with Magma, every object responds to #magmaOid (It's an ugly
name, but I prefer to be considerate of namespace, in case someone
else wants to use #oid).  It is an integral identifier unique to that
repository.

However, in an object system, you usually don't need to do "logical"
joins between objects via id, instead, just reference them directly.
That is what is meant when your book mentions that ODBMS's "hard-code"
the relationships.  They're not actually coded, they just "pre-exist"
in teh db, rather than needing to be "looked up" over and over again..

Hope this help,
  Chris

On Wed, Mar 17, 2010 at 2:33 AM, Amir Ansari <[hidden email]> wrote:

> >From my background reading on object databases:
>
> "A relational database represents data relationships by having matching primary key-foreign key data. There are no data structures within the database that form links between the tables; the relationships are used as needed by joining tables. In direct contrast, a pure object-oriented database 'hard codes' its relationships by including object identifiers within an object to indicate other objects to which it is related."  (Object-Oriented Database Design, Jan L Harrington, Chapter 3)
>
> I've pored over the Magma documentation and mailing list, but couldn't find any explicit discussion of object identifiers in this context. I understand that Chris is loth to use OIDs (http://lists.squeakfoundation.org/pipermail/magma/2005-August/000027.html), so what's the alternative? What is the Magma analog of 'joining' tables using primary/foreign keys?
>
> Amir
> _______________________________________________
> Magma mailing list
> [hidden email]
> http://lists.squeakfoundation.org/mailman/listinfo/magma
>
_______________________________________________
Magma mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/magma
Reply | Threaded
Open this post in threaded view
|

Re: Object IDs vs relational keys?

Amir Ansari
Thanks Chris, that makes things clearer!

Amir


On Wed, 17 Mar 2010 11:23:13 -0500
Chris Muller <[hidden email]> wrote:

> Hi Amir, with Magma, every object responds to #magmaOid (It's an ugly
> name, but I prefer to be considerate of namespace, in case someone
> else wants to use #oid).  It is an integral identifier unique to that
> repository.
>
> However, in an object system, you usually don't need to do "logical"
> joins between objects via id, instead, just reference them directly.
> That is what is meant when your book mentions that ODBMS's "hard-code"
> the relationships.  They're not actually coded, they just "pre-exist"
> in teh db, rather than needing to be "looked up" over and over again..
>
> Hope this help,
>   Chris
_______________________________________________
Magma mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/magma