syed mohsin
syed mohsin

Reputation: 2938

Saving long detail in DB or in file?

Developing an asp.net site on .NET Framework 4.0 and SQL SERVER 2008. When my admin member saves detail about project from HTMLEditorExtender where do i save it?

What is the best practice?
For now i saved it in Files because SQL Hosting has less DB space than Disk space.
If i saved it in File then How to get the formated data (with pictures and links) back?

Please Give me the best path to follow. Thanks

Upvotes: 4

Views: 93

Answers (1)

Oded
Oded

Reputation: 499012

You can use VARCHAR(MAX) instead of VARCHAR(8000) - it can hold around 2GB of data.

However, if you are saving HTML, consider using NVARCHAR(MAX) if the posted data may contain Unicode characters (think international audience).

Microsoft research have a good whitepaper about storing files in and out of the database which makes good reading - To Blob or not to Blob.

Upvotes: 5

Related Questions