To get started with BangDB Server, we need to create the environment for the BangDB.

C++
Java

Create the BangDB Env object by calling the constructor which takes DBParam as argument

BangDBEnv(DBParam dbp);

The DBParam is structure which defines the parameters for database. You may leave it NULL for defualt to be used or initialise it for overriding the param values. To verify the database

DBParam *verifyDatabase(const char *dbname);

It returns DBParam for the database "dbname", user should delete the reference as required to get the host ip and port

char *getHost();
char *getPort();

To close the database (this can be done by just deleting the database object as well)

void closeDatabase(BangDBDatabase *bdb, CloseType dbclose = DEFAULT_AT_CLIENT);

Finally to delete the env object

virtual ~BangDBEnv();

Create the BangDB Env object by calling the constructor which takes DBParam as argument

public BangDBEnv(DBParam dbp)

The DBParam is structure which defines the parameters for database. You may leave it NULL for defualt to be used or initialise it for overriding the param values. To verify the database

public DBParam verifyDatabase(String dbName)

It returns DBParam for the database "dbname". To close the database

public synchronized void closeDatabase(CloseType dbclose)

To get host IP and PORT

public String getHost() public String getPort()

To Open Database

public synchronized BangDBDatabase openDatabase(String dbName, DBParam dbparam)