Subject: [[email-masked]: I postgres real OO?]

From: [email-masked] (Paul M. Aoki)
Date: Tue, 21 Jun 94 00:04:48 -0700

------- Forwarded Message

 From:  Chris Bitmead <[email-masked]>
 To:  [email-masked]
 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  |  [email-masked]
                |  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 "[email-masked]"

   If this fails, send mail to "[email-masked]" and
   a human will deal with it.  DO NOT post to the "postgres" mailing list.
==============================================================================