Return-Path: owner-postman
Received: from localhost (localhost [127.0.0.1]) by nobozo.CS.Berkeley.EDU (8.6.4/8.6.3) with SMTP id AAA09858 for postgres-redist; Tue, 21 Jun 1994 00:04:52 -0700
Resent-From: POSTGRES mailing list <postman@postgres.Berkeley.EDU>
Resent-Message-Id: <199406210704.AAA09858@nobozo.CS.Berkeley.EDU>
Sender: owner-postman@postgres.Berkeley.EDU
X-Return-Path: owner-postman
Received: from faerie.CS.Berkeley.EDU (faerie.CS.Berkeley.EDU [128.32.149.14]) by nobozo.CS.Berkeley.EDU (8.6.4/8.6.3) with ESMTP id AAA09848 for <postgres@postgres.Berkeley.EDU>; Tue, 21 Jun 1994 00:04:51 -0700
Received: from localhost (localhost [127.0.0.1]) by faerie.CS.Berkeley.EDU (8.6.4/8.1B) with SMTP id AAA14015; Tue, 21 Jun 1994 00:04:49 -0700
Message-Id: <199406210704.AAA14015@faerie.CS.Berkeley.EDU>
X-Authentication-Warning: faerie.CS.Berkeley.EDU: Host localhost didn't use HELO protocol
From: aoki@CS.Berkeley.EDU (Paul M. Aoki)
To: postgres@postgres.Berkeley.EDU
Reply-To: chrisb@cssc-syd.tansu.com.au
Subject: [chrisb@cssc-syd.tansu.com.au: I postgres real OO?]
Date: Tue, 21 Jun 94 00:04:48 -0700
X-Sender: aoki@postgres.Berkeley.EDU
Resent-To: postgres-redist@postgres.Berkeley.EDU
X-Mts: smtp
Resent-Date: Tue, 21 Jun 94 00:04:52 -0700
Resent-XMts: smtp

------- 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.
==============================================================================
