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 database?
Any thoughts much appreciated.
I am currently working with an sql 2008 database. Many of the entries have
Share
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.