Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> comp.databases.theory -> Re: Clean Object Class Design -- What is it?

Re: Clean Object Class Design -- What is it?

From: Bob Badour <bbadour_at_golden.net>
Date: Mon, 3 Sep 2001 20:19:58 -0400
Message-ID: <F6Vk7.769$3X3.134438014@radon.golden.net>

Rico wrote in message <9Nsk7.123$aw3.113551_at_newsfeed.slurp.net>...
>
>"Jim Melton" <Jim.Melton_at_Technologist.com> wrote in message
>>
>> Bob Badour wrote:
>> >
>> > Using pointers, yes, I know that. We already know what a disaster it is
>to
>> > expose pointers to users. If you do not expose OID to users, how do
>users
>> > identify unique instances?
>>
>> See, I don't get your point. An OID is not a pointer. In the database
>system I
>> use, an OID has a native representation (4 16-bit numbers) and a
>stringified
>> representation ( #dd-cc-pp-ss ). Neither of these are "pointers" any more
>than
>> a rowID is a pointer. Yet, because of the operator overloading in OO
>languages,
>> they can appear as a pointer to the programmer.
>>
>
>What bothers me about arguing over the issue of "pointers" in database
>systems is the assumption that pointers are somehow inherently evil. I
>disagree.

So do I. Pointer are only evil when exposed directly to users in the logical interface.

> In our applications, our most efficient data structures used for
>our most efficient algorithms use pointers (or references, if you're doing
>the Java thing).

That's fine provided the DBMS does not expose the pointers to users.

>The argument that pointers are dangerous to expose to "users" ... as in
>end-users ... is spurious

It is not spurious. The argument has considerable empirical backing.

> since I wouldn't expose an OID to an end-user
>anymore than I would expose them to the mechanics of an AVL tree.

If that is so, how do users tell two objects apart?

>The real
>argument is whether we should expose pointers to *programmers* ... and
>that's a far different animal.

Programmers are merely users from the perspective of the dbms.

>Languages like Java and Ada have shown that
>you can expose pointers in a meaningful way and avoid the dangers of
>dangling references.

From a database management perspective, dangling references are the least of the problems exposed pointers cause.

>IMO, OODBMSs accomplish the same purpose of providing
>the advantages of a pointer without the need for direct manipulation (I've
>never had a need to grab an OID and directly manipulate it).

Except every time you use a reference to a persisted object variable, that is. Received on Mon Sep 03 2001 - 19:19:58 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US