Storing a file in a database as opposed to the file system?

Question :

Storing a file in a database as opposed to the file system?,

Answer :

Generally, how bad of a performance hit is storing a file in a database (specifically mssql) as opposed to the file system? I can’t come up with a reason outside of application portability that I would want to store my files as varbinaries in SQL Server.


Have a look at this answer:


Essentially, the space and performance hit can be quite big, depending on the number of users. Also, keep in mind that Web servers are cheap and you can easily add more to balance the load, whereas the database is the most expensive and hardest to scale part of a web architecture usually.

Read More  Interfaces on different logic layers

There are some opposite examples (e.g., Microsoft Sharepoint), but usually, storing files in the database is not a good idea.

Unless possibly you write desktop apps and/or know roughly how many users you will ever have, but on something as random and unexpectable like a public web site, you may pay a high price for storing files in the database.

That’s the answer Storing a file in a database as opposed to the file system?, Hope this helps those looking for an answer. Then we suggest to do a search for the next question and find the answer only on our site.

Read More  Converting List to List June 22, 2022 by Eiji I have a list of integers, List and I’d like to convert all the integer objects into Strings, thus finishing up with a new List . Naturally, I could create a new List and loop through the list calling String.valueOf() for each integer, but I was wondering if there was a better (read: more automatic ) way of doing it? Using  you could use the transform method in the  class import; import List integers = Arrays.asList(1, 2, 3, 4); List strings = Lists.transform(integers, Functions.toStringFunction()); The List returned by transform is a view on the backing list – the transformation will be applied on each access to the transformed list. Be aware that Functions.toStringFunction() will throw a NullPointerException when applied to null, so only use it if you are sure your list will not contain null. Categories question Post navigation Are there any JavaScript live syntax highlighters? “Beautifying” an OS X disk image

Disclaimer :

The answers provided above are only to be used to guide the learning process. The questions above are open-ended questions, meaning that many answers are not fixed as above. I hope this article can be useful, Thank you