CrosDB Table is a collection of rows(record or tuple) and columns.
- Table schema is mapped from C Struct, so this is a kind of C Struct ORM(Object Relational Mapping).
- The C struct is expanded into each single fields for composite data type like array, nested struct etc.
- Each table can have only one Primary key.
- Each table can hve many secondray indexes.
- Each table can have only one Primray Key, which is used to identify the row uniquely.
- Primay Key column list shouldn't change during the row lifecycle.
- Primary Key is implemented with unique
HASHindex for high performance. You can change to
- If table exists and pFields is different with table schema, table will be upgraded automatically.
- If you want to know if table exists, you can use
CROSS_OPENto get handle first.
- Primary Key is
HASHtype by default to achieve highest performance.
- If you don't care about performance, you can set
RBTREEtype Primary Key.
- If you need both exact match and range match for Primary Key, you can create another
RBTREEindex with same column list.