Globalizing the Eval Database
To enable globalization the Eval database must support users who may be entering information in English, German, or Japanese. Users can be from locales where time is entered in a 24-hour or 12-hour format and the date format can differ depending on the locale. The date formats of the three languages the PT application supports are different from one another—U.S. English uses MDY format, German uses DMY format, and Japanese uses YMD format. In the PT application, only the float, datetime, and smalldatetime data types are affected by the locale. Other data types that require special consideration when you globalize a database are decimal, money, and smallmoney. The PT application messages that appear when actions (insert, update, and delete) on the Eval database tables fail must also be available in the three languages, and the scheme for storing these messages should be extensible to include all of the 24 languages that SQL Server 7.0 supports.
Briefly, the globalization strategy for the Eval database is to:
- Use Unicode data types. Unicode is the only character set that contains the characters for U.S. English, German, and Japanese. The columns in the Eval database tables that contain string data have Unicode data types: nchar, nvarchar, or ntext.
- Use SQL Server user-defined messages. The user-defined message strings that reside in the sysmessages table of the master database have a Unicode data type (nvarchar) and the table definition supports versions of a message in different languages.
- Make character data columns extra-long. The length of a typical entry in a character column varies from locale to locale; for example, German personal and city names are longer than English names and both are longer than Japanese entries.
- Convert locale-sensitive data, such as time, date, money, and decimal numbers, to the formats of the Eval database. The transformation of data to and from the database is performed by a COM component that resides on the business-services tier. About the Formats Component and Formats Methods and Declarations describe how the national language support (Formats) component in NLS.dll transforms data to and from the locale preference of the user's computer.