MySql Query

Why does ZenPhoto use MySql AND also keep a copy of the images in zenphoto\albums\<albumName>

I'm new to ZenPhoto and just trying to get my head round things ?

If i delete an image from zenphoto\albums\<albumName> then the same image is removed from the database.

Just wondering why i need it keep two copies of each image ?

Probably a dumb question, but its all new to me.

Thanks for any help

Comments

  • acrylian Administrator, Developer
    Zenphoto is filesystem based and does not touch the full image you upload. Every folder it finds in the albums folder becomes an album and all images within become images. If you remove anything from there it is remove for Zenphoto. Zenphoto generates the thumbnails and the sized image from these full size image and stores them in the cache folder. The advantage is that you can change the size without needing to upload the images again if you choose a bigger size than before.
    Take a look at this diagram:
    http://www.zenphoto.org/wp-content/uploads/2008/09/zenphoto-12-image-discovery12.pdf
  • If its filebased, why the need for a database ?
  • Because there is no where else to store some of the persistent data about your site. Like, for instance, your admin user/password.

    Why are you concerned about the database?
  • Just wondering why the images were in the database AND on the filesystem, thats all.

    I can understand user/pw being perstisted to the d/b, but was struggling to see why the images were duplicated between filesystem and d/b.

    I'll do some more reading

    Thanks
  • Images are not stored in the database. Only metadata is stored there.
Sign In or Register to comment.