Received: from localhost (maia-2.hub.org [200.46.204.187]) by postgresql.org (Postfix) with ESMTP id 8089E9FBB44 for ; Thu, 26 Apr 2007 05:29:10 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.187]) (amavisd-maia, port 10024) with ESMTP id 79021-03 for ; Thu, 26 Apr 2007 05:29:03 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from smtp3.yandex.ru (smtp3.yandex.ru [213.180.200.14]) by postgresql.org (Postfix) with ESMTP id BFD519FBAC2 for ; Thu, 26 Apr 2007 05:29:05 -0300 (ADT) Received: from [82.209.238.118] ([82.209.238.118]:17673 "EHLO asup_tur" smtp-auth: "sql4-en" TLS-CIPHER: TLS-PEER-CN1: ) by mail.yandex.ru with ESMTP id S3590184AbXDZI2v (ORCPT ); Thu, 26 Apr 2007 12:28:51 +0400 X-Comment: RFC 2476 MSA function at smtp3.yandex.ru logged sender identity as: sql4-en Date: Thu, 26 Apr 2007 11:28:30 +0300 From: Dmitry Turin X-Mailer: The Bat! (v2.01) Personal Reply-To: Dmitry Turin X-Priority: 3 (Normal) Message-ID: <6012588843.20070426112830@narod.ru> To: pgsql-sql@postgresql.org Subject: Re: Fwd: Re[2]: We all are looped on Internet: request + transport = invariant In-Reply-To: <462F1781.4070501@archonet.com> References: <14110647859.20070413105812@narod.ru> <20070413150936.GA31517@phlogiston.dyndns.org> <1684192906.20070419090827@narod.ru> <20070419134808.GB14187@phlogiston.dyndns.org> <814860828.20070420120819@narod.ru> <4628A08F.9050804@archonet.com> <1177072978.760.40.camel@pampa> <7939450187.20070420185808@narod.ru> <1177095450.760.71.camel@pampa> <1312216062.20070423112045@narod.ru> <1177329421.737.39.camel@pampa> <3817356375.20070424150200@narod.ru> <462DFAD4.7030001@archonet.com> <3512994062.20070425113253@narod.ru> <462F1781.4070501@archonet.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=1.356 tagged_above=0 required=5 tests=AWL=-0.098, BAYES_40=-0.185, URIBL_SBL=1.639 X-Spam-Level: * X-Archive-Number: 200704/259 X-Sequence-Number: 28259 Good day, Richard. RH> RH> RH> RH> These three flights represent options RH> RH> RH> Tag is un-necessary (in point of view of DBMS theory). RH> 2. If you nest flights then you'll be forced to repeat data, surely? RH> Multiple routes could end up mentioning flight id=123 several times and RH> each time have to repeat all possible options from it. Yes. Remember, this is not manner of storing data in DBMS. This is manner to visualize for man. RH> I know whether a mentioned city is: RH> 1. the start point of a flight RH> 2. the end point of a flight "city.flight" - city is start point, "flight.city" - city is end point >> Nearly: sorting by first section of tree >> (maybe by second section and so on after that) >> is not seggested now >> (user can sort, for examle, in browser by XSL). RH> Hang on, XSL is *not* easier to understand than SQL. Yes. This means, that it's necessary to develop TML (or HTML: http://lists.w3.org/Archives/Public/public-html/2007Apr/1380.html). >> RH> syntax for these queries isn't obvious enough to me >> >> What is not-obvious - >> tree notation or work with fields inside section (record) in tree ? >> If all of them, what is more not-obvious ? RH> If I'm going to learn only one query language, it'll be SQL RH> because everything uses it. 'tablename >>;' is better, than to learn php, perl, its library >> XML is not stored thing, it is a transport form for scheme. RH> Umm - xml schemas, that describe valid data for an xml document. RH> http://www.w3.org/XML/Schema RH> http://www.xml.com/pub/a/2001/12/12/schemacompare.html Term "scheme" means "database scheme" to me :) RH> I'm sat here at my laptop, and I want to get a RH> list of flights into a spreadsheet I'm doing for my boss. Your boss will itself solve "task of travelling-salesman" ? By eyes ? RH> 1. How do I create my TML query (assuming I haven't read the TML manual, RH> because if I can read manuals then SQL is viable)? You start browser and open html-document on site of "list of flights". Html-documents send XML data to Postgres (to site). Postgres start function with name "main" http://sql4.by.ru/site/sql40/en/author/inout_eng.htm Function execute TML-request (it's made by authors of site !), and Postgres send results to your browser. You copy from browser into spreadsheet. Thus you don't need to write request. You will write TML-request, if you will author of site. RH> 3. How do I get results into the spreadsheet? It depends of data model: if your get tree - there is no way in general case (i think), if your get records of only one table/view: create view x as select city.name as start, city.name as end, flight.t1, flight.t2, day from city, flight; x >>; then you get ... RH> How does this TML setup avoid me having to write any RH> php/perl/etc?" Look example about site of "list of flights" above. RH> We're going to need a form that lets people choose from RH> a list of start and end cities, pick a date and see a list of flights RH> (sorted by cost, or length or some such). At present I'll build that RH> with e.g. PHP + SQL => PostgreSQL. What part of the process does TML RH> make easier? You use only SQL and small simple part (simple part !) of TML to transport data. P.S. Soon i add sorting into TML. Dmitry Turin http://html6.by.ru http://sql4.by.ru http://computer2.by.ru