Schema Object Naming Rules
Basic Elements of Oracle CQL 2-19
The Oracle CQL language contains other words that have special meanings. These words are not reserved. However, Oracle uses them internally in specific ways.
Therefore, if you use these words as names for objects and object parts, then your Oracle CQL statements may be more difficult to read and may lead to
unpredictable results.
For more information, see
■
identifier::= on page 7-16
■
unreserved_keyword on page 7-17
■
reserved_keyword on page 7-17
■
Oracle recommends that you use ASCII characters in schema object names because ASCII characters provide optimal compatibility across different platforms and
operating systems.
■
Nonquoted identifiers must begin with an alphabetic character from your database character set. Quoted identifiers can begin with any character.
■
Nonquoted identifiers can contain only alphanumeric characters from your Java locale’s character set and the underscore _, dollar sign , and pound sign .
Oracle strongly discourages you from using and in nonquoted identifiers.
Quoted identifiers can contain any characters and punctuations marks and spaces. However, neither quoted nor nonquoted identifiers can contain double quotation
marks or the null character \0.
For more information, see:
■
const_string::= on page 7-12
■
identifier::= on page 7-16
■
In general, you should choose names that are unique across an application for the following objects:
■
Streams
■
Queries
■
Views
■
Windows
■
User-defined functions Specifically, a query and view cannot have the same name.
■
Nonquoted identifiers are not case sensitive. Oracle CEP interprets them as uppercase. Quoted identifiers are case sensitive.
By enclosing names in double quotation marks, you can give the following names to different objects in the same namespace:
employees employees
Employees EMPLOYEES
Note that Oracle CEP interprets the following names the same, so they cannot be used for different objects in the same namespace:
employees EMPLOYEES
EMPLOYEES
2-20 Oracle Complex Event Processing CQL Language Reference
■
Stream elements in the same stream or view cannot have the same name. However, stream elements in different streams or views can have the same name.
■
Functions can have the same name, if their arguments are not of the same number and datatypes that is, if they have distinct signatures. Creating multiple
functions with the same name with different arguments is called overloading the function.
If you register or create a user-defined function with the same name and signature as a built-in function, your function replaces that signature of the built-in function.
Creating a function with the same name and signature as that of a built-in function is called overriding the function.
Built-in functions are public where as user-defined functions belong to a particular schema.
For more information, see:
■
Chapter 13, User-Defined Functions