Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Perl and Oracle

Re: Perl and Oracle

From: Mladen Gogala <gogala_at_sbcglobal.net>
Date: Tue, 11 Apr 2006 02:50:17 GMT
Message-Id: <pan.2006.04.11.02.50.16.735338@sbcglobal.net>


On Mon, 10 Apr 2006 17:00:01 +0000, xhoster wrote:

> Actually, it is very good software which doesn't support things like
> the array interface or direct loads.

Well, I can only say that our understanding of "good" and "bad" differ. Oracle program interfaces for C, C++ and Java certainly do support array interface. DBD::Oracle does not. That, in itself, is sufficient for DBD::Oracle to be considered mediocre at best.

>

>> I asked the author and the only answer was
>> that he's not paid for that.

>
> Which is true. Feel free to code those features up and contribute it to
> the open source community. I'd appreciate it, but I will continue to use
> DBD::Oracle whether you do that or not.

Now, your use of DBI and DBD::Oracle is something I deeply care about.

>

>> Perl cannot be used to load large files into
>> the database or download large query results to the file system.

>
> Strangely enough, I've used it for both of those things. Loading files
> with Perl isn't as fast as doing it with sqlldr, but then again why would
> you expect it to be? If you want to use sqlldr, use sqlldr. You can even
> use both, having the ctl point to a fifo for the input data and having
> Perl write to that fifo.

You don't have to do that. You can write to a flat file and then create an external table. No fifology necessary.

>

>> DBD::Oracle is a mere toy which works best with tables like SCOTT.EMP. It
>> was once stated here that Tim Bunce, the author of Perl is more inclined
>> to develop things for open source databases lie Postgres or MySQL then to
>> fix the driver for Oracle.  I happen to believe that is the case, despite
>> the vigorous denial.

>
> What was vigourously denied? Tim Bunce being the author of Perl?
> Or something else?
>
> Xho

I believe that Tim favors open source databases and that DBI supports features of PgSQL and MySQL while it doesn't support the same features of Oracle. In other words, Tim is biased.

I use Perl for years and I am quite fluent with Perl. I used DBI many times and I will continue to do so. The fact is that DBD::Oracle is a bad driver which doesn't support many important features. Pythian may improve it, but they haven't done anything yet. I do not let my love of Perl blind me. Perl is not the way, the truth and the life, will not save my soul and will not help me with fishing. There are things about Perl that I don't particularly like. @ISA array is one such thing. Tricks with %FIELDS, pseudo-hashes and "use Base" are something that makes Perl object model a disaster. I also do not like the fact that Perl doesn't have "switch" command. Yes, I know about the module. Things like typeglobs are enough to scare away even the bravest. Simply put, not everything in Perl is perfect. DBI is very far from being perfect. Array calls do not work work with Oracle because of the DBI semantics which require status for each row, while Oracle returns a status per operation. If an operation includes 1000 rows, you'll get a single status back. DML either succeeded or failed. You don't get status for each row. That was created for other databases and that is my argument for Tim's bias. Tim doesn't want to allow the call to return a single status, in which case it could be possible to support array interface for Oracle. DBD::Oracle also doesn't support threads, which is today a cardinal sin. You can use DBI with DBD::Oracle or not use it, I couldn't care less, but you cannot tell me that it's a good piece of software. It simply isn't. Period.

-- 
http://www.mgogala.com
Received on Mon Apr 10 2006 - 21:50:17 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US