Prev: LiveConnect and (Re: func.apply() throws Error -2147467259)
Next: func.apply() throws Error -2147467259
From: Amit Jain on 30 Jan 2010 06:42 Hi All, I want to display user image on one form (like user profile page). I have to option as metion below: 1. Store image with its relative path in table column. 2. Store image in DB itself using blob as column data type. But each method hs its own drawback In first solution when we are using relative path it use OS level search using relative path which is a native call. In second method DB size will grow like any thing. I am confuse and not able to decide which approch will be good. I request you all to suggest me I should go with which approach also suggest if there is other way as well. Thanks and regards, amit J.
From: Sherkan on 30 Jan 2010 07:23 On 30 Sty, 12:42, Amit Jain <amitatgro...(a)gmail.com> wrote: > Hi All, > > I want to display user image on one form (like user profile page). I Hi, It all depends what do you need. If you store pictures in db, db will grow mostly if you use psd, bmp pictures. It takes system resources mostly for transaction, db connector. Maybe if you upload pictures maybe try to resize, change them all to for an example jpg and compress before store in db. Another help: If you use apache front end server, maybe better will be to store pictures in the some directory /my_pictures/* Apache has good native caching and is much better to load pictures instead of tomcat/jboss. it all depends what do you need. In some cases much better is to store pictures in db, and in some in the hard drive directory. > have to option as metion below: > 1. Store image with its relative path in table column. > 2. Store image in DB itself using blob as column data type. > > But each method hs its own drawback > In first solution when we are using relative path it use OS level > search using relative path which is a native call. > In second method DB size will grow like any thing. > > I am confuse and not able to decide which approch will be good. I > request you all to suggest me I should go with which approach also > suggest if there is other way as well. > > Thanks and regards, amit J.
From: Amit Jain on 30 Jan 2010 09:31 Could you please explain in what are those case in which its better to store pictures in db, and in what case in the hard drive directory.
From: Sherkan on 30 Jan 2010 09:41 On 30 Sty, 15:31, Amit Jain <amitatgro...(a)gmail.com> wrote: > Could you please explain in what are those case in which its better to > store > pictures in db, and in what case in the hard drive directory. First: 1. How much servers do you have for production? 2. What servers, what technology, db? 3. How much users do you have? 4. Is there lot of graphic like graphic forum or graphic gallery where you server mostly graphic or you have mostly text/html page and you got only few pictures to serve?
From: Lew on 30 Jan 2010 12:14
Amit Jain wrote: >> I want to display user image on one form (like user profile page). I Sherkan wrote: > It all depends what do you need. > If you store pictures in db, db will grow mostly if you use psd, bmp > pictures. > It takes system resources mostly for transaction, db connector. The definition of "the db will grow" is a question, here. Databases store binary data in a BLOB column, which is stored as a separate file from the data rows in every BLOB implementation I've heard of. The actual database data file(s) remain(s) relatively compact. As to whether to store in db or file system, that's an "it depends" all right. The database helps control management of the media files, but file storage is inherently more natural. -- Lew |