Re: Image Files

  • What are the advantages/disadvantages to saving images as the native "image" datatype? Or is it better to just save the file location in the database?

  • Security is a big advantage of saving it as a field in the database, you can control access to the image using sql server security.

  • since it is a BLOG Type format, you can store it in the Database, if this is a frequent exercise and you have big Images, better to have a link to path.

    read about varbinary(max)

  • There are arguments on both sizes. I would suggest you search google for some information and make your own decision.

    The main points will be data integrity and backups handle your image data if they are in fields in the database. If you store file paths, you will have to ensure your backups are in sync and also have to ensure you do not get a database rollback and leave an orphaned file on the file system.

    On the other side of things, it is often faster to save large image files on the file system because you are very likely to need to stream them to the file system to actually use them for anything.

    As an aside, SQL 2008 offers a middle ground for this argument that looks like it is the best of both worlds. Dare to dream...

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply