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.
Syntax
DBM (database_computer = '', database_name = '', dependent_path = '', user_info = '');
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> |
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.
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
session = sdb.dbm.DBM ('', 'DEMODB', '', 'DBADMIN,SECRET')
To connect to the Database Manager of the latest software installation on the local computer, generate a session object as follows:
Syntax
session = sdb.dbm.DBM ('', '')
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
session = sdb.dbm.DBM ('PARMA', '', '/usr/local/sdb/7500')