Database Manipulation Routines - Generic functions

DESCRIPTION:
Operations for (user defined) databases. These functions are generic, the details are given below.

USAGE:
dbread(database, name)
dbwrite(database, name, object)
dbobjects(database)
dbexists(database, name, mode = "any")
dbremove(database, name)
dbdetach(database, where)

REQUIRED ARGUMENTS:
database:
an object representing a database.
name:
character string giving the name of a dataset related to database.
object:
any S-PLUS object.
where:
current position of database on the search list.

VALUE:
dbread returns the dataset associated with name on the database.

dbobjects returns a character vector giving the names of all objects currently on the database.

dbexists returns a logical value telling whether there is something named name on the database.

dbdetach.default (and other methods) return database, however, methods for user defined databases often will not want to return the entire database.


SIDE EFFECTS:
dbwrite stores object on the database under the given name.

dbremove removes the object stored on database under the given name.


DETAILS:
These are all generic functions. Currently dbread, dbwrite, dbobjects, and dbremove only have a default method, and dbexists has no methods at all. The dbdetach function has methods for data.frame and pframe, and a default method. The dbdetach function is used in detach.

If dbobjects returns a character vector of length 0, it means that there is nothing currently on the database. If it returns a NULL, it means that existence of any object should be determined by trying to operate on it. This is useful for large databases where it is infeasible to return the list of all objects. Note that in this case there must be a dbexists method.

The value of dbobjects can have an attribute "keep" that controls whether objects read from the database will be kept in memory. For example, if the value of the attribute is "any", then any object read from the database remains in memory for as long as the database is attached; if the value is "function", all functions read from the database will remain in memory beyond the current expression. Any other value (say "null") means that no objects will from the database will be kept in main memory. If the attribute is not present, the value of options("keep") determines the behavior, in the same way.


SEE ALSO:
database.attr , rm , remove , get , objects , assign , detach .