If you want to learn database programming, I would say that the first thing that you should do is to become familiar with the database in question - and that means installing and setting it up. MySQL is free to download and works on most platforms.

As to the existence of free services that you can connect to, they may exist, although I would find this unlikely. "Interesting" databases - ones that contain data - the odds are miniscule that anyone would let you have access to it. Would you let just anyone have remote access to your computer and your data? Most reasonable web hosting packages give you access to a MySQL database (or databases.) If you then go and install a ready-to-use Perl web application, you should then have an "interesting" database to examine. Look at the data from the command line client, do things to the application, look at the command line client again to see what has happened. (Note - not all hosting packages support Perl, nor will they all give you a command prompt to work with. You will not encounter this problem if you run things on your own machine(s).)

I would also suggest that you make the effort to get your head around MySQL before you start trying to do it through Perl. The DBI/DBD layer adds an extra level of complexity. Using the MySQL command line client, you can test your queries and get familiar with the way things work, then try to do the same thing through DBI. I write web applications with Perl and MySQL; if anything should ever behave strangely, the first thing I do is to copy the SQL that Perl is using and paste it into the MySQL command line client - it is far easier to find errors this way.

If you are really set about learning database programming with Perl, please, do your self a favour, go to dev.mysql.com and download the latest stable version for your platform. Then be sure to read the MySQL documentation and read the DBI documentation.

And above all, have fun! There's nothing so magical and wonderful as having Perl and SQL working together.


In reply to Re: DBI question by smiffy
in thread DBI question by mlegan

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.