db or file
winnjewett
Registered Users Posts: 329 Major grins
I would like to pick the brains of the many talented people here. Is it better to store images directly in a database, or as files with the location and other information stored in a database?
I guess scale might matter. I am talking about very small scale operations (nothing along the lines of what smugmug deals with).
Thanks,
Winn
I guess scale might matter. I am talking about very small scale operations (nothing along the lines of what smugmug deals with).
Thanks,
Winn
0
Comments
I think in pretty much all cases, you want to store the images in the file system. You can then make a separate decision whether you want to use a cataloging program to search, catalog and view your files based on their meta data, but even if you do use one of those, I'd still keep the images themselves in the file system and just use the cataloging program for the ability to do faster searches or create separate views of the images on disk. This is the way that most cataloging programs work, including Photoshop Album/Elements, Portfolio, ACDSee, etc...
I think an important consideration is that whatever cataloging program you use also stores all of it's metadata in the file itself as industry standard IPTC data. While, it may keep it's own copy of the data for indexing and searching purposes, if use a program that stores all the metadata in the files itself, you will not get "stuck" with your cataloging program if it doesn't meet your needs in the future. Instead, you will be able to move to a different cataloging program without losing all of your cataloging information.
--John
Homepage • Popular
JFriend's javascript customizations • Secrets for getting fast answers on Dgrin
Always include a link to your site when posting a question
What, exactly, are you trying to do?
-winn
images.php?cat=xxx&image-xxx to full the image from a none web folder?
You could, sort of... it wouldn't prevent someone from right clicking a loaded image on a page, but you could generate a random image session ID (hash together image name, time, and any other stuff you can think of, or something) that could be used once, and any page using the image would have a means to generate one, while anyone from the outside seeing a session id would only be able to see expired ones, from used pages.
Of course, this whole scheme would fail as soon as someone used wget or curl just to grab the webpage and then manually extracted the image using again one of those programs. Or often just saving an image will save the version the browser has in memory and not download it again. Right click preventing scripts have similar vulnerabilities. You're probably safest steganographically encoding data traceable back to you into your images, and hoping no one notices it so if they do steal your images, they still have information in them that you can retrieve in the event you need to prove they got them from you.
Just a couple of cents