|
When you create a database, Pervasive PSQL allows you to assign a descriptive name to each database component. Users and applications refer to the components of the database using these names. This section outlines the conventions to which you must adhere when naming database components.
For more information, see the chapter "Identifiers, DSNs, and Named Databases" in Advanced Operations Guide.
The following database components must have unique names within a dictionary:
Names for parameters and variables must be unique within a SQL statement. Because Pervasive PSQL keywords are reserved words, you cannot use them for naming database components or in parameter names and variables. See the SQL Engine Reference for a list of reserved keywords.
When a column name is repeated in different tables, you can qualify it in each table by preceding it with the relevant table name or alias name. For example, you can refer to the ID column in the Student table as Student.ID. This is a fully qualified column name, and the table name (Student) is the column qualifier.
Following are the valid characters for the names of database components at the SQL level, and for variables and parameter names:
Note
The name of a database component must begin with a letter. If you specify the name of a database component or a parameter name that does not follow these conventions, specify the name in double quotes (such as "name").
Pervasive PSQL restricts the maximum length of database component names in a dictionary. Table 12-1 lists the maximum name lengths for each type of database component.
|
Type of Name
|
Maximum Length
|
Type of Name
|
Maximum Length
|
|---|---|---|---|
|
Table
|
20
|
Password
|
8
|
|
View
|
20
|
Database
|
20
|
|
Column
|
20
|
Stored Procedure
|
30
|
|
Index
|
20
|
Trigger
|
30
|
|
Foreign key
|
20
|
Substitution variable
|
None
|
|
User or group
|
30
|
Data file pathname
|
641
|
|
1The maximum length of the data file pathname is a combination of the Xf$Loc path and the data file path.
|
Pervasive PSQL is case-sensitive when you are defining database component names. If you create a table named TaBLe1, Pervasive PSQL stores the table name in the dictionary as TaBLe1. With the exception of user names, user group names, and passwords, Pervasive PSQL is case-insensitive after you define the component name. After defining the table TaBLe1, you can refer to it as table1.
User names, user group names, and passwords are case-sensitive in Pervasive PSQL. For example, when you log in as the master user, you must specify the user name as Master.
When retrieving data, Pervasive PSQL displays names for tables, views, aliases, and columns based on the case in which they were created.
Pervasive PSQL returns the column names as follows:
|
Chapter contents
Prev topic: Creating Database Components
|