Table
C++
Java
As we deal with different kinds of data within BangDB, we need different
methods which we use for these respective data types. Therefore there are
multiple types of tables that we can create and use. These types are defined
by enum TableType
Following are different kinds of tables;
enum TableType { NORMAL_TABLE, WIDE_TABLE, INDEX_TABLE, //opaque(void*) as key, datlen is of actual value in the data file store in main table PRIMITIVE_TABLE_INT, //int as key and int as val, stored in index file only, no data file PRIMITIVE_TABLE_LONG, //long as key and long as val, stored in index file only, no data file PRIMITIVE_TABLE_STRING, //opaque(void*) as key and data stored in the index only, no data file Fixed Table LARGE_TABLE, BANGDB_TABLE_INVALID };Each of these table and their operations are explained in subsequent sections.
When in doubt, we used simply select WIDE_TABLE as it provides richest set of operations.
The document support is enabled only by WIDE_TABLE.
Also, LARGE_TABLE should be used when we want to store files, or large objects
We will discuss when and how to use this in advanced section
The key could be of int, long and string type, and hence the last part of the name reflects that.
These tables are super efficient from size in the memory or on the disk is concerned. Performance wise also it scales best.
There are other optimisation done to benefit from the use case scenario
This is internally used by the db for AI related files, models etc, storage.
As we deal with different kinds of data within BangDB, we need different methods which we use for these respective data types. Therefore there are multiple types of tables that we can create and use. These types are defined by enum bangdb_table_type
Following are different kinds of tables;
public enum TableType { NORMAL_TABLE, WIDE_TABLE, INDEX_TABLE, //opaque(void*) as key, datlen is of actual value in the data file store in main table PRIMITIVE_TABLE_INT, //int as key and int as val, stored in index file only, no data file PRIMITIVE_TABLE_LONG, //long as key and long as val, stored in index file only, no data file PRIMITIVE_TABLE_STRING, //opaque(void*) as key and data stored in the index only, no data file Fixed table LARGE_TABLE, BANGDB_TABLE_INVALID };Each of these table and their operations are explained in subsequent sections.
When in doubt, we used simply select WIDE_TABLE as it provides richest set of operations.
The document support is enabled only by WIDE_TABLE.
Also, LARGE_TABLE should be used when we want to store files, or large objects
We will discuss when and how to use this in advanced section
All of these tables are more like single column table where the value is always fixed type. int, long, double etc.
The key could be of int, long and string type, and hence the last part of the name reflects that.
These tables are super efficient from size in the memory or on the disk is concerned. Performance wise also it scales best.
There are other optimisation done to benefit from the use case scenario
This is internally used by the db for AI related files, models etc, storage.