Photo Storage?

Flowageboy

Joined: 2006-01-25
Posts: 1
Posted: Wed, 2006-01-25 23:23

This is a great program and much better than the last photosharing software I was using. It was a snap to upload and install and my members seem to like it too.

Question: When I chose this program, I thought the use of mySQL to store photo's was a terrific idea to reduce the amount of storage space used on my server. However, I notice that this program does indeed install the photos in a file on the server. I must be missing the point of the use of MySQL? Can someone explain?

Thanks,

Kevin

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Thu, 2006-01-26 00:47

mysql is only used to store metada:
- who has permission to see / do what
- what images are in what album
- item comments, descriptions, titles, ..
- all but binary image data

on the disk, we store the binary image data, the files.

reason:
the database is already the bottleneck for most database based applications and using it to store a lot of binary data would increase the load and resource usage on the database server dramatically. that is not specific for g2, but a quite general statement.

the filesystem on the other side is predestined to store ... files. that's why.

why use a database at all then?
for performance / scaling. without a database, you can't create a photo album management application that scales well with a lot of users, albums, photos, permissions.

besides: you wouldn't save any webspace on your server if you stored the files in the database. you'd just use diskspace for the database instead.