The easiest way to create a named database is by using Pervasive PSQL Control Center. See To create a new database in
Pervasive PSQL User's Guide. Application developers can also create a named database through different access methods APIs. For example, see
CREATE DATABASE for SQL,
PvCreateDatabase() for DTI, and
Data Access Application Blocks for ADO.NET.
An identifier is the name of a database or of a column, table, procedure, or other named object within the database. Identifiers are designated as either regular or delimited.
A regular identifier is an identifier that is not surrounded by double quotes. Regular identifier must begin with a letter, either upper or lower case. The remainder of the identifier can consist of any combination of upper or lower case letters, digits, and valid characters.
A delimited identifier is an identifier surrounded by double quotes. Delimited identifier can consist of any string of valid characters enclosed in double quotes.
Identifiers generally must be unique within a certain scope. That is, instances of the same type of object using the same name cannot be used within the same arena. Table
2 shows the arena, or the
scope, within which a given object name must be unique.
To support existing applications that do not specify a database name when creating or opening Btrieve files, Pervasive PSQL maintains the concept of a default database for each transactional database engine. The default database is a pre-defined database named “DefaultDB.” To make use of the new security models without having to modify your application code, you can associate your Btrieve data directories with the default database, then set up users and privileges in the default database to control access to the data files in those directories.
The database engine also understands the concept of the current database for each client connection. If no database name is specified in a Btrieve Login (78), Create (14), or Open (0) operation, the transactional engine assumes the operation is associated with the current database. For each client, the current database is the database to which the most recent Login (78) operation occurred (explicit login). If the client computer has requested no explicit login operations, the current database is the database to which the most recent Create (14) or Open (0) operation occurred (implicit login). If no explicit or implicit logins have occurred, then the current database is the default database, described in the preceding paragraph. Note that the current database may change at any time when the given client performs an implicit or explicit login, or closes the last file handle, making “DefaultDB” the current database. The current database for each client is independent of other clients’ activities.
Each Pervasive PSQL database table is a separate file with a default file extension of MKD. Developers, however, can specify any file name extension desired. A MicroKernel file may contain both data and indexes, and is organized into various types of pages. A MicroKernel file contains data in the common data format.
Each Pervasive PSQL database also contains a set of data dictionary files, with a file extension of DDF. The DDF files contain the schema of the database. The DDFs for V1 metadata and V2 metadata use different file names. See
System Tables in
SQL Engine Reference.
See Configuration Reference for the tasks and references pertaining to customizing configurations.
See Configuration Reference for the tasks and references pertaining to configuring the client/server communications and database engine.
Refer to DSNs and ODBC Administrator in
SQL Engine Reference. That section also discusses ODBC connection strings.
If your applications do not use the mapping feature through idshosts, set the configuration setting Use IDS to “Off.” If your applications already use idshosts, or if you prefer to use this alternative method to map file locations, set
Use IDS to “On.” See
Use IDS.
Refer to the comments in the idshosts file itself for how to format entries in the file. The comments also provide example mappings. By default, for Windows platforms, the idshosts file is installed to the \bin directory under the database client installation directory. For Linux, idshosts is installed to the
\etc directory under the database client installation directory (for example,
/user/local/psql/etc).