Received: from localhost (maia-1.hub.org [200.46.204.191]) by postgresql.org (Postfix) with ESMTP id 270D79F9C94 for ; Wed, 25 Apr 2007 05:55:42 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.191]) (amavisd-maia, port 10024) with ESMTP id 57558-09 for ; Wed, 25 Apr 2007 05:55:38 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from mail.metronet.co.uk (mail.metronet.co.uk [213.162.97.75]) by postgresql.org (Postfix) with ESMTP id 7235E9FA3AF for ; Wed, 25 Apr 2007 05:55:38 -0300 (ADT) Received: from server3.office.archonet.com (84-51-143-99.archon037.adsl.metronet.co.uk [84.51.143.99]) by smtp.metronet.co.uk (MetroNet Mail) with ESMTP id 1DDEB76963; Wed, 25 Apr 2007 09:55:30 +0100 (BST) Received: from [192.168.1.36] (dell36.office.archonet.com [192.168.1.36]) by server3.office.archonet.com (Postfix) with ESMTP id CE8FB2740EE; Wed, 25 Apr 2007 09:55:29 +0100 (BST) Message-ID: <462F1781.4070501@archonet.com> Date: Wed, 25 Apr 2007 09:55:29 +0100 From: Richard Huxton User-Agent: Thunderbird 2.0.0.0 (X11/20070326) MIME-Version: 1.0 To: Dmitry Turin , pgsql-sql@postgresql.org Subject: Re: Fwd: Re[2]: We all are looped on Internet: request + transport = invariant 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> In-Reply-To: <3512994062.20070425113253@narod.ru> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.61 tagged_above=0 required=5 tests=AWL=-0.979, BAYES_40=-0.185, FORGED_RCVD_HELO=0.135, URIBL_SBL=1.639 X-Spam-Level: X-Archive-Number: 200704/240 X-Sequence-Number: 28240 Don't forget to cc: the list. Dmitry Turin wrote: > Good day, Richard. > >>> http://sql4.by.ru/site/sql40/en/author/wave_eng.htm > RH> example 2 > RH> 1. I can see how one flight might follow another, but not contained. Do you > RH> not need some new object "flight_chain" or similar? > > No ! > Fork is possible, several flights might follow another, > thus several flights should be inside another. 1. One flight is not "contained" within another though. I board one plane, fly, get off, board another, fly, ... - they are sequential not contained. If you're trying to represent multiple options you should really have something like: These three flights represent options How do I get such a structure from a TML query? 2. If you nest flights then you'll be forced to repeat data, surely? Multiple routes could end up mentioning flight id=123 several times and each time have to repeat all possible options from it. > RH> 2. Alternatively, the needs to indicate to which it's > RH> referring either as / or or > RH> similar. > > What is 'either as / or ' ? Looking at the resultset, how do I know whether a mentioned city is: 1. the start point of a flight 2. the end point of a flight > RH> 3. How am I constructing these queries? > > There are five documents on > http://sql4.by.ru/site/sql40/en/author/index_eng.htm > > RH> The whole point was so I didn't have to learn SQL, yes? > > 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). Hang on, XSL is *not* easier to understand than SQL. > 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 ? The syntax of your queries is not obvious. I haven't read your guide, but you did say that the whole point was *not* to have to learn languages. If I'm going to learn only one query language, it'll be SQL because everything uses it. > RH> 4. what use it is to have XML without a schema. > > What is 'XML without a schema' ? > XML is not stored thing, it is a transport form for scheme. Umm - xml schemas, that describe valid data for an xml document. http://www.w3.org/XML/Schema http://www.xml.com/pub/a/2001/12/12/schemacompare.html > RH> How does this TML setup avoid me having to write any php/perl/etc? > > Any inquired tree An "inquired tree" how? I'm sat here at my laptop, and I want to get a list of flights into a spreadsheet I'm doing for my boss. 1. How do I create my TML query (assuming I haven't read the TML manual, because if I can read manuals then SQL is viable)? 2. How do I get my query from my laptop to my database server? 3. How do I get results into the spreadsheet? > (in reduction case - inquired one table or one view), > which is finished by '>>' at the end, > is in output automatically (port #80, HTTP protocol, > http://sql4.by.ru/site/sql40/en/author/inout_eng.htm > and > http://sql4.by.ru/site/sql40/en/author/introduction_eng.htm#http). You trimmed the first part of my question: "Let's say I want to build a holiday website. How does this TML setup avoid me having to write any php/perl/etc?" I'm a small travel agent, and I want to let customers see what flights I can offer them. We're going to need a form that lets people choose from a list of start and end cities, pick a date and see a list of flights (sorted by cost, or length or some such). At present I'll build that with e.g. PHP + SQL => PostgreSQL. What part of the process does TML make easier? -- Richard Huxton Archonet Ltd