ZenphotoCMS Forum
MySql Query - Printable Version

+- ZenphotoCMS Forum (https://forum.zenphoto.org)
+-- Forum: Support (https://forum.zenphoto.org/forum-1.html)
+--- Forum: General support (https://forum.zenphoto.org/forum-4.html)
+--- Thread: MySql Query (/thread-4702.html)



MySql Query - molko - 2009-02-17

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


MySql Query - acrylian - 2009-02-17

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


MySql Query - molko - 2009-02-17

If its filebased, why the need for a database ?


MySql Query - sbillard - 2009-02-17

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?


MySql Query - molko - 2009-02-17

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


MySql Query - sbillard - 2009-02-17

Images are not stored in the database. Only metadata is stored there.