Re: Generating SQL
From: Topmind (topmind_at_technologist.com)
Date: 11/15/04
- Next message: Topmind: "Re: Switch Statements and Refactoring"
- Previous message: Lee Riemenschneider: "Re: Re: class diag associations & polymorphism"
- In reply to: Otavio C. Decio: "Re: Generating SQL"
- Next in thread: Otavio C. Decio: "Re: Generating SQL"
- Reply: Otavio C. Decio: "Re: Generating SQL"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 14 Nov 2004 18:49:01 -0800
"Otavio C. Decio" <REMOVEodecio@earthlink.REMOVE.net> wrote in message news:<vcCdndLJWpilFQjcRVn-3A@giganews.com>...
> "Topmind" <topmind@technologist.com> wrote in message
> news:4e705869.0411121919.7b8bc7e9@posting.google.com...
> >
> > Example? Java reflection is uuuuuugly. If you are an OO fan,
> > at least use something like Python.
>
> In my case I used C#, and reflection is part of the underlying common
> language runtime. It is very powerful, and much more mature than Java. Also,
> I had virtually no impact on performance. I can quickly scan the structure
> of a value object class and determine everything necessary to produce
> objects from the database - column names, types, max size, etc.
Scanning a bunch of column descripter classes for column
info sounds like a kind of data dictionary.
>
> > Until they overhaul/rid SQL with a better relational language,
> > I have not seen anything better than some amount of
> > concatenation. Some of SQL is easy to wrap and some is
> > not. I wrap the easy (repetative) parts, but usually
> > directly concatenate the rest. I believe it to be a
> > good compromise. Past attempts to wrap the entire thing
> > have failed. I could not predict ahead of time all
> > the variations in SQL I would encounter dispite
> > trying. Thus, I gave up the 100% route and went with
> > an 80% route. Beyond the 80%, the returns diminish such
> > that it does not pay anymore to try to wrap/abstract.
>
> Concatenate? No, thanks.Only if I have no way to represent the query in my
> wrapper.
>
> >
> > Wrap the low-hanging fruit only instead of pretending
> > you can wrap ALL of SQL with a simple interface.
>
> So far I found that there is plenty of low hanging fruit to be wrapped.
Well, anything is wrappable, but that does not necessarily mean
that it should be wrapped. You may end up inventing a custom
language that is uglier and/or less documented than SQL.
I'll take a standardized devil over a custom-rolled devil
in most cases. If you get hit by a bus and your replacement
cannot find the documentation for your custom query API,
they may be in for a lot of
work. But if you get hit by a bus, there are still plenty
of SQL books and resources available.
Any business app programmer who does not know SQL should
be fired anyhow. Programmers are a dime-a-dozen these days,
and if you cannot find one who knows SQL (in addition to
app language), you must be locked in car.
>
>
> Otavio
-T-
- Next message: Topmind: "Re: Switch Statements and Refactoring"
- Previous message: Lee Riemenschneider: "Re: Re: class diag associations & polymorphism"
- In reply to: Otavio C. Decio: "Re: Generating SQL"
- Next in thread: Otavio C. Decio: "Re: Generating SQL"
- Reply: Otavio C. Decio: "Re: Generating SQL"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|