(1) virtual database engine (vbde), including vbdeProgramProgram counter, result field name and type, parameter binding value, running stack, and fixed number of internal units. Each Command of the vbde virtual machine is composed of one of the 128 operation codes and three operands. C API can directly interact with vbde.
To obtain the vbde program of SQL, you can perform the following operations;
. Mode Column
. Header on
. Width x ......
. Explain select * from Testname;
B * tree record: contains two domains: key field and data field. B * tree (tasks are sorted and traversed) pages are composed of B * tree records.
Hierarchical Data Organization Model: The data structure increases from the bottom to the top, and the data sequence increases from the top to the bottom. C API ------ VBED------B-tree ------ pager ------- OS interface ------ database file.
B * tree API classification; access and transaction functions, table functions, cursor functions, record functions,
(2) compiler: the input is a separate SQL command, and the output is an optimized vbde program. In analyzer, analyzer,CodeGenerator.
(3) Word Divider
(4) analyzer;
(5) code generator; without clearly defined interfaces, it is responsible for generating code and optimizing queries.