Space Required to store a file in database

  • Thread starter Thread starter apondu
  • Start date Start date
A

apondu

hi,

I had a query on sql database, we know we usually store files of

different type in sql database and its helpful for searching and

retrieving the documents from the database, but one query i had was

related to the amount of space required to store the files in the

database. For Eg., say i have a word document which is of 5Mb thn how

much space does it occupy in the database if i store it in binary
format

b'coz i know it'll occupy less than the original file size but i
wanted

to knw exactly how much space it'll take in the database and y?

my mail-id is (e-mail address removed), if someone knows the answer then
please

let me know

Thanks for the response and help people here are providing

Regards,
Govardhan.
 
Unless you have/use your own compression routine, storing a file in a binary
format (varbinary, image) won't reduce it's size. However, the storage of
anything in a database occurs a small overhead; so the storing of a file of
exactly 5MB in size will take a little bigger than just 5MB. There is no
precise number for this overhead and in fact, it can vary from file to file;
ie, the storing of a second file of exactly the same 5MB will not
necessarily take exactly the same overhead.
 
Back
Top