Re: Need help with Tricky SELECT statements please.
From: Louis Davidson (dr_dontspamme_sql_at_hotmail.com)
Date: 04/21/04
- Next message: Michael Gunter: "Re: trailing little square"
- Previous message: John McGinty: "SQL 2000 Loop to send Email"
- In reply to: Joe Celko: "Re: Need help with Tricky SELECT statements please."
- Next in thread: Joe Celko: "Re: Need help with Tricky SELECT statements please."
- Reply: Joe Celko: "Re: Need help with Tricky SELECT statements please."
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 21 Apr 2004 10:27:24 -0500
> . and where it does not belong in a properly tiered architecture. But
> it sure gets the newbies, who fall into the trap, committed to just
> Microsoft forever, don't it?
It might get us hooked :) I was also taught early that it was best to do as
much manipulation using SQL as possible. I completely buy the idea of not
formatting data in the data layer, that is clear, but not shaping the output
seems very wrong to me. I gathered from my early learning (including a
seminar I attended with Dr David Rozenshtein, which really turned me from
average SQL Guy to a real believer in relational programming, including his
book The Essense of SQL) to use SQL to its fullest potential, because we can
take tasks that are tedious in a procedural programming language and turn
them into single SQL statements that replace thousands of lines of
procedural code. The best example was tree processing. Using a breadth
first algorithm, tree manipulations went from this recursive tree walking
with arrays to keep up with intermediate results, a simple query grouping by
level of tree and using sets of data to hold intermediate results.
The real question is can we build a properly tiered architecture that
includes a data manipulation tier that has the power of a relational
language, rather than a procedural one? It would seem to me that any kind
of shaping that we could do using set based manipulations should be done
that way. It is almost painful for me to consider taking a set row by row
and doing any kind of code on it.
-- ---------------------------------------------------------------------------- Louis Davidson (drsql@hotmail.com) Compass Technology Management Pro SQL Server 2000 Database Design http://www.apress.com/book/bookDisplay.html?bID=266 Note: Please reply to the newsgroups only unless you are interested in consulting services. All other replies will be ignored :) "Joe Celko" <jcelko212@earthlink.net> wrote in message news:uytq671JEHA.2456@TK2MSFTNGP12.phx.gbl... > >> So are you saying that we shouldn't use SQL to do grouped > (aggregated) mathematics? << > > Not at mixed levels of aggregation; that would not give us a table since > a table is a set of things of the same kind. > > >> This is going to become more murky as time goes by because the next > release of SQL Server will include far more powerful functionality to do > even more of the data-output shaping in the data tier, where it is so > much easier to code. << > > . and where it does not belong in a properly tiered architecture. But > it sure gets the newbies, who fall into the trap, committed to just > Microsoft forever, don't it? > > --CELKO-- > =========================== > Please post DDL, so that people do not have to guess what the keys, > constraints, Declarative Referential Integrity, datatypes, etc. in your > schema are. > > *** Sent via Developersdex http://www.developersdex.com *** > Don't just participate in USENET...get rewarded for it!
- Next message: Michael Gunter: "Re: trailing little square"
- Previous message: John McGinty: "SQL 2000 Loop to send Email"
- In reply to: Joe Celko: "Re: Need help with Tricky SELECT statements please."
- Next in thread: Joe Celko: "Re: Need help with Tricky SELECT statements please."
- Reply: Joe Celko: "Re: Need help with Tricky SELECT statements please."
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|