May 18, 2005

Unicode in SQL Server

I hate using Unicode fields unnecessarily. If the data is going to be English only, what is the point of using nchar, nvarchar or ntext? It takes more space. It increases the size of index keys; it reduces the number of rows stored in data pages and makes the database unnecessarily bigger. The performance goes down due to this.
One DBA (a couple of them actually) recently argued with me saying, it will help the future enhancement of internationalization. Good point; you can make field Unicode compliant for the user data so that without major change you can handle non-English data.
How about the data used by the application? Can you handle internationalization by just changing the field into nchar? No. you need additional field to connect with the language data. The front end you have should read the data with the appropriate language. That will be a big change. Unless that is done, none will make use of you 'n' (nchar, nvarchar and ntext) fields.

In summary, use Unicode field only if you have non -English data for that field;
the field is an external (user entry) field and you are going to have Unicode data in the near future Don't use Unicode field for internal data if your application is not capable of handling it.

No comments:

Post a Comment