Re: Fwd: Re[2]: We all are looped on Internet: request + transport = invariant - Mailing list pgsql-sql

From Dmitry Turin
Subject Re: Fwd: Re[2]: We all are looped on Internet: request + transport = invariant
Date
Msg-id 13119753000.20070426132754@narod.ru
Whole thread Raw
In response to Re: Fwd: Re[2]: We all are looped on Internet: request + transport = invariant  (Richard Huxton <dev@archonet.com>)
Responses Re: Fwd: Re[2]: We all are looped on Internet: request + transport = invariant  (Richard Huxton <dev@archonet.com>)
List 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



pgsql-sql by date:

Previous
From: Richard Huxton
Date:
Subject: Re: plperlu hash problem
Next
From: Andrew Sullivan
Date:
Subject: Re: Fwd: Re[2]: We all are looped on Internet: request + transport = invariant