Subject Re: [firebird-support] Re: UNION to return one record only not two
Author Michael Ludwig
Venus Software Operations schrieb am 29.09.2010 um 19:36 (+0530):
> Of course your experience counts, but I think there is a
> mindset that I need to have, a way to break up the problem
> that compliments a CTE. Is this something that reading theory
> can help me with? Is there some kind of question, way of
> looking that you can put in words that can help me in
> visioning CTEs?

Can't speak for SET, of course, but I frequently find that in
programming of any kind, it helps to think about the solutions
in terms that make it easy to code the solution, and only then
bother how to implement the pieces that make up the solution.

This is different from starting to think at the status quo, which
may lack the abstractions you need to solve the problem.

For example, there might be this terribly complicated JOIN, and
now you have to marry that to another complicated query. It's just
too much, detail overload. If the terribly complicated JOIN were a
VIEW with a suitable and expressive name, it would be easier to
reason about it.

Suitable abstractions (VIEW, CTE, function, procedure) are the
building blocks for both the software and your mind.

My two inflationary eurocents.

--
Michael Ludwig