I am currently working with an sql 2008 database. Many of the entries have ampersands stored thusly \'Arts & Culture\' Should we be storing the escaped version in the databa
Generally speaking, everything in a database should be stored as close to original version as possible. If you have to do any escaping, do it outside the DB.
Reason for doing so is simple: it's only in web where you have to esape the &
sign. If you will sometime have a non-web front-end to your DB, you will have to convert these escape sequences back to original value, which is not always possible: for example, if a user will enter &
(sic), upon reconversion this will be translated back to &
, which will lose original meaning.
SQL Server will store Arts & Culture
just fine, into either a VARCHAR(x) or a NVARCHAR(x) (Unicode-variant - 2 bytes per character) field.
From a database point of view, there's absolutely no need or no point in escaping anything.