Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical

Re: Sybase DB Library vs Client Library API

by mpeppler (Vicar)
on Jun 07, 2012 at 08:19 UTC ( #974901=note: print w/replies, xml ) Need Help??

in reply to Sybase DB Library vs Client Library API

DB-Library is only minimally maintained - new features go into Client Library.

So don't use DB-Library for any new project - and in perl, use DBI/DBD::Sybase, not Sybase::CTlib unless you really need some of the more esoteric features that might not be available in DBI.


  • Comment on Re: Sybase DB Library vs Client Library API

Replies are listed 'Best First'.
Re^2: Sybase DB Library vs Client Library API
by perl@1983 (Sexton) on Aug 02, 2012 at 11:04 UTC
    Thanks for the reply Michael. I prefer DBI/DBD::Sybase as well. But, don't know the reason as to why. Could you please help to clarify why you advice using DBI over CTlib? Thanks again.


      The reason I prefer the DBI/DBD route is that you use the same interface for *any* database. Here at $work, I work with Oracle, MSSQL, SQLite and occasionally PostgreSQL. When I have to interact with a particular database, I don't have to ask myself questions like:

      • OK, how do I read a result set with *this* database?
      • Can I use placeholders in my query? If so, how do I do that?
      • What data structure get I get my results in?

      Since DBI provides a standardized interface, I can be immediately productive when I switch back to a database I use rarely, without having to reacquaint myself with a module I haven't used in a year.

      Sure, there are some occasional differences between the databases, but DBI / DBD lets me ignore most of them. Occasionally, I'll need a special database-specific feature and have to read DBD::Oracle or some such. But better that than having to read documentation on all the everyday operations for selecting, inserting, updating and deleting.

      That's my 1/50 of a dollar.


      When your only tool is a hammer, all problems look like your thumb.

        Thank you for the detailed reply roboticus. It is helpful.
      Same as roboticus, really - the DBI syntax is a little simpler, and the API is (mostly) standardized, so your scripts can be easily maintained by someone else who doesn't necessarily understand the CTlib API.

      And I'm more likely to fix things in DBD::Sybase these days...


        Thanks Michael. My team is working on migrating our scripts from DBlib (to either CTlib or DBD::Sybase). However, we are still discussing the pros and cons of CTlib vs DBD::Sybase. One of the things we noticed was the bcp in CTlib is much much faster as compared to the "Experimental Utility" in DBD::Sybase. Can you please help to clarify whether the "Experimental Bulk Load" utility in DBD::Sybase is doing inserts underlyingly and therefore slower? Thanks much.

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://974901]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (4)
As of 2023-03-24 19:19 GMT
Find Nodes?
    Voting Booth?
    Which type of climate do you prefer to live in?

    Results (61 votes). Check out past polls.