dkode has asked for the wisdom of the Perl Monks concerning the following question:

Fellow Monks, Thank you for all the helpful information on the last meditation I posted, greatly appreciated. In regards to your advice to using something better than flat file database system I have decided to use MySQL with perl and DBI. I have downloaded MySQL for windows to play around on my home machine with activeperl and am wondering where is some of the best places to get tutorials for DBI and MySQL? I've touched on DBI a little about 6 months ago but found it confusing. I think since I have a better understanding of PERL now it might not be as hard

Thank you ahead of time..

DKode

"A computer is almost human - except that it doesn't blame it's mistakes on another computer."

Replies are listed 'Best First'.
Re: MySQL Question
by tadman (Prior) on Jun 08, 2001 at 04:47 UTC
    The O'Reilly response is mSQL and MySQL by Randy Jay Yarger, George Reese, and Tim King. It covers both C and Perl methods to access MySQL/mSQL. Once you get your feet wet, developing a basic understanding of the DBI methods, you will likely want to know more about SQL in general. I found it quite helpful when I was getting serious about DBI.

    For more documentation, you can either use the MySQL On-Line Documentation, which is quite good, or SQL In A Nutshell, also from O'Reilly, which handles MySQL, Oracle, and others. It provides much of the same information as the MySQL documentation.

    The trick is not only learning DBI, but really learning how to use SQL effectively.
Re: MySQL Question
by DrZaius (Monk) on Jun 08, 2001 at 08:33 UTC
    Did you have difficulties with DBI or SQL?

    The two are different beasts. SQL is a query language with very specific syntax. You generally do stuff like SELECT * FROM users. Your SQL engine will return all the values in the users table for this specific example.

    Each database (MySQL, PostgreSQL, Oracle, DB2, Access) has a different way for your application to connect to it. Some use ODBC, some use propietary sockets/socks.

    DBI is a universal frame work over top of all of these. DBI uses drivers, for example DBD::MySQL, to do the talking to the database. The interface in your code should stay the same. The idea is to be able to switch database back ends without changing your code.

    DBI supplies a few methods to pass the queries to the database and a few to retrieve the data. SQL tells the database what to return.

    I hope that helps a little.

Re: MySQL Question
by busunsl (Vicar) on Jun 08, 2001 at 11:18 UTC
      I just wanted to put my $.02 in. Programming the Perl DBI is a great book. I learned enough from it, to know where to jump to next. It doesnt cover everything, but from a concept standpoint, its perfect. At least it was for me.

      _14k4 - webmaster@poorheart.com (www.poorheart.com)
Re: MySQL Question
by perigeeV (Hermit) on Jun 08, 2001 at 16:49 UTC
    Since no one else mentioned it, MySQL by Monty Widenius is arguably the definitive text. It has a sizeable chapter on the Perl DBI and a reference appendix. The administration coverage is fairly OS neutral.