we're throwing around using the image data type for a project we're doing

  • Anybody have any comments on pros and cons for going this route as opposed to storing the physical file and refferencing it in the db table.

  • 1 - image is a depreciated data type, use nvarchar(max), varchar(max), varbinary(max) instead

    2 - filestream might be a better option and saves on the DB as it send the file to disk

    3 - storage

    4 - backups/recovery times have you taken into account your RTO & RPO to ensure that you have the best option

    personally if its a file i would store it on disk and put a pointer to it in the DB, but thats just me

  • Image has been deprecated. You should avoid using it in new development. Use varbinary(max) instead.

    Drew

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • I agree with the both of the above regarding the use of varbarnary(max) or filestream.

    Yes, you could also store a pointer to a file on disk.

    There are pros and cons to all of the above, and you have to weigh those to come to a decision.

  • In throwing around the idea, you should throw it out. There are no compelling reasons to use IMAGE in new development, unless you have legacy clients out there that cannot handle one of the newer datatypes, in which case you should look at abstracting an interface for them, but use one of the newer data types internally for storage.

    There are no special teachers of virtue, because virtue is taught by the whole community.
    --Plato

  • Storing the the image data in the database keeps things in one place. You capture the images in your backups so that if a restore is needed, you won't lose the data.

    If you store a pointer in the database to a file on disk (not using the filestream capability of SQL Server 2008), you have to manage the database backups and filesystem backups to try and keep things insync should you need to do a restore.

    If you are not doing database mirroring in SQL Server 2008, I would look at using filestream instead of the varbinary(max) data type.

Viewing 6 posts - 1 through 5 (of 5 total)

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