10.8. Answers to Review Questions

  1. B. The NLS Runtime Library (NLSRTL) provides the language-independent text and character-processing functionality for Oracle.

  2. A, D, E. The client-side NLS_LANG parameter can define language, territory, and character set all at once. Though the value for NLS_SORT is derived from the NLS_LANGUAGE parameter setting, it is not explicitly set by NLS_LANG. NLS_CALENDAR is not affected by the setting of NLS_LANG.

  3. A, C. A strict superset must contain all characters found in the other character set and have matching encoded values for those characters.

  4. A, D. The NLS_SORT parameter defines the default sort method (binary or linguistic) for both SQL WHERE clause operations and NLSSORT function operations. The default sort method for ORDER_BY and BETWEEN (and all other SQL operations that support linguistic sorts) is defined by the NLS_COMP parameter. NLS_SORT is an invalid function name.

  5. E. The V$NLS_VALID_VALUES view shows the names of all language, territory, sort, and character set definitions that are available in the database.

  6. C. Only TIMESTAMP WITH TIME ZONE datatype actually stores time zone information in the database. The TIMESTAMP WITH LOCAL TIME ZONE datatype converts the timestamp to local time and drops the time zone information before storing it in the database. DATE and TIMESTAMP datatypes do not deal with time zone information at all. DATETIME is not a valid datatype.

  7. B, C. The NLS_COMP parameter can be set to BINARY or ANSI. This parameter determines the default sort type for certain SQL functions. (A setting of ANSI specifies that linguistic sorts should be used.)

  8. C. NLS settings embedded in a SQL function have the highest precedence, followed by explicit ALTER SESSION statements, client environment variables (which execute an implicit ALTER SESSION statement), server initialization parameters, and finally default settings.

  9. A. A is the only true statement. The _M appended to the end of a sort name denotes a multilingual sort. Its absence denotes a monolingual sort. Case-sensitive and accent-insensitive sorts have _CI or _AI appended to the name. Its absence denotes case- and accent-sensitivity.

  10. C. NLS datatypes (NCHAR, NVARCHAR, and NCLOB) store data using the character set defined as the national character set by default. Because the national character set is UTF-8 (a Unicode character set), data stored in these datatypes will be Unicode data by default. All other datatypes use the character set defined as the database character set. Because US7ASCII is not a Unicode character set, it does not store Unicode data by default.

  11. B. Automatic data conversion occurs when data is moved between character sets. However, if the server character set is a strict superset of the client character set, no conversion is necessary.

  12. B. The _AI suffix implies that an accent-insensitive sort will be performed. Accent-insensitive sorts are also case-insensitive by default. The _CI suffix implies that a case-insensitive sort will be performed, but it will not be accent-insensitive. Specifying both suffixes (_AI_CI) is illegal.

  13. E. The SQL SELECT statement does not invoke a sort.

  14. E. Only option E is correct. Tables owned by the SYS and SYSTEM users are not affected by default-length semantics. Data dictionary tables always use byte semantics, and NCHAR columns always use character semantics. Therefore, neither is affected by the setting of the NLS_LENGTH_SEMANTICS parameter.

  15. C. Calendar definitions are not stored as locale definition files. Only languages, linguistic sorts, territories, and character set definitions are stored as locale definition files.

  16. B. Oracle supports 7 distinct calendars: Gregorian, Japanese Imperial, ROC Official, Persian, Thai Buddha, Arabic Hijrah, and English Hijrah.

  17. B. Linguistic searches are closely related to linguistic sorts and are governed by the NLS_SORT parameter.

  18. B. Accent-insensitive sorts are always case-insensitive, not the other way around.

  19. C. The lx1boot.nlb file identifies the available locale definitions to the NLSRTL.

  20. A. Linguistic sort elements define the rules for linguistic sorting. There is no linguistic sort element named "accent expansion." The other choices are all valid rules.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset