Tuesday, 23 March 2010

Attachment saving in SQL 2008.

------------------

NVARCHAR Vs VARCHAR

SQL Server provides both datatypes to store character information. The difference is that nvarchar is used to store unicode data, which is used to store multilingual data in your database tables. Other languages have an extended set of character codes that need to be saved and this datatype allows for this extension. If your database will not be storing multilingual data you should use the varchar datatype instead. Because nvarchar takes the double space of varchar
  • Allways lazy load the properties.
  • Go for recursive functions if you can.
  • Save data to DB only if required.(dirty bit logic.)
  • Design pattern.
  • IMplementing interface makes things easy.