[Gambas-user] Suggestion SQL object

Jean-Yves F. Barbier 12ukwn at ...626...
Sun Aug 9 21:44:00 CEST 2009


kobolds a écrit :
... 
>> ? A really good program doesn't contains much of SQL code, and if so, you
> just have
> to put it in only one class and that's all
> 
> the most funny things I ever heard . in my 9 years of programming
> experiences, I had been mostly involved in database programs . some of it so

That was a general remark.

> complex that endup over 80+ stored proc . sorry that I not sure about those
> programs that don't required much sql

Actually we don't play on the same ground: most of the projects I was involved
in used 400-4,000 stored procedures.
 
>> manual SQL coding as *always* been far superior to whatever tools you can
> use;
> one of the reasons is no DB absolutely follow the SQLxxxx standards, each
> have
> its idomatics AND, sometimes, these "specialties" are mandatory against a
> complex
> application 
> 
> yes manual coding is the best but why write when you have a tools to do it .
> I usually use the sql query tools . unless the tools can't do the things I
> want , I modify the code manually . this save you a lot of typing and error
> in case typo .

No, you didn't understood: any simple query, involving a few tables may be handled
by such a tool, but when you grow them complex, they can't because most of the time
they're not written by people that fully understand how a DB is working internally
nor the philosophy differences between DBs.
All *real* DBAs I met never ever use such things: they code manually.

=> "- some database that you do not wish or unable to have stored proc in it"
>> 1st case is a terrible nonsense, 2nd: don't use such a dump 
> I really don't understand this part . it 's not uncommon when your program
> don't have privilege to create stored procedure or in certain case you want
> to hide the code .

??? Alien code can *NEVER EVER* create any stored procedure (nor any object other
than a temporary table, and only for special purposes and users) in a DB; in what 
world are you living?
Do you fully understand what is the meaning of "stored procedures" : These are
SQL procedures (mostly, some can use foreign languages, such as C/C++/Python/
bash/...) that are stocked into the DB itself and called through they're
names from the client's code.

>> DB independant code is a popular DB rookies' myth: everybody producted such
> a driver/piece of
> code/addon/... however, if you dive into real good codes, you _never_ find
> such things: they all
> use specifics.  
> I don't understand this also . what so strange to be able to test your sql
> code without running your program . I know a lot programming tools provide
> such option . 

Ok, build an application with complexes and deterministics queries that involve a 
minimum of 10 tables and the creation of some temporary tables and you'll see what I mean; 
are you telling me you're gonna rewrite the same SQL code again and again when you're
working with e.g. supplier or client's documents?  when it is so easy to only have ONE 
stocked procedure to which you pass the correct arguments?

In any way the only SQL code you must have into a client is query (read) code and
nothing else.

> sorry to ask this. are we living in same era ? 

I don't think so: I always thought that mysql was, is and will be a piece of shit
and so forth with java - It is not because most of the industry and its lousy programmers 
think they're the best things in the world, that they are...

-- 
Monday, n.:
	In Christian countries, the day after the baseball game.
		-- Ambrose Bierce, "The Devil's Dictionary"




More information about the User mailing list