file stream vs local save in sql server?

前端 未结 2 708
星月不相逢
星月不相逢 2020-12-16 02:45

my application play videos files after that user they are registered .(files are larger than 100 MB ) .

  1. Is it better to do I store them on the

2条回答
  •  生来不讨喜
    2020-12-16 02:53

    1 - depends on how you define "better". In general, I prefer to store binary assets in the database so they are backed up alongside the associated data, but cache them on the file system. Streaming the binary data out of SQL Server for a page request is a real performance hog, and it doesn't really scale.

    1. If an attacker can get to your hard drive, your entire system is compromised - storing things in the database will offer no significant additional security.

    3 - that's a whole question in its own right. Too wide for Stack Overflow...

提交回复
热议问题