Function documentationDBM Class (sdb.dbm Module) Locate this document in the navigation structure

 

DBM is a class of the sdb.dbm module. You can use the methods of this class to execute DBM commands for creating and managing databases. An object of this class represents a connection to a DBM server.

Features

Constructor Definition

Syntax Syntax

  1. DBM (database_computer = '', database_name = '', dependent_path = '', user_info = '');
End of the code.
DBM Class: Attributes

Parameters

Description

database_computer

Name of the computer to which you want to connect

The default value is the local computer.

database_name

Name of the database to which you want to connect

This entry is optional.

dependent_path

Directory that contains the version-dependent database server software (see Glossary, Directory)

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 with the newest software installation or display information about the existing databases 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 manage a particular database, enter database_name, but not dependent_path.

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

  • To create a database 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 DEMODB database on the local computer via the DBM server as database system administrator DBADMIN with password SECRET, generate a session object as follows:

Syntax Syntax

  1. session = sdb.dbm.DBM ('', 'DEMODB', '', 'DBADMIN,SECRET')
End of the code.

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

Syntax Syntax

  1. session = sdb.dbm.DBM ('', '')
End of the code.

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

Syntax Syntax

  1. session = sdb.dbm.DBM ('PARMA', '', '/usr/local/sdb/7500')
End of the code.