Re: Object-oriented thinking in SQL context?
Date: Wed, 17 Jun 2009 13:45:49 +0200
"Bob Badour" <bbadour_at_pei.sympatico.ca> wrote in message
> none Reinier Post wrote:
>>>>>In my first post:
>>>>>"I have a problem with wrapping my mind into the 'right' wrinkles."
>>>>>"The [system] would be almost trivial to implement in an
>>>>>object-oriented context [...],
>>>>>but I don't see how to come up with a table-based database
>> Think 'class' ~ 'relation' (table)
> But that would not only be a blunder but a great blunder.
I'd like to clarify this for anyone coming from the OO side. If you map class to relation, you're breaking the OO rule of encapsulation and reducing the class to a simple aggregate type (struct). Presumably, you chose an encapsulated, polymorphic abstraction device for a reason, or did you do so just because you (or somebody at your company) read Lhotka's book? Classes map to domains (types) in the relation model, but be aware that subclassing is NOT subtyping.
Nilone Received on Wed Jun 17 2009 - 13:45:49 CEST