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!news-mue1.dfn.de!news-ham1.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: Wed, 8 Dec 2004 15:52:17 +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> NNTP-Posting-Host: l1-hrz.uni-duisburg.de X-Trace: a1-hrz.uni-duisburg.de 1102521137 18259 134.91.1.34 (8 Dec 2004 15:52:17 GMT) X-Complaints-To: usenet@news.uni-duisburg.de NNTP-Posting-Date: Wed, 8 Dec 2004 15:52:17 +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:6844 Date: 2004-12-08T15:52:17+00:00 List-Id: Ole-Hjalmar Kristensen wrote: : He may just as well be thinking in terms of sets and relations. SQL is : just a slightly clumsy way of conveying those thoughts to the DB : engine :-) Yes, thanks. I was thinking about one of those tiny little everyday problems, and how to solve it and how to employ Ada .Containers as "middleware". The problem: "Declare an ordered selection of objects. Make it available" Objects may be either just fetched from the DB or they may be synthesized, i.e. newly constructed from the DB (!), effectively establishing a type. If a language supports EVAL, you can even construct the types at at language level at run time. Omitting the ordering issue, a SETL2 expression demonstrates a non-SQL solution: result := { [foo, bar] : id in { R.key : R in S | R.key >= 100 and R.key <= 200 }, bar = T(foo) | foo = id }; No trace of SQL, but I'm sure you can see the relation between a SET programming language and SQL. Note the result set ;-) This is working code, S and T are sets of tuples. You may say that there are tuples and sets, iieek. But the in computer programs you will have to work with some sort of compound data at some level. If you dislike the presence of tuples, ".key" is a selector. R.key means the same as R(1). This allows you to build interfaces so you don't have to see the tuples. Dmitry, what is your plan the other way round, i.e. how do you make data related expressions for some nice higher level abstraction? -- Georg