Re: Windows Ada database support.

From: Georg Bauhaus (sb463ba_at_l1-hrz.uni-duisburg.de)
Date: 12/09/04


Date: Thu, 9 Dec 2004 12:12:22 +0000 (UTC)

Dmitry A. Kazakov <mailbox@dmitry-kazakov.de> wrote:
: On Wed, 8 Dec 2004 15:52:17 +0000 (UTC), Georg Bauhaus wrote:
:> Dmitry, what is your plan the other way round, i.e. how do you
:> make data related expressions for some nice higher level abstraction?
:
: You have cunningly formulated the problem so that there is no higher level!
: (:-)) There is either:

I think you can go to a higher level. At a cost.

: for I in S'Range loop
: if S (I).Key in 100..200 then
: for J in T'Range loop
: if T (J).Foo = S (I).Key then
: Append (Result, S (I).Key, T (J).Foo);
: end if;
: end loop;
: end if;
: end loop;
:
: or you define "*" (product) for the type Table'Class (of S and T) + other
: operations to extract sets from the tables.
:
: But the question is why an application should always organize its data in a
: way which could require implementation these, very expensive, operations?

First, the operations need not be expensive, e.g. because there is
an index.
Second, when defining the data format, I may not be in a position to
choose freely. A definition that suits my program might be a real obstacle
to someone else's.

: Isn't S and T just a two-dimensional array?

No, S and T are selections from views. It is up to the RDBMS to organize
the data to fit the SELECTion choices.
Each record in S or T is part of a list of structured values,
each component being of some type. Depending on the DB system, you
might even have more than sequential access prior to turning the
result into an Ada object.



Relevant Pages