I'm looking for the best way of making an archive for newsletters to be stored in a SQL Server database. What would be the easiest way to do that? I was thinking I could store the newsletters as pdf:s, but what data type should I use in the database? Anything else I should have in mind? Thankful for help!
A:
It depends on the original format. If you want to store PDF's, you probably best use VARBINARY(MAX), which has a limit of 2GB. I don't think you'll be able to search through newsletters later on if you want to.
We store the contents of our newsletters in XML (it is parsed using XSL before sending out), and SQL Server has an XML datatype which allows only valid XML, so that might be more useful. If it's HTML, use VARCHAR(MAX) or NVARCHAR(MAX). (NVARCHAR allows unicode characters, but each character takes up twice as much as with VARCHAR, so the limit is half that of VARCHAR).
Rob
2010-08-17 09:24:39
A:
This is obviously more complex than I had thought. I need to look around for more information before I make any decisions... Thanks anyway!
Karin
2010-08-17 09:51:52