Re: Scripting language for DBAs

From: EricF <>
Date: Wed, 11 Apr 2012 02:37:19 GMT
Message-ID: <jm2qp5$4mg$>

In article <8831365.1411.1334098896986.JavaMail.geo-discussion-forums_at_vbbfj25>, onedbguru <> wrote:
>On Tuesday, April 10, 2012 12:02:00 PM UTC-4, joel garry wrote:
>> On Apr 9, 2:42=C2=A0pm, Mladen Gogala <
>> wrote:
>> > For a very, very long time indeed, Perl ruled supreme among the languag=
>> > to interface with a DB, be it Oracle, MySQL, Postgres or MS SQL. DBI wa=
>> > (and still is) a polished and useful interface which can do practically
>> > anything, from extracting query result and producing a quick little rep=
>> > using formats to complex things like copying Oracle to MySQL and doing =
>> > fast. Convenient things with Perl were:
>> >
>> > 1) Easy handling of piping and the ability to open commands by using
>> > =C2=A0 =C2=A0stuff like open(LPR,"|lpr")
>> > 2) Multitude of modules available on CPAN
>> > 3) Regular expressions, still unsurpassed in their versatility
>> > 4) Availability of tools like perltidy or perlcritic and Perl
>> > =C2=A0 =C2=A0syntax being well understood by both editors like Vim and =
>> > =C2=A0 =C2=A0systems like Emacs.
>> > 5) The fact that everybody knew it.
>> >
>> > I am now working for a company where everybody keeps telling that Perl =
>> > "old", Perl doesn't have an object model, it has a zoo instead, and tha=
>t I
>> > should learn Python. I tried. God and Larry Ellison know that I have tr=
>> > and gave it my best. The problem is, however, that I don't need a fully=
> OO
>> > language to extract result of a query and mail it to my PHB. I need the
>> > "format" command and MIME::Lite. I was able to write the script both in
>> > Perl and Python and lo and behold, Perl was shorter and more elegant.
>> >
>> > So, at risk that I am called a dinosaur, I am asking the respected
>> > colleagues from this group what do you you use? Is there anything even
>> > remotely akin to Perl "format" command in Python? Why is that guy van
>> > Rossum not on the FBI's most wanted list?
>> >
>> > --http://mgogala.freehos
>> Neither, although I've intended to become conversant in Perl since the
>> last century. I do most stuff in the sillly 4GL that the ERP system I
>> deal with is written in, and the rest in ksh and SQL, unless Oracle
>> makes me debug their Perl code.
>> Yesterday I was poking about on the tubes in a fog, and somewhere
>> someone blogged about Perl 6, and how it was so different than 5 that
>> it would lose all the institutional memory 5 and 5.10 has accumulated,
>> so everyone should go to bash. Everyone has their shibboleths, I
>> guess. (And looking the term up in Wikipedia, I learned something
>> new: 'The term originates from the Hebrew word
>> "shibb=C3=B3let" (=D7=A9=D6=B4=D7=81=D7=91=D6=B9=D6=BC=D7=9C=D6=B6=D7=AA)=
>, which literally means the part of a plant
>> containing grains, such as an ear of corn or a stalk of grain[3] or,
>> in different contexts, "stream, torrent".' Streams and BitTorent from
>> the ancients, who knew?)
>> jg
>> --
>> is bogus.
>> =E2=80=9Cdid not realize what he was doing was in violation of the law.=
>I guess the IT community has never learned their lessons... there are lots =
>of languages out there, scripting, 3GL, 4GL, OO, blah, blah, blah. Right no=
>w, everone is SOOO enamored with JAVA (piece-o-crap) and it's OO abilities.=
> There are things I have done in C that made JAVA look like "B". I once t=
>ook a JAVA app that just created a CSV output stream that was fed into SQLL=
>oader and re-wrote it in C. The JAVA version could only get up to about 60K=
> records/second ingested into the database. My "C" program did >1.8M record=
>s/sec. The original was Perl/MySQL - it did approximately 20K/min. (yes..=
>.. per minute). Moral of the story:
>There was one more thing really bugs me... and that is the script kiddies t=
>hat copy all of these "frameworks" to make their job easy, when all it does=
> is show their laziness and ignorance. Yes, some them do cool stuff - but =
>most perform like a PC/AT-286 with 16MB of main memory and 2 floppy disks t=
>rying to run Window7. Computer languages are really not that hard to figure=
> out. They all do the same thing, they just do them differently.

So how often are they used and how fast do they need to be? Using a 3GL like C or Java you can get things running fast, but coding and debugging - and maintaining code - take time. Writing a 1 off with a script can make a lot of sense. But if you have a high volume system and coe that needs to be run again and again, I agree with you.

Eric Received on Tue Apr 10 2012 - 21:37:19 CDT

Original text of this message