What type of data can be used to store HTML files in a database?

I want to save the webpage to Sql Server. The page may contain images and other materials. What type of data should I use? As already mentioned here , NTEXT, text types, and image data will be deleted in future versions Sql Server. What type of data can be used to store files HTMLthat have different things, such as images and things like JavaScriptcodes?

+4
source share
1 answer

Since you want to store both the HTML page of the web page and the images, you may want to save the images in the file system. The following is a comparison of the advantages and disadvantages of both options:


If you decide to save them to the database, the corresponding data types are:

  • nvarchar(MAX) for HTML text and
  • varbinary(MAX) for images.
+4
source

Source: https://habr.com/ru/post/1660470/


All Articles