0

Possible Duplicate:
To Do or Not to Do: Store Images in a Database

I wonder in what situation we should store image file (not path, is store binary format) in database and in what situation should store in physical path? which methods is more faster for web?

Community
  • 1
  • 1
Joehom Sum
  • 322
  • 1
  • 4
  • 13
  • 1
    possible duplicates: [here](http://stackoverflow.com/questions/815626/to-do-or-not-to-do-store-images-in-a-database), [here](http://stackoverflow.com/questions/3304588/store-user-profile-pictures-on-disk-or-in-the-database) and [here](http://stackoverflow.com/questions/805519/save-image-in-database) – Steven Jan 29 '13 at 07:11

2 Answers2

2

From Microsoft research Lab: Large Object Storage in a Database or a Filesystem

objects smaller than 256K are best stored in a database while objects larger than 1M are best stored in the filesystem. Between 256K and 1M, the read:write ratio and rate of object overwrite or replacement are important factors.

Reference: http://research.microsoft.com/apps/pubs/default.aspx?id=64525

Behroz Sikander
  • 3,885
  • 3
  • 22
  • 36
1

1:Storing image in byte format is more secure and faster than storing image in physical path.

2: There is a scenario when you to have n no. of images to be stored or you can say if you are dealing with a large amount of images then you should store images on physical path because images are large in size and can create unwanted overhead upon database which resulted in a bad performance of database.

But if you are dealing with limited no. of images then simply store images in byte format (or binary you can say) in your concern database.

arvin_codeHunk
  • 2,328
  • 8
  • 32
  • 47