I've used both, and both have their advantages. And both advantages have to do with portability (!). Using DBI is great if you want to write an application that can be relatively easily be ported to a different database (of course, if your SQL contains a lot of Sybase specific code, this advantage diminishes). It's also simple, and it's easier to find help from within the general Perl community.

Using Sybperl has the advantage that your API is quite close to the Sybase C libraries. If you are working in an environment where they use other languages to connect to Sybase, it does have its advantages to use a common API. I've worked in an environment where our products were written in C, using Sybase DB library (yeah, this was a while ago). I used Sybperl to help developers write their code by prototyping, debugging and optimizing.

I can't claim Sybperl is easier than the DBI - or that it's harder. If all you are doing is connecting to the database and repeat the cycle: prepare/execute/fetch/fetch/fetch, they're both simple. But the Sybase API is much richer than the API of the DBI (which is obvious, the API of the DBI needs to work for all databases). So you can probably write slightly more efficient code using Sybperl (but you probably needs very good knowledge of both Sybase and your data to be able to do so).

Another reason I liked Sybperl was the fact that I used to have the complete Sybase manuals available in dead tree format (but their manuals are available on-line as well: sybooks.sybase.com. One of the few software products which has a (free) manual more extensive and better than Perl)


In reply to Re: Sybperl vs Perl 5.8.4 DBI by Anonymous Monk
in thread Sybperl vs Perl 5.8.4 DBI by azstyx

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.