## Class DBM

### Use

DBM is a class of the sdb.dbm module.

You can use the methods of this class to execute DBM commands. An object of this class represents a connection to a DBM server.

### Features

The class DBM contains the following methods:

cmd

rawCmd

release

#### Constructor Definition

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

Parameter | Description
database_computer | Name of the computer you want to connect to The default value is the local computer.
database_name | Name of the database instance you want to connect to This entry is optional.
dependent_path | Directory that contains the version-dependent database server software (see Installation Manual, Directories) This entry is optional.
user_info | Name and password of the DBM operator. Format: <dbm_operator>,<dbm_operator_password>

### Activities

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.

● To create a new database instance with the newest software installation or display information about the existing database instances and software versions, do not enter either database_name or dependent_path .

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

● To administer a particular database instance, enter database_name, but not dependent_path.

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

● To create a database instance of a particular software version, enter dependent_path, but not database_name.

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

### Example

To connect to the database instance DEMODB on the local computer via the DBM server as DBM operator DBADMIN with password SECRET, you generate a session object as follows:

session = sdb.dbm.DBM ('', 'DEMODB', '', 'DBADMIN,SECRET')

To connect to the Database Manager of the latest software installation on the local computer, you generate a session object as follows:

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

To connect to the remote computer PARMA and select the Database Manager from the software installation /usr/local/sdb/7600, you generate a session object as follows:

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