agora inbox for postgres@postgres.berkeley.edu
help / color / mirror / Atom feedFrom: Paul M. Aoki <aoki@CS.Berkeley.EDU>
To: postgres@postgres.Berkeley.EDU
Subject: [chrisb@cssc-syd.tansu.com.au: I postgres real OO?]
Date: Tue, 21 Jun 94 00:04:48 -0700
Message-ID: <199406210704.AAA14015@faerie.CS.Berkeley.EDU> (raw)
------- Forwarded Message
From: Chris Bitmead <chrisb@cssc-syd.tansu.com.au>
To: postman@postgres.Berkeley.EDU
Subject: I postgres real OO?
Date: Tue, 21 Jun 1994 16:05:11 +1000
I've been checking out the features of the Postgres databases.
It seems to support most of the stuff you would want in an OO database.
One question remains unclear however with relational/object databases.
If I, from a program do something like
retrieve E.all from E in EMP*
then I will get back all the EMP records plus anything that inherits from
EMP. However will I be able to find out for each row what type of object
it is really associated with? (perhaps so I can instantiate a C++ object
for it), and also will I be able to access members of the inherited
classes?
A common thing I would want to do in an OOP graphics program is something
like the following:
get_all_shapes_from_database();
instantiate_objects_for_them();
foreach object
object.draw();
And if I have a C++ program or whatever with a class hierarchy like this:
shape
^ ^
_____| |____
| |
circle square
Then I do a retrieve S.all from S in SHAPE* Will I be able to do the
instantiate_objects_for_them() step? To do this I will need to be able to
identify for each row what type of shape it really is. (If absolutely
necessary you could store this information in a field in the shape base
class if the database can't provide it). More importantly will I be able
to get at members of the cirle class such as the radius integer member of
circle, or the side_length integer member of square?
Thanks,
Chris Bitmead.
------- End of Forwarded Message
--
Paul M. Aoki | CS Div., Dept. of EECS, UCB | aoki@CS.Berkeley.EDU
| Berkeley, CA 94720 | ...!uunet!ucbvax!aoki
==============================================================================
To add/remove yourself to/from the POSTGRES mailing list: send mail with
the subject line ADD or DEL to "postgres-request@postgres.Berkeley.EDU"
If this fails, send mail to "post_questions@postgres.Berkeley.EDU" and
a human will deal with it. DO NOT post to the "postgres" mailing list.
==============================================================================
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: postgres@postgres.berkeley.edu
Cc: aoki@CS.Berkeley.EDU
Subject: Re: [chrisb@cssc-syd.tansu.com.au: I postgres real OO?]
In-Reply-To: <199406210704.AAA14015@faerie.CS.Berkeley.EDU>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox