Re: Object-oriented thinking in SQL context?

From: Nilone <>
Date: Wed, 17 Jun 2009 13:45:49 +0200
Message-ID: <>

"Bob Badour" <> wrote in message news:4a2ee2f5$0$23770$
> 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

Original text of this message