DA0-002 · Question #32
An administrator needs to design a table that will include foreign words. Which of the following is the best option for storing non-native language characters?
The correct answer is B. NVARCHAR. To store foreign words and non-native language characters effectively in a database, a data type that supports Unicode characters is essential. The NVARCHAR data type is specifically designed for this purpose.
Question
An administrator needs to design a table that will include foreign words. Which of the following is the best option for storing non-native language characters?
Options
- AVARCHAR
- BNVARCHAR
- CCLOB
- DCHAR
How the community answered
(35 responses)- A3% (1)
- B80% (28)
- C6% (2)
- D11% (4)
Why each option
To store foreign words and non-native language characters effectively in a database, a data type that supports Unicode characters is essential. The NVARCHAR data type is specifically designed for this purpose.
VARCHAR stores variable-length strings of non-Unicode characters and primarily supports single-byte character sets, which is insufficient for many foreign languages.
NVARCHAR is a Unicode character data type that stores variable-length strings of Unicode characters. This data type is crucial for supporting multiple languages and special characters beyond the basic ASCII set, ensuring that foreign words are stored and retrieved correctly.
CLOB (Character Large Object) is used for very large character data, but its inherent Unicode support depends on the database's character set and it is typically overkill for individual foreign words.
CHAR stores fixed-length strings of non-Unicode characters and also primarily supports single-byte character sets, making it unsuitable for foreign language characters.
Concept tested: Database data types for multi-language support
Source: https://learn.microsoft.com/en-us/sql/t-sql/data-types/nchar-and-nvarchar-transact-sql
Topics
Community Discussion
No community discussion yet for this question.