Virtual Database

This page as PDF

The Virtual Data Base (VDB) system is used to manage large structured data sets in CAD systems. It provides different representation levels of structures: filesystem and path level, inode level, and record type level. The VDB inode level maps the elements of a structure graph (the content) to an inode based filesystem. The inode filesystem represents a generic graph, too. Inodes can be searched and retrieved either by their unique inode number or using paths (and regular expressions). Inodes can represent any structure type, thus encapsulating the structure elements.

An inode consists of an identifier, a unique structure type, an attribute table and a row table containing the inode content (data, childs of this structure element). Structures create hierarchical orders of inodes and the mapping of inodes to the graph.

There is a structure specification, defining content elements and the order they may appear in the content graph. An element of a structure graph contains child elements and attributes associated with this element. The childs can be organized with repeating lists,  (ordered) sub-structures (product types), and disjunction lists (sum types).

The virtual database can be saved to and loaded from a file. It is a complete and generic interchange format which can be used by different programs at different runtime states. It can represent the complete state of a CAD program.

The structure graph or part of the graph can be represented using structural regular expressions. Regular expression ares used 1. to define the structure and the structure graph, and 2. to search and query the database.

The structure graph can be constructed from different sub-structures. Each structure can be imported from or exported to a plain text file using dedicated lexers, parsers, and formatted printers. Alternatively, each structure can be imported or exported using universal XML representations only requiring the structure type definition.

There are different specification languages used to define the structure graph and for generating different application software modules like parsers and lexers (formatted input) or printers (formatted output) handling content. There is a structure definition language S, a parser and lexer generator language P, and a translation language T. They are all part of the language compiler system LaCo, integrated in the SynDK framework.

VDB terminology

Structure
The structure definition graph consisting of nodes defining structure types, attributes, and symbols. The graph defines relations and the order of elements in this graph.
Type
The structure type: an element of a structure definition graph, mappable to an inode.AttributeAttributes can be assigned to types. Attributes are represented by row tuples (A,V).
Symbol
A symbolic element of a structure definition or attribute. Symbols are leafs of the structure graph.
Inode ID
Basic element of the database consisting of an identifier, a structure type identifier, a attribute list, and a row (array) table. An inode is always accessed by the unique inode number. An inode can represent any structure type.
Row
Tuple element of a table with two columns (format A=V). Each column is of type Value.
Value
A value is a basic type from the set: INT, INT64, FLOAT, CHAR, STRING, BOOL, CHAR, NODE, DIRECTORY.

Regular Expressions

Regular expressions are used for the definition of the structure specification graph and for searching elements in the database.

Ordered Structure Set
The ordered (sub-)structure set expression generates a list of elements. They must appear in the specified order. The set must be complete, except it contains optional elements.
Unordered Structure Set
The unordered (sub-)structure set expressions generates a list of elements. The order of the elements is arbitrary. The set must be complete, except it contains optional elements.
List
An element can appear at least one (zero) or several times in the expression.
Choice
One element of a set of elements appears in the expression.
Optional
An element can appear zero or one time in the expression.

Fig. VDB architecture overview: Parser, printer, and compiler operate directly on the database. A virtual machine VPM can execute VPL programs directly from the database, too.