From: Richard Huxton <dev@archonet.com>
To: Dmitry Turin <sql4-en@narod.ru>
To: pgsql-sql@postgresql.org
Subject: Re: Fwd: Re[2]: We all are looped on Internet: request + transport = invariant
Date: Wed, 25 Apr 2007 09:55:29 +0100
Message-ID: <462F1781.4070501@archonet.com> (raw)
In-Reply-To: <3512994062.20070425113253@narod.ru>
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>
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:
<flight_chain ...>
<flight_options>
<flight...>
<flight...> These three flights represent options
<flight...>
</flight_options>
</flight_chain>
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 <city> needs to indicate to which it's
> RH> referring either as <startcity>/<endcity> or <city fromto="start"> or
> RH> similar.
>
> What is 'either as <startcity>/<endcity> or <city fromto="start">' ?
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/Schemahttp://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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: dev@archonet.com, sql4-en@narod.ru
Subject: Re: Fwd: Re[2]: We all are looped on Internet: request + transport = invariant
In-Reply-To: <462F1781.4070501@archonet.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox