Font Size: a A A

Design And Implementation Of Stored Procedure Based On Virtual Machine

Posted on:2005-02-12Degree:MasterType:Thesis
Country:ChinaCandidate:J LiaoFull Text:PDF
GTID:2168360152469202Subject:Computer software and theory
Abstract/Summary:PDF Full Text Request
Stored procedure plays an important role in DBMS. Some application logic can be shifted from client side to server side through stored procedure and the encapsulation of stored procedure achieves modularization, thus the efficiency of application system is improved. The stored procedure subsystem, which is supported by DBMS DM3 and based on virtual machine, consists of six parts: message dispatcher, compiler, virtual machine, privilege management model, deletion model and data dictionary.The compiler translates source code of a store procedure to byte code and stores it in the data dictionary, and afterward the virtual machine loads the byte code from data dictionary to interpret it. The process of stored procedure is divided into two parts: procedural structures are handled by the stored procedure subsystem; SQL statements are first pretreated by the subsystem and then delivered to the SQL engine in DM3 kernel module.As the programming language for DM3 stored procedure, DMPL/SQL (DaMeng Procedural Language/Structured Query Language) integrates procedural structures and SQL seamlessly, thus provides end-users with a powerful and easy-to-use structural programming language. DMPL/SQL supports subroutine nesting, exception handling and other characters. Trigger is a kind of special stored procedure. It can be easily implemented basing on stored procedure virtual machine. Extended stored procedure fills the gap between DBMS and OS, and can provide functions beyond abilities of SQL. To improve the efficiency of application system further, considering the virtual machine itself and features of stored procedure we adapt some optimizations. Instruction dispatch is optimized; query plans of SQL statements are cached for reusing; distributed invocations are improved to low down the network traffic; the variable part of data stack node is separated from the node to reduce space occupied by the data stack while the random-access ability is kept.
Keywords/Search Tags:DBMS, virtual machine, stored procedure, trigger
PDF Full Text Request
Related items