Table of Contents
VTable Fields
Each Valentina table has some internal fields and one or more user-defined (custom) field(s). Although Valentina technically allows to have a VTable without custom fields in a database, such a VTable is useless, because you cannot store any data in it.
Internal Fields of VTable
Each Valentina Table always has two virtual fields (Table Methods): “RecID” and “OID”.
RecID field - this field plays the role of an unique identifier of a record in the scope of its VTable. The RecID field is of ULONG type (4 bytes). This fact applies a limit on the number of records per table at 2^32 = 4 billions.
OID field - this field plays the role of an unique identifier of a record in the scope of the whole VDatabase. The OID field is of ULLONG type (8 bytes).
It is important to note that RecID and OID fields do not require any disk space! They are virtual fields, also called Table Methods.
Note: All other databases do require disk space for such fields. This is a huge advantage for Valentina. Let's suppose you have got 1/10/100 millions of records in your database. Valentina consumes ZERO disk space for these 2 fields. Other databases that have such fields will use 12/120/1200MB.
Note: RecID and OID fields do not have physical indexes. But since these fields have order, logically Valentina is able act on them effectively.
Custom Fields of VTable
You can create from 1 up to 65535 custom fields in a Table.
To create a field, you need to specify a field name, the field type and optionally the set of flags and parameters that a particular type requires (for example max length for String type).
The field Name should be unique in the scope of its VTable.
Detailed description of supported field types may be found here.
Access to Internal fields
Internal Table fields are not counted by VTable properties and functions such as VTable.FieldCount and VTable.Field( inFldIndex ). You can get access to some internal files only using access by name with VTable.Field( inName ).
Access to Custom fields
Custom fields are counted from 1. You can access fields by index or by name using the methods VTable.Field( inFldIndex ) and VTable.Field( inFldName ).