Pro & Cons of storing files(pictures) in a SQL Server for a website

后端 未结 3 1787
时光取名叫无心
时光取名叫无心 2021-01-23 02:54

I\'m creating an Asp.Net MVC website.

I\'ve in the past, for heavy application, multiple layer application, used the database to store files.

But now I\'m questi

3条回答
  •  渐次进展
    2021-01-23 03:36

    If the files are integral and actively changing part of the system and them have to be backed up along with the other data - you can store them inside the DB, but try to use the FILESTREAM fields if you use sql server 2005+ and your files are big enough - say 500k+

    If the files are static content, you can store them outside with only pointers in DB. This not prevents to take into account all your custom permissions machine.

    Storing and working with files inside DB is usually slower, than in filesystem, but all depends on your needs.

提交回复
热议问题