From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,bf02c238a92156a3 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news2.google.com!proxad.net!newsfeed.stueberl.de!newsfeed.r-kom.de!news-nue1.dfn.de!news-ber1.dfn.de!news.uni-hamburg.de!cs.tu-berlin.de!uni-duisburg.de!not-for-mail From: Georg Bauhaus Newsgroups: comp.lang.ada Subject: Re: Windows Ada database support. Date: Thu, 9 Dec 2004 12:12:22 +0000 (UTC) Organization: GMUGHDU Message-ID: References: <5e3e03a7.0411240431.7e037a4e@posting.google.com> <11w2chxxtggn9.a442ecwtujd2$.dlg@40tude.net> <1jrbh30djhwuh$.cpwm02mv7d1d.dlg@40tude.net> <18u46qzjs6s8v.19927r9ay0kkh.dlg@40tude.net> <1bucyi24j39vb.14y21qffgez47.dlg@40tude.net> NNTP-Posting-Host: l1-hrz.uni-duisburg.de X-Trace: a1-hrz.uni-duisburg.de 1102594342 20075 134.91.1.34 (9 Dec 2004 12:12:22 GMT) X-Complaints-To: usenet@news.uni-duisburg.de NNTP-Posting-Date: Thu, 9 Dec 2004 12:12:22 +0000 (UTC) User-Agent: tin/1.5.8-20010221 ("Blue Water") (UNIX) (HP-UX/B.11.00 (9000/800)) Xref: g2news1.google.com comp.lang.ada:6859 Date: 2004-12-09T12:12:22+00:00 List-Id: Dmitry A. Kazakov 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.