http://qs321.pair.com?node_id=205502

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

I began a side project this past week which involves taking pictures of my college campus and having the pictures online.

I plan on having a lot (at least 1000) and would like to have some sort of search method on the pictures. I'd like to use some sort of database, either mySQL or Berkeley_DB (both of which are on my webserver) that can be easily searched using one or more criteria to return relevant photos.

My table looks like this (although more columns may be added):

ID Number Filename Description Location Date Time of Day Weather Int/Ext
1 pdrm0001.jpg Shot of Bozorth Hall entrance Bozorth Hall 2002-09-15 Afternoon Cloudy Exterior

What methods could I use to store this information, and have it easily accessible to the public through a CGI script?

I have two ideas currently, and would welcome any other data storage suggestions

One: Use mySQL to construct a database with the following information.

    Pros:
  • I have 25MB of SQL storage on the webserver
  • Easily updateable, searchable
  • Reliable, wouldn't be a homerolled solution
    Cons:
  • I have absolutely no idea how to start the thing, and know just enough to search the database (any suggestions for a good Perl/SQL tutorial?)
  • Not sure how easy I could back it up, or modify it on my machine and upload it

Two: Use a few Berkeley_DBs to make each category. (One DB called Weather.db, which has key value pairs of ID_Number => Weather_Condition)

    Pros:
  • I could start this today and get it mostly done without needing to learn something new
  • I could set it up on my machine and upload it after I know it works
    Cons:
  • Could easily get out of hand
  • All information is not in one place

I would really like to learn mySQL, however I'd like this project to get off the ground soon. I might not have 1000 pictures yet, but I'd like people to see the work in progress.

Any suggestions or votes on which why this should be done would be most greatly appreciated.

John J Reiser
newrisedesigns.com