Switch to: V11V10V9V8V7V6V5

VTable Structure (Vertical vs Row)

Almost every DBMS on the market today uses one page-file for each Table - and the page ranges 4-8Kb. Records get stored as a sequence of bytes on that page. A Record of a table cannot have a size larger than the page.

Valentina instead uses quite an unusual structure for tables. It keeps each field of a table in the separate logical file(s).

A field can even be related to several logical files:

  • a file of bits to store NULL values if the field is Nullable.
  • a file that contains the data of the field
  • BLOB and VarChar fields have another file to store the data of the field
  • an index file if the field is indexed.
table_separate_columnfiles.jpg table_separate_nullsfile.jpg

Each field has at least one file to store its data - BLOB and VarChar fields can have two.

If the fNullable flag of a field is set, the database file contains a NULL bit. You can set or remove this flag at runtime. The result is that Valentina will create or remove the file accordingly.

For indexes, the Index file is controlled in the same way, using the fIndexed flag of the field.