storing images - blob?
in the sql database, should the image data type be saved as a blob? or use varchar()?
I am curious if the photo is stored in the database or on the server and the database stores only the link to the photo.
thanks
in the sql database, should the image data type be saved as a blob? or use varchar()?
I am curious if the photo is stored in the database or on the server and the database stores only the link to the photo.
thanks
Databases lose efficiency when using blobs and it is not commonly recommended unless truly necessary. The commonly accepted way to store image or file data is storing the image in a particular location and saving the file name as a reference in a varchar field in the database. This technique will create a more efficient database that is more scalable, and cuts down on the code necessary.
Again, thanks for the explanation.
One more question:
Would you create a separate table for your images and connect it to the inventory table. Or would you have it all in one table.
I am allowing 10 images with a thumb of each for each item in inventory.
thanks
I would create a separate table if I wanted to allow a variable number of images for each inventory. If you are sure you want a max of 10 then it might be easier to do it all in one table.
Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.
These out-of-the-box solutions provide you proven, tested applications that can be up and running now. Build a store, a gallery, or a web-based email solution.