asp.net - Base64 string and Image -


When I use the image database for my ASP.NET web application, I found two ways! The first method is using the "image" data type, the second image converts the base 64 string into it and stored in "byte" data type.

I want to know which method is better in the process and why?

The type is deprecated so there is no substitute in the SQL server byte is not type, there is a type that is said to be equal to a byte type but I'm pretty sure what you are asking is not it.

Then this is your real question, correct of incorrect terminology:

When I use the image database for my ASP.NET Web application I do, I got two ways! The first method is using the data type, the second image converts the base 64 string into it and stores it in the data type.

The encoding adds significant size to the binary data, it converts 3 octets into 4 octets, so it adds 33% overhead to the real estate consumed in your storage (this is the database or File).

However will serve a web application media files as Strict base64 encoded responses. Having already encoded files in the storage, the CPU is saved on the web server because it can directly stream the storage content, w / o is going through the base 64 encoding. It is not that base 64 encoding is expensive (very cheap and too much cash is friendly) when streaming is done properly using semantics . Then select your poison: Save binary material for small disk space

For an example of systematic storage and service of media files through the database

If there is a database or file system for discussions about storage in the form, I point you to the side and its conclusion:

Studies show that if the object is average one megabyte Is larger than NTFS Security is an obvious advantage over SQL Server if the objects are less than 256 kilobytes, so the obvious benefits of the database. Inside this category, it works how the workload writes deeply.

For this study, considering the administrative problems of a database storage (continuous backup-restoration, failovers) type problems are discussed only in the v2 of the products.

Comments

Popular posts from this blog

excel vba - How to delete Solver(SOLVER.XLAM) code -

github - Teamcity & Git - PR merge builds - anyway to get HEAD commit hash? -

ios - Replace text in UITextView run slowly -