Path: news.cs.au.dk!noatun.mjolner.dk!mail-to-news From: Atle Newsgroups: comp.lang.beta Subject: PostGreSQL - Latest :-) Date: Fri, 24 Nov 2000 16:01:45 +0100 Organization: Posted to comp.lang.beta by a mailtonews script Lines: 38 Sender: lbr@mjolner.dk Approved: mailtonews@cs.au.dk Message-ID: <8vlssn$6ubm1$1@gjallar.cs.au.dk> NNTP-Posting-Host: bifrost.mjolner.dk Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: gjallar.cs.au.dk 975075031 7286465 130.225.4.254 (24 Nov 2000 14:10:31 GMT) X-Complaints-To: usenet@cs.au.dk NNTP-Posting-Date: Fri, 24 Nov 2000 14:10:31 +0000 (UTC) Mailing-List: contact usergroup-help@mjolner.dk; run by ezmlm X-No-Archive: yes X-Mailer: Mozilla 4.72 [en] (X11; U; Linux 2.2.14 i686) X-Accept-Language: en X-Original-Message-ID: <3A1E82D9.161DC60C@skynet.be> X-Original-Sender: atle@skynet.be Xref: news.cs.au.dk comp.lang.beta:12653 I have had an easy job of interfacing to PostGreSQL over the libpq, and now I see that the interface can be very Beta-like indeed. What I wanted initially, was something that worked like a Container, and now I see that this might be a kind of ClassificationSet. I once took a course in dabases, and part of the course was something called the RAS - the Relational Algebra System, the most powerful I have seen, most, if not all set functions were supported. JOIN, PROJECT and SELECT could be mixed in any order, actually very Beta-like! SELECT fa,fb,fc,fd,fe,fg FROM DB giving CB SELECT fa,fg from CB WHERE fa='criterion' GIVING HB could be expressed like SELECT fa,fb FROM (SELECT fa,fb,fc,fd,fe,fg FROM DB) GIVING HB Now the scan: pattern definitely has a place here ... Could this be a possibility?: 'SELECT * FROM SYMPTOMS WHERE s ~* Headache'->PQ.scan(# DO (tupleNo,fieldNo)->getValue->Screen.putText #) Or should rather the patterns SELECT, PROJECT and JOIN be defined on virtual patterns? PQ.SELECT(# WHERE::<(# DO ((fa > 3000) AND (fa < 35000))->value #); fa:@INTEGER; fb:^TEXT fb[]->Screen.putLine #) I personally like the second one better ... comments? Thanks, Atle PS BTW, the libpq is similar to ODBC, only a LOT simpler. /PS