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

---------------------------(end of broadcast)---------------------------
TIP 3: Have you checked our extensive FAQ?

              http://www.postgresql.org/docs/faq

Reply via email to