1

I currently am faced with a need to host 20 small video files for my website. I know I could just host them with my project in a folder but I came a crossed this article.

http://www.kindblad.com/2008/04/how-to-store-files-in-ms-sql-server.html

The thought of storing the file in the db had not occurred to me. My question is would there be a performance increase or decrease by storing the files as bit data in the db versus just streaming the data. I like the idea of having the data in the db for portability and having control and who gets access to the videos. Thanks in advance.

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
vikingben
  • 1,632
  • 2
  • 24
  • 37
  • 2
    this link might be useful http://stackoverflow.com/questions/13420305/storing-files-in-sql-server – Lamak Feb 15 '13 at 20:05

1 Answers1

2

Unless you have a pressing need to store them in a database, I wouldn't, personally. You can still control who gets access to which files by using a handler to validate access to the file. One big problem that the method in that article has is that it doesn't support reading a byte range - so if someone wants to seek to the middle of a video, for example, they would have to wait for the whole thing to download. You'd want it to be able to support the range header, as described in this question.

Community
  • 1
  • 1
Matt Whitfield
  • 6,436
  • 3
  • 29
  • 44