Re: Mixing OO and DB

From: Dmitry A. Kazakov <mailbox_at_dmitry-kazakov.de>
Date: Fri, 8 Feb 2008 23:15:40 +0100
Message-ID: <smwzg5f76au9.ziiljxmoj47d.dlg_at_40tude.net>


On Fri, 8 Feb 2008 13:18:05 -0800 (PST), Tegiri Nenashi wrote:

> On Feb 8, 11:32 am, "Dmitry A. Kazakov" <mail..._at_dmitry-kazakov.de>
> wrote:

>> The same problem exists with any algebra less flat than numeric fields.
>> What is the type of Matrix x Matrix?

>
> Speaking of matrices, what do you possibly achieve by bundling
> together the multiply(Matrix,Matrix) function together with the Matrix
> data structure (other than loosing the symmetry: consider
> matrix1.multiply(matrix2) method call how ugly is that)?

Egh, prefix notation is just a notation, utterly misleading in most cases, BTW. Semantically matrix multiplication deals with a triplet:

   Multiply : Matrix x Matrix -> Matrix

So if Multiply is to be bound to an object then that has to be a tuple (Matrix, Matrix, Matrix).

(If you think that OO = prefix notation, then it is not the OO I meant.)

> If you serious about working with matrices (or any math) in your
> application, then you design a mini-language which looks as Maple,
> Matlab, or Mathematica.

Really? And what if I am serious about working with something else too? What about "serious" working with matrices *and* data bases? So next time it should be me whining here about impedance between OO, DB and now a fancy matrix language? What a brilliant future waits for us...

>> The point is though that there is nothing in RA to deserve a special
>> treatment. That is actually is not an option, because we just cannot
>> provide a tailored solution for each and ever algebra.

>
> You mean you don't want to, or you are not qualified to?

Neither. I do admire compiler construction, but customers became thrifty. Silly they don't want to pay for developing a new programming language for each other new project!

>> To me a bigger problem is that RA is "computationally instable" in the
>> sense that a minor variations of same constructs may have massive effects
>> on resources consumptions, i.e. distributed overhead. OO tries to localize
>> effects by decoupling and encapsulation.

>
> You mean optimization? This is true, query optimization in relational
> world is far more advanced than the one in the procedural programming
> (which includes OO), and therefore it has more challenging problems.

If solution is itself a problem... No, I didn't mean optimization. What makes you believe in optimization? How reliable your belief is? Let you look at a program, can you predict if it meets time and space constraints? Before optimization? After optimization?

-- 
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de
Received on Fri Feb 08 2008 - 23:15:40 CET

Original text of this message