NAME Database

This class encapsulates a Database.

This package is part of the OODatabase manpage. For more information on the database see the the OODatabase::Overview manpage.

Copyright &copy 1998 Curtis E. Dyreson. All rights reserved. Please be aware of the the OODatabase::Licence manpage and the OODatabase::Version manpage.


DESCRIPTION

The database supports only tables of persistent associative arrays, so it is a really simple database! In our implementation the database itself is a directory, and the tables within it are jdbm files. The name of the directory is passed to the Database constructor. Individual tables in the database are dbm files. See also the OODatabase::Table manpage and the OODatabase::Tuple manpage.


METHODS

new(string databaseName, string databaseMode)

Creates a database structure. Initializes the list of open files. Checks to see if the database directory exists, and if the mode is supported.

createTable(string $tableName)

Creates a the OODatabase::Table manpage. A table is a database relation.

createNewTable(string $tableName)

Creates a new the OODatabase::Table manpage (will delete all entries from an existing table). A table is a database relation.

close()

Close the database making sure that the open tables have been flushed.