Entries in relational tables are stored in a contiguous way in the table buffer. An entry in a relational table has the following structure:
+------+------+------+------+------+------+ | next | lkey | key | type | nel | data | +------+------+------+------+------+------+
The elements of an entry are described in the table below:
next | Pointer to next entry in table (4 bytes). |
lkey | Length of key (4 bytes). |
key | Keyword (lkey + 1 bytes). |
type | Data type (2 bytes). |
nel | Number of data elements (4 bytes). |
data | Data (nb*nel bytes), where
nb is the number of bytes required for
representing a data element. |
Thus, the required number of bytes for an entry in a relational table is
15 + lkey + size_of(type)*nel
bytes, where lkey
is the number of bytes of the
string key
, size_of(type)
the
number of bytes required to store one data element, and
nel
the number of data elements.