Re: OO and relation "impedance mismatch"
Date: Sun, 3 Oct 2004 12:00:21 -0500
Message-ID: <cjpb7e$3ob$1_at_news.netins.net>
"Alfredo Novoa" <alfredo_at_ncs.es> wrote in message
news:e4330f45.0410030250.770e7582_at_posting.google.com...
> Troels Arvin <troels_at_arvin.dk> wrote in message
news:<pan.2004.10.02.13.18.03.39531_at_arvin.dk>...
> > On Sat, 02 Oct 2004 04:00:13 -0700, Fredrik Bertilsson wrote:
>
> > I believe that it's true that there still are annoying obstacles which
> > have to be taken care of when using an RDBMS as a storage backend for
> > OO-coded programs.
>
> To use an RDBMS as a storage backend is to misuse an RDBMS. DBMSs are
> for data management, not for dumb storage.
>
> > Part of it probably has to do with the fact that relational databases
are
> > set-oriented whereas OO languages are not.
>
> OO languages don't support the fundamental relational structure: the
> relation. It is very evident that a language that does not support
> relations is not very well suited to work with relational databases.
OO languages support Relations as a type -- you can either use a library with Relation already defined as a type or write your own Relation class. I'm missing the point on this one. It seems to me that OO languages are better at working with Relation types than are procedural languages.
> > But that - by itself -
> > need not be a problem: Using the right tool for the right situation
should
> > always be better than trying to solve everything by one principle.
>
> That is necessarily a problem, but a problem we can workaround.
>
> > Then there is type support: Some of the data types found in - e.g. - SQL
> > don't have out-of-the box, perfectly matching types in the major OO
> > languages.
>
> They have in the most modern languages like VB.NET and C#.
>
> > The above problems are not unique to the RDBMS<->OO situation. They are
> > actually general to RDBMSes and any imperative language (that I know
of).
Constraint information is needed throughout applications and not just at the point of commiting data. In fact, that's way too late to apply the constraints. If you can lock out all transactions & queries with the database that do not go through designated APIs (such as web services) rather than locking them using the proprietary DBMS, then you don't need to have the database apply these constraints since they will be applied up front of that necessarily.
cheers! --dawn Received on Sun Oct 03 2004 - 19:00:21 CEST