Re: Changing Object Type in OODB

From: Carl Rosenberger <carl_at_db4o.com>
Date: Sun, 3 Jun 2001 22:11:12 +0200
Message-ID: <9fe5m2$lja$00$1_at_news.t-online.com>


Werner Purrer wrote:
> >> In another thread, a Java-only OODB proponent proposed the following as
 an
> >> obvious, straightforward design not requiring any thought:
> >>
> >> >class Person
> >> >class Employee extends Person
> >> >class Manager extends Employee

I think someone means me, here.
Sorry for this simplified example that I usually use. Patrick has pointed our very well, that it might also be wrong.

[changing an Employee object to be a Manager]

Independant of my possible bad class design, the problem brought up could be of importance in practice. I agree that Java does not provide a means for a downcast which would be necessary here, in order to have other objects keep the same reference within the database.

A feature
DatabaseEngine.cast(Object, Class)
could very well be very useful for object databases. Thank you for the excellent suggestion.

> Not really but those things also occur in OODBS to a heavy degree. And
> even to the worse you canīt that easily change your db scheme once you
> have it nailed down inside the db.

This prejudice about the rigidness of object databases is widely spread. Indeed it is well-founded by the difficulties most object databases have with schema changes.

I am very positive that we have not seen the end of development here.

Kind regards,
Carl

---
Carl Rosenberger
db4o - database for objects - http://www.db4o.com
Received on Sun Jun 03 2001 - 22:11:12 CEST

Original text of this message