Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Comment on

( #3333=superdoc: print w/ replies, xml ) Need Help??
Here's some reading from the Tutorials section.

Reading from a database
The fine art of database programming

It's a pretty broad question though. I'm sure the number of books written on the subject numbers in the hundreds. You'll get some better answers, but personally, I use them because it just makes it so darn easy to work with large amounts of data. Not only that, but you can relate different sets of data together. Make it look the way want when you output it. Massage the data however you want. Plus most database engines can be made to do quite a bit of work for you, as opposed to having to write the code yourself. For a simple example, if you had a database of, say, students and you wanted to know how many students you had in the database. Instead of having to script a counter and cycle through the database, just a single sql query will give you the results: select count(*) from students_db.

Or, like one of my own hobby projects that I've fiddled with, a restaurant database. A database engine makes it very very easy to display a listing of, say, Italian restaurants. Then make it so that clicking on one of the entries displays the address and phone number.

There are many other advantages as well. Platform independence, it doesn't (necessarily) matter from what platform you're accessing the database engine. IIRC, ebay uses Microsoft webservers accessing an oracle database installed on a Sun 15K. Speed is another issue. Database engines are designed to do this stuff, so the more work you can offload from your script onto the database, generally speaking, the faster you can make your application. This is a major area where one database engine can outshine another, by how much of the work that it can do *for* you.

--
"I just read perlman:perlboot," said Tom, objectively.
naChoZ


In reply to Re: On Databases by naChoZ
in thread On Databases by beretboy

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!
  • 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, 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, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • Outside of code tags, you may need to use entities for some characters:
            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.
  • Log In?
    Username:
    Password:

    What's my password?
    Create A New User
    Chatterbox?
    and the web crawler heard nothing...

    How do I use this? | Other CB clients
    Other Users?
    Others having an uproarious good time at the Monastery: (10)
    As of 2014-12-26 12:04 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?

      Is guessing a good strategy for surviving in the IT business?





      Results (171 votes), past polls