views:

47

answers:

3

hi,

I recently came across a problem for image file storage in network.

I have developed a desktop application. It runs in network. It has central database system. Users log in from their own computer in the network and do their job.

Till now the database actions are going fine no problem. Users shares data from same database server.

Now i am being asked to save the user[operator]'s photo too. I am getting confused whether to save it in database as other data or to store in separate file server.

I would like to know which one is better storing images in database or in file server?

EDIT: The main purpose is to store the account holder's photo and signature and later show it during transaction so that teller can verify the person and signature is correct or not?

A: 

I think you have to define what you mean with better.

If it is faster my guess you don't want to use a database. You probably just want it plain on a file server.

If you want something like a mini-facebook, where you need a much more dynamic environment, perhaps you are better of storing it a database.

This is more a question than an answer, what do you want to do with the pictures?

Marcus Johansson
if it is for like mini-facebook why it is better to store it in db?
KoolKabin
A: 

Since this is a desktop application it's a bit different.

It's really how much data are we talking about here. If you've only got 100 or so users, and it's only profile pictures, I would store it in the DB for a few practical reasons:

  1. No need to manage or worry about a separate file store

  2. You don't need to give shared folder access to each user

  3. No permissions issues

  4. No chance of people messing up your image store

  5. It will be included in your standard DB backup

  6. It will be nicely linked to your data (no absolute vs. relative path issues)

Of course, if you're going to be storing tons of images for thousands of users, I would go with the file system storage.

badbod99
I agree with your suggestion. but somewhat confused with above answer: http://stackoverflow.com/questions/3413425/is-storing-image-file-in-database-good-in-desktop-application-running-in-network/3413462#3413462
KoolKabin
next one option: http://stackoverflow.com/questions/3748/storing-images-in-db-yea-or-nay/3751#3751
KoolKabin