H
Hal Fulton
I've been thinking about OO databases -- never having really
used such a beast. In fact, I am not sure that OOD even exist
in the sense that I would like.
Here's one thing I'm thinking about...
When one class inherits from another, we take it for granted
that they are "type compatible." Anywhere a Mammal can be
used, we can specify a Dog. (Insert standard discussion of
duck typing here.)
I'm thinking of the usual paradigm where a table is an ordered
sequence of fields. Neglecting the methods (which is another
issue entirely), we can think of the fields as instance vars.
But if a have a database table of Mammals... I can't store a
Dog in it. Hmm. I think I wish I could?
And don't get me started on singletons. Basically, the traditional
relational model assumes a fixed set of fields; but Ruby makes no
such assumption. Even objects of the same class may have different
attributes and methods.
Would it make sense to create a database that modeled Ruby's
paradigm more closely? Am I talking nonsense?
Thanks,
Hal
used such a beast. In fact, I am not sure that OOD even exist
in the sense that I would like.
Here's one thing I'm thinking about...
When one class inherits from another, we take it for granted
that they are "type compatible." Anywhere a Mammal can be
used, we can specify a Dog. (Insert standard discussion of
duck typing here.)
I'm thinking of the usual paradigm where a table is an ordered
sequence of fields. Neglecting the methods (which is another
issue entirely), we can think of the fields as instance vars.
But if a have a database table of Mammals... I can't store a
Dog in it. Hmm. I think I wish I could?
And don't get me started on singletons. Basically, the traditional
relational model assumes a fixed set of fields; but Ruby makes no
such assumption. Even objects of the same class may have different
attributes and methods.
Would it make sense to create a database that modeled Ruby's
paradigm more closely? Am I talking nonsense?
Thanks,
Hal