-4

How to save mp4 in sql server c#. Which data type we should use in sql server.

2 Answers2

0

A BLOB stores binary data, so an time you have something you don't think fits into the databases defined type you can use a BLOB.

Ash Burlaczenko
  • 24,778
  • 15
  • 68
  • 99
-1

You would be better saving the MP4 on the server and storing the location of the file in the database.

KrisJones
  • 188
  • 7
  • Why would that be better? – CodeCaster Feb 12 '15 at 12:59
  • Check out the top answer here that explains why very well: http://stackoverflow.com/questions/3748/storing-images-in-db-yea-or-nay – KrisJones Feb 12 '15 at 13:03
  • And check the comments under that answer and the rest of the answers for why _"don't store files in a database"_ isn't a definitive answer. You don't know OP's requirements, so you can't say any solution _"would be better"_. Sure, OP is talking about video files which should give some insight, but it's unanswerable in its current form anyway. – CodeCaster Feb 12 '15 at 13:05
  • Its subjective and there are many considerations as to which is appropriate, Also see [programmers.se Q](http://programmers.stackexchange.com/questions/150669/is-it-a-bad-practice-to-store-large-files-10-mb-in-a-database) (and the linked dba.se question) – Alex K. Feb 12 '15 at 13:05
  • It impacts on the performance of the DB – KrisJones Feb 12 '15 at 13:06
  • I have requirement to store in db..that also in mp4 – Shinoj Nambiar Feb 17 '15 at 11:13