Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Oracle Database 11g.pdf
Скачиваний:
78
Добавлен:
10.06.2015
Размер:
12.69 Mб
Скачать

Summary  671

SQL> select * from sort_test

where name = ‘Finsteraarhornhutte’;

NAME

-----------------------------------------------

Finsteraarhornhutte finsteraarhornhütte

When the NLS_SORT parameter defined an accent-insensitive search, both accents and case were ignored. This is the expected functionality for accent-insensitive searches.

Summary

In this chapter, you learned about Oracle’s global support functionality and how it simplifies the issues related to multilingual databases. You learned about the internal architecture that makes globalization support possible. You saw how the NLS Runtime Library (NLSRTL) integrates with the Oracle locale definition files to provide functionality. You also learned that the modular nature of the locale definition files provides great flexibility while reducing memory usage.

You learned about the main components of globalization support: language, territory, character set, and linguistic sorts. You saw how these four components provide default settings for all the other NLS options. You then learned that those default settings can be overridden with a variety of methods.

We introduced you to the many character sets that Oracle supports, including the important Unicode character set. You saw how the Unicode character set can support all known written languages in the world.

You also learned about using NLS parameters to modify your globalization environment as needed. You learned about the different categories of NLS parameters, including language and territory parameters, date and time parameters, linguistic sort parameters, calendar parameters, and more.

This chapter introduced you to the datetime datatypes and explained how the TIMESTAMP WITH TIME ZONE and TIMESTAMP WITH LOCAL TIME ZONE datatypes can be used to synchronize transactions occurring across time zones.

Last, you learned about linguistic sorting and searching and how globalization support allows culturally appropriate sorting and searching. You also learned about monolingual and multilingual sorts and how each evaluates text strings when performing a sort operation. You learned that multilingual sorts can be identified by the _M appended to the sort definition name.

You learned how, in conjunction with linguistic sorting and searching, you can perform case-insensitive and accent-insensitive operations by appending _CI or _AI to the end of the NLS_SORT parameter value.

672  Chapter 13  n  Implementing Globalization Support

Exam Essentials

Be able to customize language-dependent behavior for the database and individual sessions.    Be aware of the different NLS parameters and the different ways that they can be set (initialization parameters, environment variables, the ALTER SESSION statement). Know the order of precedence for NLS parameter settings. Know which parameters apply only to the client or the server.

Know how to specify different linguistic sorts for queries.    Understand the mechanisms for producing linguistic sorts versus binary sorts. Know how to specify both case-insensitive and accent-insensitive linguistic sorts. Know how to differentiate between multilingual and monolingual sort definitions.

Understand how to use datetime datatypes.    Understand the purpose of datetime datatypes. Know the different datetimes covered in this chapter: DATE, TIMESTAMP, TIMESTAMP WITH TIME ZONE, and TIMESTAMP WITH LOCAL TIME ZONE. Understand the differences between the various datetime datatypes and how they relate to globalization.

Know how to query data using case-insensitive and accent-insensitive searches.    Know the syntax for specifying case-insensitive and accent-insensitive operations. Understand which SQL operations support linguistic operations. Know which NLS parameters control caseinsensitive and accent-insensitive searching.

Understand how to obtain globalization support configuration information.    Know the views available to see globalization information: NLS_SESSION_PARAMETERS, NLS_INSTANCE_ PARAMETERS, NLS_DATABASE_PARAMETERS, and V$NLS_VALID_VALUES. Understand the information returned by each of these views.

Understand globalization support architecture.  Know the purpose of the NLSRTL. Understand the location, purpose, and file-naming conventions of locale definition files. Know the four types of locale definition files: language, territory, character set, and linguistic sort.

Review Questions 

673

Review Questions

1.Globalization support is implemented through the textand character-processing functions provided by which Oracle feature?

A.RSTLNE

B.NLSRTL

C.LISTENER

D.NLSSORT

E.Linguistic sorts

2.What elements of globalization can be explicitly defined using the NLS_LANG environment variable? (Choose all that apply.)

A.NLS_LANGUAGE

B.NLS_SORT

C.NLS_CALENDAR

D.NLS_CHARACTERSET

E.NLS_TERRITORY

3.Given two different character sets (A and B), which of the following must be true for A to be considered a strict superset of B? (Choose all that apply.)

A.A must contain all of the characters defined in B.

B.A must be Unicode.

C.The encoded values in A must match the encoded values in B for all characters defined in B.

D.A must be a multibyte character set.

E.The encoded values in A must match the encoded values in B for all numeric and alphabetic characters in B.

4.The NLS_SORT parameter sets the default sort method for which of the following operations? (Choose all that apply.)

A.WHERE clause

B.ORDER BY clause

C.BETWEEN clause

D.NLSSORT function

E.NLS_SORT function

5.Which view shows all valid values for the NLS_LANGUAGE, NLS_SORT, NLS_TERRITORY, and

NLS_CHARACTERSET parameters?

A.V$VALID_NLS_VALUES

B.NLS_VALID_VALUES

C.NLS_VALUE_OPTIONS

D.V$NLS_VALUE_OPTIONS

E.V$NLS_VALID_VALUES

674  Chapter 13  n  Implementing Globalization Support

6.Which of the following datatypes store time-zone information in the database?

A.TIMESTAMP

B.DATE

C.TIMESTAMP WITH TIME ZONE

D.TIMESTAMP WITH LOCAL TIME ZONE

E.DATETIME

7.Which of the following are valid settings for the NLS_COMP parameter? (Choose all that apply.)

A.ASCII

B.ANSI

C.BINARY

D.MONOLINGUAL

E.MULTILINGUAL

8.NLS parameters can be set using the five methods listed. Put the methods in order from highest to lowest according to Oracle’s order of precedence:

a.Default setting

b.Client environment variable

c.Explicit ALTER SESSION statement

d.Inside SQL function

e.Server initialization parameter

A. b, d, e, a, c

B.e, a, b, c, d

C.d, c, b, e, a

D.a, b, d, c, e

E.d, c, b, a, e

9.What can you determine about the following linguistic sorts based only on their names?

1.GERMAN

2.FRENCH_M

A.1 is a monolingual sort.

B.2 is a monolingual sort.

C.1 is case insensitive.

D.Both 1 and 2 are case insensitive.

E.Case sensitivity is unknown.

Review Questions 

675

10.In a database with the database character set of US7ASCII and a national character set of UTF-8, which datatypes would be capable of storing Unicode data by default?

A.VARCHAR2

B.CHAR

C.NVARCHAR2

D.CLOB

E.LONG

11.Automatic data conversion will occur if which of the following happens?

A.The client and server have different NLS_LANGUAGE settings.

B.The client and server character sets are not the same, and the database character set is not a strict superset of the client character set.

C.The client and server are in different time zones.

D.The client requests automatic data conversion.

E.The AUTO_CONVERT initialization parameter is set to TRUE.

12.Which of the following NLS_SORT parameter values would result in case-insensitive and accent-insensitive binary sorts?

A.NLS_SORT = BINARY

B.NLS_SORT = BINARY_AI

C.NLS_SORT = BINARY_CI

D.NLS_SORT = BINARY_AI_CI

E.Binary sorts are case insensitive and accent insensitive by default.

13.Which NLS parameter can be used to change the default Oracle sort method from binary to linguistic for the SQL SELECT statement?

A.NLS_LANG

B.NLS_SORT

C.NLS_COMP

D.NLS_SORT

E.None of the above

14.Which of the following would be affected by setting NLS_LENGTH_SEMANTICS=CHAR?

A.All objects in the database

B.Tables owned by SYS and SYSTEM

C.Data dictionary tables

D.NCHAR columns

E.CHAR columns

676  Chapter 13  n  Implementing Globalization Support

15.Which is not a valid locale definition file type?

A.Language

B.Linguistic sort

C.Calendar

D.Territory

E.Character set

16.How many different calendars does Oracle 11g support?

A.22

B.7

C.6

D.15

E.2

17.Which NLS parameter directly governs linguistic searches?

A.NLS_SEARCH_L

B.NLS_SORT

C.NLS_SEARCH

D.NLS_SORT_L

E.None of the above

18.True or false? Case-insensitive sorts are always accent insensitive by default.

A.True

B.False

19.What is the name of the file that identifies the set of available locale definitions?

A.locale.def

B.lxdef.ora

C.lx1boot.nlb

D.lx1boot.ora

E.lang.def

20.Which of the following is not a valid linguistic sort element?

A.Accent expansion

B.Canonical equivalence

C.Reverse secondary sorting

D.Ignorable characters

E.Character rearrangement

Соседние файлы в предмете [НЕСОРТИРОВАННОЕ]