Entering content frame

Background documentation Class DBM Locate the document in the library structure

Use

DBM is a class of the sdb.dbm module. An instance of this class corresponds to a connection to a DBM Server.

Class Content

The DBM class contains the following methods:

cmd (cmd_string)

rawCmd (cmd_string)

release ()

Definition of the Constructor

DBM (database_server = '', database_name = '', dependent_path = '', user_info = '')

 

Parameter

Description

database_server

Network name of the computer to which you want to connect.

The default system value is the local computer.

database_name

Name of the database instance you want to connect.

This information is optional.

dependent_path

Installation path of the database software (See also: Directory Structure)

This information is optional.

user_info

A string in the format <dbm_user>,<dbm_user_password>

The specified user logs on to the Database Manager program.

 

If there are multiple installations of the database software on your computer, you can use the database_name and dependent_path parameters to control which version of the Database Manager is started.

Case 1 – You want to create a new database instance with the latest software installation or you want to display information about the existing database instances and software versions.

Do not specify database_name or dependent_path.

The system then starts the Database Manager of the software installation that has the highest version number.

Case 2 – You want to administer a specific database instance.

Specify database_name , but not dependent_path.

The system then starts the version of the Database Manager belonging to the database instance specified.

Case 3 – You want to create a new database instance with a specific software version.

Specify dependent_path, but not database_name.

The system then starts the Database Manager of the specified software installation.

Examples

Creating a connection object session to the database DEMODB, on the current computer, as the DBM operator OLEG with the password MONDAY:

session = sdb.dbm.DBM ('', 'DEMODB', '', 'OLEG,MONDAY')

 

To generate a session connection object for the remoteserver computer and choose the Database Manager of the software installation located in the /usr/local/sdb/7500 directory, specify the following:

session = sdb.dbm.DBM ('remoteserver', '', '/usr/local/sdb/7500')

 

To create a session connection object on the current computer for the Database Manager of the most current software installation:

session = sdb.dbm.DBM ('', '')

 

 

Leaving content frame