Re: SQL for presentation

From: Bob Badour <bbadour_at_pei.sympatico.ca>
Date: Wed, 05 Jul 2006 12:39:19 GMT
Message-ID: <XpOqg.6531$pu3.146044_at_ursa-nb00s0.nbnet.nb.ca>


frebe73_at_gmail.com wrote:

> At this forum, it is often claimed that almost all kind of data
> transformation could be done using SQL select statements.

Many of us think SQL should be abandoned entirely so I am not quite sure where you got that idea.

  It is also
> claimed that the "business logic" should be implemented in the database
> as views and the application on top of the database only should be
> responsible for presentation (and communication).

I am not sure where you got that message either. If one has significant data management needs and has a data management system available, one can leverage the latter for the former. Whether one uses one feature of the data management system or another is a matter for design.

> In web applications, the presentation - HTML - is a data structure. If
> select statements could make almost any kind of data transformation,
> why couldn't we use select statements to produce the HTML text?

Relations state facts. That is not to say that relations state the same facts in any arbitrary structure or with any arbitrary formatting.

  I see a
> problem in the fact that HTML is hierachial and select statements
> doesn't seem suitable for returning hierachial results. But what if a
> relational version of HTML existed, would the select statement be
> suitable for buildning the GUI too?

If you are asking whether one could devise a relational schema to describe a document or user interface, the answer is obviously yes. Received on Wed Jul 05 2006 - 14:39:19 CEST

Original text of this message