bg
Database – Embedded – BangDB = NoSQL + AI + Stream

Database – Embedded

chevron

Database

Embedded

C++

Selected

Java

Selected

We create database simply as shown. This should be the first thing that we do before doing anything else.

	DBParam dp;
	dp.setTransactionType(DB_TRANSACTION_NONE);
	BangDBDatabase *bdb = new BangDBDatabase("mydb", &dpm);
	if(!bdb)
	{
		printf("db could not be created, quitting\n");
		// handle error, possibly return from here
	}
	// db_param sets the db environment, see the section to know more about it
Note: We must tell db where to find the bangdb.config file. This can be done by either keeping the file in the same dir as your application in case of embedded or in case of server the same dir as server. We can override this by setting the configPath in db_param before calling getInstance
DBParam is used to set the db environment. It is described as below;

We create database simply as shown. This should be the first thing that we do before doing anything else.

	DBParam dp;
	dp.setTransactionType(DB_MULTIOPS_TRANSACTION_NONE);
	BangDBDatabase bdb = new BangDBDatabase("mydb", dp);
	if(bdb == null)
	{
		System.out.println("db could not be created, quitting");
		// handle error, possibly return from here
	}
	// DBParam sets the db environment, see the section to know more about it
Note: We must tell db where to find the bangdb.config file. This can be done by either keeping the file in the same dir as your application in case of embedded or in case of server the same dir as server. We can override this by setting the configPath in DBParam before calling getInstance
DBParam is used to set the db environment. It is described as below;