pg.ddx.io pgsql-sql@postgresql.org mailing list archive
help / color / mirror / Atom feedFwd: Re[2]: We all are looped on Internet: request + transport = invariant
16+ messages / 4 participants
[nested] [flat]
* Fwd: Re[2]: We all are looped on Internet: request + transport = invariant
@ 2007-04-20 15:59 ` Dmitry Turin <sql4-en@narod.ru>
2007-04-23 07:00 ` Re: Fwd: Re[2]: We all are looped on Internet: request + transport = invariant Bart Degryse <Bart.Degryse@indicator.be>
3 siblings, 1 reply; 16+ messages in thread
From: Dmitry Turin @ 2007-04-20 15:59 UTC (permalink / raw)
To: pgsql-sql
>have you written a TML parser
No.
I want, that you and other people help me in that.
>do you have feedback from actual average users,
>that TML is indeed easier to use than SQL?
Yes.
TML was born in discuss with these users
(mainly nucleus physicists, optics , molecular biologists, zoologist
and ecologist)
>scheme apparently requires, that tables be defined in a special way
No.
Table must be created in traditional way (by "create table, alter
table") and not through browser.
User must use "create table", etc in database-terminal like "psql.exe".
> you'll be better off discussing this in comp.databases.theory
There are two reason to discuss TML in this forum:
1. postgres is my favorite database,
2. discussion not in theory forum, but in forum of real database
approach to realization in greater degree.
Dmitry Turin
http://html6.by.ru
http://sql4.by.ru
^ permalink raw reply [nested|flat] 16+ messages in thread
* Re: Fwd: Re[2]: We all are looped on Internet: request + transport = invariant
2007-04-20 15:59 ` Fwd: Re[2]: We all are looped on Internet: request + transport = invariant Dmitry Turin <sql4-en@narod.ru>
@ 2007-04-23 07:00 ` Bart Degryse <Bart.Degryse@indicator.be>
0 siblings, 0 replies; 16+ messages in thread
From: Bart Degryse @ 2007-04-23 07:00 UTC (permalink / raw)
To: pgsql-sql
If these people really work with hierarchically structured data, let
them try a hierarchical database (even though PostgreSQL is your
favourite database). They will profit 100fold from the advantages such a
database has for such data. I now several biologists specialized in
taxonomy (which is by nature hierarchically structured) and they all use
a hierarchical database for their data.
If these people want to output relational data in a hierarchical way
(eg XML), they will have to learn sql (to manage their data in a
relational database) and some xml library (in Perl, PHP, ASP or whatever
they like most) to transform what the database outputs into the way they
want it to look. Especially such people are quick learners and stating
they can't do that is simply unbelievable. Anyway there should always be
some IT guy in the neighbourhood to help them out. I suppose that would
be you.
Once again, don't try to let your sportscar fly. While it probably can
be done, using a plane is so much more logical.
>>> Dmitry Turin <sql4-en@narod.ru> 2007-04-20 17:59 >>>
TML was born in discuss with these users
(mainly nucleus physicists, optics , molecular biologists, zoologist
and ecologist)
^ permalink raw reply [nested|flat] 16+ messages in thread
* Fwd: Re[2]: We all are looped on Internet: request + transport = invariant
@ 2007-04-24 11:58 ` Dmitry Turin <sql4-en@narod.ru>
3 siblings, 0 replies; 16+ messages in thread
From: Dmitry Turin @ 2007-04-24 11:58 UTC (permalink / raw)
To: pgsql-sql
^ permalink raw reply [nested|flat] 16+ messages in thread
* Fwd: Re[2]: We all are looped on Internet: request+transport = invariant
@ 2007-04-24 12:00 ` Dmitry Turin <sql4-en@narod.ru>
2007-04-24 12:35 ` Re: Fwd: Re[2]: We all are looped on Internet:request+transport = invariant Dmitry Turin <sql4-en@narod.ru>
3 siblings, 1 reply; 16+ messages in thread
From: Dmitry Turin @ 2007-04-24 12:00 UTC (permalink / raw)
To: pgsql-sql
Good day, Bart.
> I'll continue with the analogy
Let's suppose, that you want to compare rational and hierarchical
DBMS instead of discussion about removing gaskets
(by the way, hierarchical DBMS also need gasket between itself and
external world).
Because TML should integrated inside rational DBMS,
I think, this comparison is useful too.
First, let's accept convention to not use metaphore.
It would be better, if we compare concrete details.
Bart, under your influence i want to download and
try hierarchical DBMS, which you list
(Adabas, GT.M., IMS, DMSII, Focus, Metakit).
That is so much important,
because my wish to add TML to PG is growing :)
Excuse me, Bart, our institution use only OS "Windows",
thus at first stage let conduct comparison between TML and
hierarchical DBMS only for "Windows".
Several revisions:
1. "Adabas" is this
http://www.softwareag.com/Corporate/products/adabas/download/default.asp
(ada51.zip, 31Mb)?
2. "GT.M" exists only form Unix-like OS.
3. "IMS, DMSII, Focus" - i don't find link to download
4. "Metakit" is this
http://www.softlookup.com/download.asp?id=6904
(metakit-2.01.tar.gz, 607 Kb).
Our users consider, that it is no database in general.
I agree with them.
Are you agree to make comparison in discussion with me?
Dmitry Turin
http://html6.by.ru
http://sql4.by.ru
http://computer2.by.ru
^ permalink raw reply [nested|flat] 16+ messages in thread
* Re: Fwd: Re[2]: We all are looped on Internet:request+transport = invariant
2007-04-24 12:00 ` Fwd: Re[2]: We all are looped on Internet: request+transport = invariant Dmitry Turin <sql4-en@narod.ru>
@ 2007-04-24 12:35 ` Dmitry Turin <sql4-en@narod.ru>
0 siblings, 0 replies; 16+ messages in thread
From: Dmitry Turin @ 2007-04-24 12:35 UTC (permalink / raw)
To: pgsql-sql
BD> Please stop using my personal email adsress in CC or BCC.
BD> Forum related mails should only be send to the forum!
I promise
BD> Several revisions:
BD> 1. "Adabas" is this
BD> http://www.softwareag.com/Corporate/products/adabas/download/default.asp
BD> (ada51.zip, 31Mb)?
BD> 2. "GT.M" exists only form Unix-like OS.
BD> 3. "IMS, DMSII, Focus" - i don't find link to download
BD> 4. "Metakit" is this
BD> http://www.softlookup.com/download.asp?id=6904
BD> (metakit-2.01.tar.gz, 607 Kb).
BD> Our users consider, that it is no database in general.
BD> I agree with them.
BD> Are you agree to make comparison in discussion with me?
And what's about comparison ?
Dmitry Turin
http://html6.by.ru
http://sql4.by.ru
http://computer2.by.ru
^ permalink raw reply [nested|flat] 16+ messages in thread
* Fwd: Re[2]: We all are looped on Internet: request + transport = invariant
@ 2007-04-24 12:02 ` Dmitry Turin <sql4-en@narod.ru>
2007-04-24 12:40 ` Re: Fwd: Re[2]: We all are looped on Internet: request + transport = invariant Richard Huxton <dev@archonet.com>
3 siblings, 1 reply; 16+ messages in thread
From: Dmitry Turin @ 2007-04-24 12:02 UTC (permalink / raw)
To: pgsql-sql
Good day, Joe.
>> >I would change your examples to use less abstract
>> > data, like department/employee, customer/product/order/order_line
J> I contend that then you'd find more people
J> receptive to your ideas or at least able to criticize them from more
J> concrete viewpoints.
I expected, that you already read
http://sql4.by.ru/site/sql40/en/author/wave_eng.htm
(i added output into this paper).
Case of "department/employee" is "Example 1" on this paper.
Dmitry Turin
http://html6.by.ru
http://sql4.by.ru
http://computer2.by.ru
^ permalink raw reply [nested|flat] 16+ messages in thread
* Re: Fwd: Re[2]: We all are looped on Internet: request + transport = invariant
2007-04-24 12:02 ` Fwd: Re[2]: We all are looped on Internet: request + transport = invariant Dmitry Turin <sql4-en@narod.ru>
@ 2007-04-24 12:40 ` Richard Huxton <dev@archonet.com>
2007-04-25 08:55 ` Re: Fwd: Re[2]: We all are looped on Internet: request + transport = invariant Richard Huxton <dev@archonet.com>
0 siblings, 1 reply; 16+ messages in thread
From: Richard Huxton @ 2007-04-24 12:40 UTC (permalink / raw)
To: Dmitry Turin <sql4-en@narod.ru>; +Cc: pgsql-sql
Dmitry Turin wrote:
> Good day, Joe.
>
>>>> I would change your examples to use less abstract
>>>> data, like department/employee, customer/product/order/order_line
>
> J> I contend that then you'd find more people
> J> receptive to your ideas or at least able to criticize them from more
> J> concrete viewpoints.
>
> I expected, that you already read
> http://sql4.by.ru/site/sql40/en/author/wave_eng.htm
> (i added output into this paper).
> Case of "department/employee" is "Example 1" on this paper.
I'd not expect people to read lengthy articles on a general-questions
mailing list, but I've skimmed at least as far as example 2.
1. What does it mean for one flight to be contained within another? I
can see how one flight might follow another, but not contained. Do you
not need some new object "flight_chain" or similar?
2. Surely a flight should contain two cities (since it connects two
cities). Alternatively, the <city> needs to indicate to which it's
referring either as <startcity>/<endcity> or <city fromto="start"> or
similar.
3. How am I constructing these queries? The whole point was so I didn't
have to learn SQL, yes? Unfortunately, the syntax for these queries
isn't obvious enough to me that I can see how to write them without some
form of query-builder, or reference manual.
4. How am I using these queries? I'm still not clear what use it is to
have XML without a schema. Let's say I want to build a holiday website.
How does this TML setup avoid me having to write any php/perl/etc?
--
Richard Huxton
Archonet Ltd
^ permalink raw reply [nested|flat] 16+ messages in thread
* Re: Fwd: Re[2]: We all are looped on Internet: request + transport = invariant
2007-04-24 12:02 ` Fwd: Re[2]: We all are looped on Internet: request + transport = invariant Dmitry Turin <sql4-en@narod.ru>
2007-04-24 12:40 ` Re: Fwd: Re[2]: We all are looped on Internet: request + transport = invariant Richard Huxton <dev@archonet.com>
@ 2007-04-25 08:55 ` Richard Huxton <dev@archonet.com>
2007-04-26 08:28 ` Re: Fwd: Re[2]: We all are looped on Internet: request + transport = invariant Dmitry Turin <sql4-en@narod.ru>
2007-04-26 08:31 ` Re: Fwd: Re[2]: We all are looped on Internet: request + transport = invariant Dmitry Turin <sql4-en@narod.ru>
2007-04-26 08:44 ` Re: Fwd: Re[2]: We all are looped on Internet: request + transport = invariant Richard Huxton <dev@archonet.com>
0 siblings, 3 replies; 16+ messages in thread
From: Richard Huxton @ 2007-04-25 08:55 UTC (permalink / raw)
To: Dmitry Turin <sql4-en@narod.ru>; pgsql-sql
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/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
^ permalink raw reply [nested|flat] 16+ messages in thread
* Re: Fwd: Re[2]: We all are looped on Internet: request + transport = invariant
2007-04-24 12:02 ` Fwd: Re[2]: We all are looped on Internet: request + transport = invariant Dmitry Turin <sql4-en@narod.ru>
2007-04-24 12:40 ` Re: Fwd: Re[2]: We all are looped on Internet: request + transport = invariant Richard Huxton <dev@archonet.com>
2007-04-25 08:55 ` Re: Fwd: Re[2]: We all are looped on Internet: request + transport = invariant Richard Huxton <dev@archonet.com>
@ 2007-04-26 08:28 ` Dmitry Turin <sql4-en@narod.ru>
2007-04-26 11:53 ` Re: Fwd: Re[2]: We all are looped on Internet: request + transport = invariant Andrew Sullivan <ajs@crankycanuck.ca>
2 siblings, 1 reply; 16+ messages in thread
From: Dmitry Turin @ 2007-04-26 08:28 UTC (permalink / raw)
To: pgsql-sql
Good day, Richard.
RH> <flight_chain ...>
RH> <flight_options>
RH> <flight...>
RH> <flight...> These three flights represent options
RH> <flight...>
RH> </flight_options>
RH> </flight_chain>
Tag <flight_options> 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
<x start="A" end="B" t1="5.00" t2="7.00" day="monday">
...
<x start="K" end="L" t1="15.00" t2="17.00" day="sunday">
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
^ permalink raw reply [nested|flat] 16+ messages in thread
* Re: Fwd: Re[2]: We all are looped on Internet: request + transport = invariant
2007-04-24 12:02 ` Fwd: Re[2]: We all are looped on Internet: request + transport = invariant Dmitry Turin <sql4-en@narod.ru>
2007-04-24 12:40 ` Re: Fwd: Re[2]: We all are looped on Internet: request + transport = invariant Richard Huxton <dev@archonet.com>
2007-04-25 08:55 ` Re: Fwd: Re[2]: We all are looped on Internet: request + transport = invariant Richard Huxton <dev@archonet.com>
2007-04-26 08:28 ` Re: Fwd: Re[2]: We all are looped on Internet: request + transport = invariant Dmitry Turin <sql4-en@narod.ru>
@ 2007-04-26 11:53 ` Andrew Sullivan <ajs@crankycanuck.ca>
2007-04-27 13:42 ` Re: Fwd: Re[2]: We all are looped on Internet: request + transport = invariant Dmitry Turin <sql4-en@narod.ru>
0 siblings, 1 reply; 16+ messages in thread
From: Andrew Sullivan @ 2007-04-26 11:53 UTC (permalink / raw)
To: pgsql-sql
On Thu, Apr 26, 2007 at 11:28:30AM +0300, Dmitry Turin wrote:
>
> Yes.
> Remember, this is not manner of storing data in DBMS.
> This is manner to visualize for man.
So all of this sound and fury is not, as we have been understanding
it, over some fundamental change to the way Pg works, but is instead
some sort of veneer over the face of it? In that case, why not just
write some user-space application that takes this (IMO useless) TML
and translates it into proper SQL? You don't need to make any
changes to Postgres at all, it seems.
A
--
Andrew Sullivan | ajs@crankycanuck.ca
Information security isn't a technological problem. It's an economics
problem.
--Bruce Schneier
^ permalink raw reply [nested|flat] 16+ messages in thread
* Re: Fwd: Re[2]: We all are looped on Internet: request + transport = invariant
2007-04-24 12:02 ` Fwd: Re[2]: We all are looped on Internet: request + transport = invariant Dmitry Turin <sql4-en@narod.ru>
2007-04-24 12:40 ` Re: Fwd: Re[2]: We all are looped on Internet: request + transport = invariant Richard Huxton <dev@archonet.com>
2007-04-25 08:55 ` Re: Fwd: Re[2]: We all are looped on Internet: request + transport = invariant Richard Huxton <dev@archonet.com>
2007-04-26 08:28 ` Re: Fwd: Re[2]: We all are looped on Internet: request + transport = invariant Dmitry Turin <sql4-en@narod.ru>
2007-04-26 11:53 ` Re: Fwd: Re[2]: We all are looped on Internet: request + transport = invariant Andrew Sullivan <ajs@crankycanuck.ca>
@ 2007-04-27 13:42 ` Dmitry Turin <sql4-en@narod.ru>
0 siblings, 0 replies; 16+ messages in thread
From: Dmitry Turin @ 2007-04-27 13:42 UTC (permalink / raw)
To: pgsql-sql
Good day, Andrew.
AS> translates it into proper SQL?
How are you going to send and get XML-data by SQL ?
Dmitry Turin
http://html6.by.ru
http://sql4.by.ru
http://computer2.by.ru
^ permalink raw reply [nested|flat] 16+ messages in thread
* Re: Fwd: Re[2]: We all are looped on Internet: request + transport = invariant
2007-04-24 12:02 ` Fwd: Re[2]: We all are looped on Internet: request + transport = invariant Dmitry Turin <sql4-en@narod.ru>
2007-04-24 12:40 ` Re: Fwd: Re[2]: We all are looped on Internet: request + transport = invariant Richard Huxton <dev@archonet.com>
2007-04-25 08:55 ` Re: Fwd: Re[2]: We all are looped on Internet: request + transport = invariant Richard Huxton <dev@archonet.com>
@ 2007-04-26 08:31 ` Dmitry Turin <sql4-en@narod.ru>
2 siblings, 0 replies; 16+ messages in thread
From: Dmitry Turin @ 2007-04-26 08:31 UTC (permalink / raw)
To: pgsql-sql
Good day, Richard.
RH> <flight_chain ...>
RH> <flight_options>
RH> <flight...>
RH> <flight...> These three flights represent options
RH> <flight...>
RH> </flight_options>
RH> </flight_chain>
Tag <flight_options> 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
<x start="A" end="B" t1="5.00" t2="7.00" day="monday">
...
<x start="K" end="L" t1="15.00" t2="17.00" day="sunday">
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.
P.P.S.
Richard, send letter only to mailing list, not to me.
Dmitry Turin
http://html6.by.ru
http://sql4.by.ru
http://computer2.by.ru
^ permalink raw reply [nested|flat] 16+ messages in thread
* Re: Fwd: Re[2]: We all are looped on Internet: request + transport = invariant
2007-04-24 12:02 ` Fwd: Re[2]: We all are looped on Internet: request + transport = invariant Dmitry Turin <sql4-en@narod.ru>
2007-04-24 12:40 ` Re: Fwd: Re[2]: We all are looped on Internet: request + transport = invariant Richard Huxton <dev@archonet.com>
2007-04-25 08:55 ` Re: Fwd: Re[2]: We all are looped on Internet: request + transport = invariant Richard Huxton <dev@archonet.com>
@ 2007-04-26 08:44 ` Richard Huxton <dev@archonet.com>
2007-04-26 10:27 ` Re: Fwd: Re[2]: We all are looped on Internet: request + transport = invariant Dmitry Turin <sql4-en@narod.ru>
2 siblings, 1 reply; 16+ messages in thread
From: Richard Huxton @ 2007-04-26 08:44 UTC (permalink / raw)
To: Dmitry Turin <sql4-en@narod.ru>; +Cc: pgsql-sql
Dmitry Turin wrote:
> Good day, Richard.
>
> RH> <flight_chain ...>
> RH> <flight_options>
> RH> <flight...>
> RH> <flight...> These three flights represent options
> RH> <flight...>
> RH> </flight_options>
> RH> </flight_chain>
>
> Tag <flight_options> is un-necessary (in point of view of DBMS theory).
But that's what you're describing isn't it?
1. A journey (flight_chain) between city A and city Z consists of one or
more flights.
2. The next flight has to start at the current city, but there may be
several flights to choose from.
3. The last flight must end at city Z.
Now stage 2 groups the flights to choose among - you can call it
something else, but the equivalent of flight_options is there.
> 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.
So how do I know it's repeated without grabbing a pencil and paper and
scrolling back and fore to compare them?
> 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).
Are you sure this wouldn't just be easier if you wrote a specialised
data-visualiser application?
>>> 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
But you're not doing the same thing.
>>> 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 :)
But you were talking about XML at the time.
> 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 ?
No, but my boss wants a list of flights from London to Madrid for next
Friday, with prices, times etc.
> 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.
So what does it matter to me as a user whether the site is written in
TML+Java or SQL+Java?
And if I'm building the site in PHP anyway (and I'm going to need
forms/buttons/etc in some language) then what am I gaining from the TML?
> 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 >>;
Hang on - you're using SQL. Why not just use pgadmin and paste the
results from my query if I'm using SQL anyway?
>
> then you get
>
> <x start="A" end="B" t1="5.00" t2="7.00" day="monday">
> ...
> <x start="K" end="L" t1="15.00" t2="17.00" day="sunday">
>
> 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.
Sorry - you didn't eliminate any code there.
> 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.
But the transport of the data is trivial, assuming I have a webserver
and PHP/Perl/ASP/etc. available.
--
Richard Huxton
Archonet Ltd
^ permalink raw reply [nested|flat] 16+ messages in thread
* Re: Fwd: Re[2]: We all are looped on Internet: request + transport = invariant
2007-04-24 12:02 ` Fwd: Re[2]: We all are looped on Internet: request + transport = invariant Dmitry Turin <sql4-en@narod.ru>
2007-04-24 12:40 ` Re: Fwd: Re[2]: We all are looped on Internet: request + transport = invariant Richard Huxton <dev@archonet.com>
2007-04-25 08:55 ` Re: Fwd: Re[2]: We all are looped on Internet: request + transport = invariant Richard Huxton <dev@archonet.com>
2007-04-26 08:44 ` Re: Fwd: Re[2]: We all are looped on Internet: request + transport = invariant Richard Huxton <dev@archonet.com>
@ 2007-04-26 10:27 ` Dmitry Turin <sql4-en@narod.ru>
2007-04-26 12:43 ` Re: Fwd: Re[2]: We all are looped on Internet: request + transport = invariant Richard Huxton <dev@archonet.com>
0 siblings, 1 reply; 16+ messages in thread
From: Dmitry Turin @ 2007-04-26 10:27 UTC (permalink / raw)
To: pgsql-sql
Good day, Richard.
>> RH> <flight_chain ...>
>> RH> <flight_options>
>> RH> <flight...>
>> RH> <flight...> These three flights represent options
>> RH> <flight...>
>> RH> </flight_options>
>> RH> </flight_chain>
RH> 1. A journey (flight_chain) between city A and city Z consists of one or
RH> more flights.
RH> 2. The next flight has to start at the current city, but there may be
RH> several flights to choose from.
RH> 3. The last flight must end at city Z.
RH> Now stage 2 groups the flights to choose among - you can call it
RH> something else, but the equivalent of flight_options is there.
Tag "city" executed the same role in my version,
that tag "flight_chain" in your version.
>> 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> So how do I know it's repeated without grabbing a pencil and paper and
RH> scrolling back and fore to compare them?
Write XML-form, which illustrate, what are you want.
I will write request.
RH> Are you sure this wouldn't just be easier if you wrote a specialised
RH> data-visualiser application?
Avarage used can not use library of intermediate language
to join DBMS and browser.
P.S.
Programmers are small percent of all users.
>> 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
RH> But you're not doing the same thing.
I'm not doing? I have write example!
>> Term "scheme" means "database scheme" to me :)
RH> But you were talking about XML at the time.
XML is not stored thing, it is a transport form for scheme.
Let's ask concrete questions, ok?
>> 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> No, but my boss wants a list of flights from London to Madrid for next
RH> Friday, with prices, times etc.
Direct flight?
#city[name="London"].flight/c1:c2[#c1 #c2 #day="friday"].#city[name="Madrid"] >>;
Roundabout flight?
#city[name="London"].(flight/c1:c2[#day="friday" t1-^^.t2>30min].city)*||name="Madrid" ;
Prices and times is attributes of FLIGHT.
These are in Example 2.
http://sql4.by.ru/site/sql40/en/author/wave_eng.htm
RH> So what does it matter to me as a user
User only use.
Difference between realizations of site is important only for authors
of site.
RH> whether the site is written in TML+Java
What will Java do ?
RH> And if I'm building the site in PHP anyway (and I'm going to need
RH> forms/buttons/etc in some language) then what am I gaining from the TML?
>> create view x as
>> select city.name as start, city.name as end, flight.t1, flight.t2, day
>> from city, flight;
>> x >>;
RH> Hang on - you're using SQL. Why not just use pgadmin and paste the
RH> results from my query if I'm using SQL anyway?
paste by hands?
RH> Sorry - you didn't eliminate any code there.
I simplify code.
Compare call of php library for database, getting record set,
embrace records in circle by html-tags, call php library for
http-communication.
RH> But the transport of the data is trivial, assuming I have a webserver
RH> and PHP/Perl/ASP/etc. available.
1. Speak not about you, but about average user.
You don't know real statistics.
2. Even you make superfluous job.
Dmitry Turin
http://html6.by.ru
http://sql4.by.ru
http://computer2.by.ru
^ permalink raw reply [nested|flat] 16+ messages in thread
* Re: Fwd: Re[2]: We all are looped on Internet: request + transport = invariant
2007-04-24 12:02 ` Fwd: Re[2]: We all are looped on Internet: request + transport = invariant Dmitry Turin <sql4-en@narod.ru>
2007-04-24 12:40 ` Re: Fwd: Re[2]: We all are looped on Internet: request + transport = invariant Richard Huxton <dev@archonet.com>
2007-04-25 08:55 ` Re: Fwd: Re[2]: We all are looped on Internet: request + transport = invariant Richard Huxton <dev@archonet.com>
2007-04-26 08:44 ` Re: Fwd: Re[2]: We all are looped on Internet: request + transport = invariant Richard Huxton <dev@archonet.com>
2007-04-26 10:27 ` Re: Fwd: Re[2]: We all are looped on Internet: request + transport = invariant Dmitry Turin <sql4-en@narod.ru>
@ 2007-04-26 12:43 ` Richard Huxton <dev@archonet.com>
2007-05-02 14:19 ` Re: Fwd: Re[2]: We all are looped on Internet: request + transport = invariant Richard Huxton <dev@archonet.com>
0 siblings, 1 reply; 16+ messages in thread
From: Richard Huxton @ 2007-04-26 12:43 UTC (permalink / raw)
To: Dmitry Turin <sql4-en@narod.ru>; +Cc: pgsql-sql
Dmitry Turin wrote:
> Good day, Richard.
>
>>> RH> <flight_chain ...>
>>> RH> <flight_options>
>>> RH> <flight...>
>>> RH> <flight...> These three flights represent options
>>> RH> <flight...>
>>> RH> </flight_options>
>>> RH> </flight_chain>
> RH> 1. A journey (flight_chain) between city A and city Z consists of one or
> RH> more flights.
> RH> 2. The next flight has to start at the current city, but there may be
> RH> several flights to choose from.
> RH> 3. The last flight must end at city Z.
> RH> Now stage 2 groups the flights to choose among - you can call it
> RH> something else, but the equivalent of flight_options is there.
>
> Tag "city" executed the same role in my version,
> that tag "flight_chain" in your version.
No, it didn't.
>>> 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> So how do I know it's repeated without grabbing a pencil and paper and
> RH> scrolling back and fore to compare them?
>
> Write XML-form, which illustrate, what are you want.
> I will write request.
What's that got to do with knowing whether a particular tag is repeated
elsewhere in a long list.
> RH> Are you sure this wouldn't just be easier if you wrote a specialised
> RH> data-visualiser application?
>
> Avarage used can not use library of intermediate language
> to join DBMS and browser.
No, I said write your own "TML browser".
> P.S.
> Programmers are small percent of all users.
>
>>> 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
> RH> But you're not doing the same thing.
>
> I'm not doing? I have write example!
No, you've provided a way of reformatting query results as XML. That's
not the same as a public-facing website at all. You don't think British
Airways will have people querying their database by entering TML queries?
>>> Term "scheme" means "database scheme" to me :)
> RH> But you were talking about XML at the time.
>
> XML is not stored thing, it is a transport form for scheme.
> Let's ask concrete questions, ok?
>
>>> 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> No, but my boss wants a list of flights from London to Madrid for next
> RH> Friday, with prices, times etc.
>
> Direct flight?
> #city[name="London"].flight/c1:c2[#c1 #c2 #day="friday"].#city[name="Madrid"] >>;
>
> Roundabout flight?
> #city[name="London"].(flight/c1:c2[#day="friday" t1-^^.t2>30min].city)*||name="Madrid" ;
>
> Prices and times is attributes of FLIGHT.
> These are in Example 2.
> http://sql4.by.ru/site/sql40/en/author/wave_eng.htm
>
> RH> So what does it matter to me as a user
>
> User only use.
> Difference between realizations of site is important only for authors
> of site.
So who it *is* the programmer who is using TML then?
> RH> whether the site is written in TML+Java
>
> What will Java do ?
As I said in my previous post, everything else (see next two lines
you've quoted).
> RH> And if I'm building the site in PHP anyway (and I'm going to need
> RH> forms/buttons/etc in some language) then what am I gaining from the TML?
>
>>> create view x as
>>> select city.name as start, city.name as end, flight.t1, flight.t2, day
>>> from city, flight;
>>> x >>;
> RH> Hang on - you're using SQL. Why not just use pgadmin and paste the
> RH> results from my query if I'm using SQL anyway?
>
> paste by hands?
>
> RH> Sorry - you didn't eliminate any code there.
>
> I simplify code.
Can't see it myself.
> Compare call of php library for database, getting record set,
> embrace records in circle by html-tags, call php library for
> http-communication.
I still don't see the sense in what you're saying. My process is:
1. User goes to website
2. User fills in PHP form: start city, end city, date he wants to fly.
3. PHP generates SQL query and submits to database
4. Database runs query result as table
5. PHP formats results as nicely formatted table with company logos etc.
6. User views results.
Yours is:
1. User goes to website
2. User fills in PHP form: start city, end city, date he wants to fly.
3. PHP generates TML query and submits to database
4. Database runs query result as XML
5. PHP formats results as nicely formatted table with company logos etc.
6. User views results.
What is saved?
And let's not say the user is viewing the raw XML because that's clearly
no use in a public-facing site.
> RH> But the transport of the data is trivial, assuming I have a webserver
> RH> and PHP/Perl/ASP/etc. available.
>
> 1. Speak not about you, but about average user.
But you just said the average user isn't building the application/website.
> You don't know real statistics.
> 2. Even you make superfluous job.
Sounds to me like you want to either build your own browser, or just
write a server-side application that receives TML and outputs XML. If
you're serious about this, I recommend looking around for a
PHP/Perl/Java programmer and hiring them for a week - that should be
more than enough.
Then, when you've got a few thousand users it will become clearer whats
actually required.
--
Richard Huxton
Archonet Ltd
^ permalink raw reply [nested|flat] 16+ messages in thread
* Re: Fwd: Re[2]: We all are looped on Internet: request + transport = invariant
2007-04-24 12:02 ` Fwd: Re[2]: We all are looped on Internet: request + transport = invariant Dmitry Turin <sql4-en@narod.ru>
2007-04-24 12:40 ` Re: Fwd: Re[2]: We all are looped on Internet: request + transport = invariant Richard Huxton <dev@archonet.com>
2007-04-25 08:55 ` Re: Fwd: Re[2]: We all are looped on Internet: request + transport = invariant Richard Huxton <dev@archonet.com>
2007-04-26 08:44 ` Re: Fwd: Re[2]: We all are looped on Internet: request + transport = invariant Richard Huxton <dev@archonet.com>
2007-04-26 10:27 ` Re: Fwd: Re[2]: We all are looped on Internet: request + transport = invariant Dmitry Turin <sql4-en@narod.ru>
2007-04-26 12:43 ` Re: Fwd: Re[2]: We all are looped on Internet: request + transport = invariant Richard Huxton <dev@archonet.com>
@ 2007-05-02 14:19 ` Richard Huxton <dev@archonet.com>
0 siblings, 0 replies; 16+ messages in thread
From: Richard Huxton @ 2007-05-02 14:19 UTC (permalink / raw)
To: Dmitry Turin <sql4-en@narod.ru>; pgsql-sql
Dmitry Turin wrote:
> Good day, Richard.
>
> RH> With 7 flights it is easy to see if #2 matches #4. With 700 it is not so
> RH> easy to see #2 matches #504. With a tree-structure it is impossible to
> RH> sort leaf nodes without restructuring the tree.
>
> What is "#2 matches #4" ?
Individual flights might occur in one or more options when building a
flight-plan.
> What sorting are you imply ?
None.
> To be in safe side:
> TML allow table as particular case of tree
> (when records of one table, i.e. nodes, have not sub-records, i.e. sub-nodes).
>
> RH> Never heard of eHTML, and I don't believe you can build a public-facing
> RH> website with it unless it's at least as complicated as php.
>
> I try
> http://lists.w3.org/Archives/Public/public-html/2007Apr/1384.html
> http://lists.w3.org/Archives/Public/public-html/2007Apr/1380.html
Nothing there to build a website with - by which I mean the logic
required for an interactive website.
>>> No. html-page send xml-data to TML-function "main".
>>> Without any PHP.
> RH> But it can't. It's HTML. You can't map arbitrary user-interface (e.g.
> RH> perhaps I want users to click on a map of the world to pick cities) to a
> RH> query language without some sort of glue language.
>
> You click on a map, and form send data to DBMS
> (DBMS listen port#80 and accept HTTP).
> What is impossible ?
1. HTML can't locate the nearest valid city based on where you clicked.
HTML+Javascript could perhaps, but you didn't want people learning
programming languages.
2. There isn't a database that listens on port 80 for HTTP
3. If there was, you'd still need it to translate a HTTP POST/GET into
an internal query (in SQL or TML if there existed an implementation of
TML). For non-trivial cases, that implies a programming language.
4. You'd still need logic to validate/transform input values and do the
same for output values. For non-trivial cases that involves a
programming language.
>>> RH> 5. PHP formats results
>>> TML extract xml to address of requester.
>
> RH> But no-one's going to want raw XML are they? They'll want properly
> RH> formatted results
>
> I agree.
> Results will formatted by CSS (or XSL).
>
> Even XSL is easier for scientists, than PHP-library.
Why are scientists building a flight-planning website?
--
Richard Huxton
Archonet Ltd
^ permalink raw reply [nested|flat] 16+ messages in thread
end of thread, other threads:[~2007-05-02 14:19 UTC | newest]
Thread overview: 16+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2007-04-20 15:59 ` Dmitry Turin <sql4-en@narod.ru>
2007-04-23 07:00 ` Bart Degryse <Bart.Degryse@indicator.be>
2007-04-24 11:58 ` Dmitry Turin <sql4-en@narod.ru>
2007-04-24 12:00 ` Fwd: Re[2]: We all are looped on Internet: request+transport = invariant Dmitry Turin <sql4-en@narod.ru>
2007-04-24 12:35 ` Re: Fwd: Re[2]: We all are looped on Internet:request+transport = invariant Dmitry Turin <sql4-en@narod.ru>
2007-04-24 12:02 ` Dmitry Turin <sql4-en@narod.ru>
2007-04-24 12:40 ` Richard Huxton <dev@archonet.com>
2007-04-25 08:55 ` Richard Huxton <dev@archonet.com>
2007-04-26 08:28 ` Dmitry Turin <sql4-en@narod.ru>
2007-04-26 11:53 ` Andrew Sullivan <ajs@crankycanuck.ca>
2007-04-27 13:42 ` Dmitry Turin <sql4-en@narod.ru>
2007-04-26 08:31 ` Dmitry Turin <sql4-en@narod.ru>
2007-04-26 08:44 ` Richard Huxton <dev@archonet.com>
2007-04-26 10:27 ` Dmitry Turin <sql4-en@narod.ru>
2007-04-26 12:43 ` Richard Huxton <dev@archonet.com>
2007-05-02 14:19 ` Richard Huxton <dev@archonet.com>
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