in reply to mySQL hits or Storable retrieves?

Just a thought - I'm working on a MySQL-based CGI which gets lots of hits, and in retrospect I slightly wish I'd worked with PostGreSQL, or at least used DBD instead of DBI, because this would have allowed me to use transactions to manage conflicts between different users at the same time. The alternative I settled on, file locking, feels a bit clunky. this thread has more if you want it.

§ George Sherston

Replies are listed 'Best First'.
Re: Re: mySQL hits or Storable retrieves?
by htoug (Deacon) on Oct 03, 2001 at 11:11 UTC
    or at least used DBD instead of DBI

    That is meaningless.

    When you use DBI you use a DBD as well - namely the Database Driver for the database system you use.

      Sorry not to be more clear. I intended to contrast what I understand to be two separate modules, namely DBI and DBD::mysql. At the moment I use the former, which is v straightforward and easy to learn; but (so far as I can make out) unlike DBD::mysql it doesn't support MySQL transactions. If DBI does support MySQL transactions I'd be glad to hear of it! But as you can see from the thread I linked to, my interim conclusion is that it doesn't, whereas DBD:mysql does. My main point is, that if I start out on a project like this in future, I'll make sure I use a DBMS / driver combo that lets me do transactions.

      § George Sherston
        DBI does not support MySQL.
        DBD::MySQL is the module that DBI uses to support MySQL.
        DBD::MySQL is only able to support transactions as far as MySQL can, ie afaik not at all.
        Maybe you are thinking of the MySQL module, an old (and obsoleted) perl4 (?) compatibility mode module?

        Appendix B of the Cheeta book describes the differences between the different database systems that the DBI-drivers support (or to be more correct: describes the way that the drivers implement and/or support the many DBI features, eg date-formats, transaction handling, blob handling), and is definitely worth reading if you use the DBI.