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,229ea0001655d6a2 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Newsgroups: comp.lang.ada Subject: Re: Generic Package References: <1177539306.952515.222940@s33g2000prh.googlegroups.com> <1177601484.444701.171560@r35g2000prh.googlegroups.com> <1177672290.8055.6.camel@localhost> From: Markus E Leypold Organization: N/A Date: Fri, 27 Apr 2007 14:52:44 +0200 Message-ID: User-Agent: Some cool user agent (SCUG) Cancel-Lock: sha1:5gNbdGtrXWQRLtbNTXC5kndNRWg= MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii NNTP-Posting-Host: 88.72.204.237 X-Trace: news.arcor-ip.de 1177677881 88.72.204.237 (27 Apr 2007 14:44:41 +0200) X-Complaints-To: abuse@arcor-ip.de Path: g2news1.google.com!news2.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsfeed.arcor-ip.de!news.arcor-ip.de!not-for-mail Xref: g2news1.google.com comp.lang.ada:15381 Date: 2007-04-27T14:52:44+02:00 List-Id: "Dmitry A. Kazakov" writes: > On Fri, 27 Apr 2007 13:11:30 +0200, Georg Bauhaus wrote: > >> On Fri, 2007-04-27 at 11:00 +0200, Dmitry A. Kazakov wrote: >>> On Thu, 26 Apr 2007 22:52:58 +0100, Simon Wright wrote: >>> >>>> "Dmitry A. Kazakov" writes: >>>> >>>>> You cannot iterate a relational table, because there is no order >>>>> defined on it. >>>> >>>> Why would that stop me iterating over all the rows? >>> >>> Because iterating presumes following an order. >> >> Any real table in an existing computer has a "natural" >> ordering suitable for iterating an operation for all >> elements: data in a real computer can be uniquely identified. > > No this is wrong even on a real computer. The DB engine could shuffle the > rows asynchronously to your application. There could be other applications > playing with the table. The table might spread over memories of several > computers and different levels cashes. You have to bring transactions, > replications and other synchronizing stuff to make any sense out of > "natural order." > >> The fact that the ordering is hidden behind the functional >> Iterate abstraction doesn't make it go away for any >> snapshot of rows. > > It does. Semantically, table /= a snapshot of. That is. >>>>> You cannot iterate a relational table, because there is no order >>>>> defined on it. You know, I'm iterating over relational tables (or what I thought were relational tables) all the time. This basically is the way most of the interfaces to RDBSs I use work: Executing a query gives you a result cursor, which you can use to extract the result row by row. The actual sequence in which they come is unspecified and up to the database engine if I haven't specified sorting in my query (which I don't in many circumstances where I only want to get at a set of tuples but don't require any specific order). Are you telling me I've been hallucinating and that I have been NOT iterating over those tables (because one cannot)? Or do you intend to come up with a "smart" definition of "iterating" or "relational table" now, which -- contrary to everyones expectations and common understanding -- will somehow exclude my scenario from the definition? Regards -- Markus