Pegasus InfoCorp: Web site design and web software development company

DBOPEN (3)

database access methods

SYNOPSIS

    B
    #include <sys/types.h>
    #include <limits.h>
    #include <db.h>
    

    DB * dbopen(const char *file, int flags, int mode, DBTYPE type,

    const void *openinfo); R

DESCRIPTION

    Dbopen is the library interface to database files. The supported file formats are btree, hashed and UNIX file oriented. The btree format is a representation of a sorted, balanced tree structure. The hashed format is an extensible, dynamic hashing scheme. The flat-file format is a byte stream file with fixed or variable length records. The formats and file format specific information are described in detail in their respective manual pages btree (3), hash (3) and recno (3).

    Dbopen opens file for reading and/or writing. Files never intended to be preserved on disk may be created by setting the file parameter to NULL.

    The flags and mode arguments are as specified to the open (2) routine, however, only the O_CREAT, O_EXCL, O_EXLOCK, O_NONBLOCK, O_RDONLY, O_RDWR, O_SHLOCK and O_TRUNC flags are meaningful. (Note, opening a database file O_WRONLY is not possible.)