Object Pointer Question
Ruslan Zasukhin
sunshine at public.kherson.ua
Tue Feb 11 21:21:27 CST 2003
on 2/11/03 9:08 PM, Gordon Apple at ga at ed4u.com wrote:
Hi Gordon,
> I'm not totally clear on how object pointers work. They apparently store
> the RecID of the pointed-to object. Do they also store the table pointer in
> each record? Or is that only stored in the base object?
Only RecID.
Pointed Table is stored only once inside of ObjectPtr field description.
You can think about them as DIRECTR pointer to physical record.
Something like pointer in C++ language.
---
By the way, it seems to be good idea in future add one more type of Ptr.
Field which can point to different tables.
IT is obviously that it will have 8 bytes and store simply:
{ BaseObjectID, RecID }
In fact OODBC use ONLY this type of pointer.
> The real question is whether or not an object pointer field (column) can
> contain pointers to more than one table.
No, see above
> I'm trying to avoid the
> inheritance question here and simply see if my object pointers can point to
> records in different tables. For example, I might have a table of people
> and two additional related tables of attributes. The pointed-to attribute
> record (owned by the people table record) might be different for men and
> women. The male attributes table might have parameters to describe business
> contacts. The female attributes table might have a hot-lips rating. (OK, I
> know it's sexist. It's just an example.) I'd like to have one object
> pointer in the people table that would point to a record in the appropriate
> attributes table depending on what's in the people record male/female
> column. Is that possible?
--
Best regards,
Ruslan Zasukhin [ I feel the need...the need for speed ]
-------------------------------------------------------------
e-mail: ruslan at paradigmasoft.com
web: http://www.paradigmasoft.com
To subscribe to the Valentina mail list go to:
http://listserv.macserve.net/mailman/listinfo/valentina
-------------------------------------------------------------
More information about the Valentina
mailing list