c# - Storing Images in DB - Networked Desktop Applications -


related:

after reading Above the question, it seems that the preferred way of storing the image with the database is to store only the file path within the database. However, most of these answers seem to focus on the web server.

In my case, I am developing a desktop application that will be used on many computers within intranet. A dedicated server will host the database, which will include information related to testing on different devices.

Images need to be stored on the server in some way. Is there a right approach to accumulating images in the database, or even the same approach?

Pros:

  • The backup is limited to the database only.
  • There is no need to open the server's file system on the network.
  • Single Protocol for Server Information Access.
  • Secure file access (user can not be in all images and can be removed)

Cons:

  • Display problems in the future if images are too high.
  • Edit: As stated in the tag, the application is being written in C # / .net. If writing images in the file system is an option in this case, then I can help to understand how it is done.

    Editing 2: As mentioned below in the comment below, I am assuming a MySQL database for now, though FileStream capabilities of SQL Server 2008 may possibly change it Could.

    In my case, the images will be added frequently, and after these points only can be considered after reading because they should never be changed, and only read as needed. The images will probably be small (~ 70k each), and I'm considering some other binary format storage on the server, such files that are ~ 20k each and may possibly apply the same approach to storage and retrieve.

I think the answer is that there is no right answer. With most things in programming (and life), this diploma

DB has some professional storage and troubles:

PROS

  • Your Easy backup, manage, and one stop shop for data in the app
  • Less dependency and less moving parts in your app Kiss theory works well on small files under 1GB
  • Hey, this is a DB, so can be done within the saved transaction and if the network has problems then roll back
  • Store everything in SharePoint and TFS DB and only Work fine Even big boys do
  • Security can be easily controlled by the app and does not include file / folder permission

  • DB space account
  • Potentially effective performance if not correct
  • Do not use such a big idea that always store large files> 1 GB) until you use the filestream in SQL Server 2k8
  • You can get a decent cache Ng strategy needs to be implemented (although you would like it anyway)
  • File System is much more natural than the DB easy to manually convert / view files from.

I think that when it comes to your situation, I bend towards the simplicity of storage in DB .


Comments

Popular posts from this blog

c# - How to capture HTTP packet with SharpPcap -

php - Multiple Select with Explode: only returns the word "Array" -

php - jQuery AJAX Post not working -