Font Size: a A A

Research And Implementation Of Key Technologies In GKD-PL/SQL Engine

Posted on:2005-02-18Degree:MasterType:Thesis
Country:ChinaCandidate:Y ChenFull Text:PDF
GTID:2168360155471811Subject:Computer Science and Technology
Abstract/Summary:PDF Full Text Request
SQL(Structured Query Language) has become the standard language of RDBMS(Relational Database Management System) so far. But, because of lacking the procedural processing functionality, SQL is not applicable for business logic processing on the database server side, especially under the circumstances of client/server tow-tier architecture, or client/application server/database architecture, or multi-tier architecture. We need better and more efficient method to process the interaction between application and database.Driven by the new requirements of application and the development of database architecture, database academia and database industry explore various approaches for the combination of SQL and procedural language. Even, they introduce the object concept into database, so that data and process are being unified. From version 6, ORACLE started to ? develop and implement a procedural language, which is named PL/SQL and synthesizes data managing capacity of SQL and data processing capacity of procedural language. When programming with PL/SQL, we can use many mechanics which are usually included in procedural language, such as variable, data type, expression, condition structure, loop structure, procedure and function call etc, but also can we use SQL statements to manage relational data.This paper focuses on the research and implementation of several key technologies in PL/SQL engine. Starting from the design of PL/SQL engine's architecture, this paper discusses the basic structure of compiler and executor, and presents a proper efficient intermediate language, by which all the constituents of PL/SQL can be expressed. And this intermediate language is very concise and easy to be interpreted for the executor. In the PL/SQL compiler, we designed an unique symbols table, which did not adopt the usual techniques, such as linearity table and hash tables, but used stack and array data structures. Our method in symbols table processing gained good performance when searching symbols, and was convenient for solving the visibility of variables in cascaded PL/SQL block as well. Then, we discusses in detail the implementation techniques of all data types in PL/SQL, such as the algorithms of high precision data type, methods of processing record type, index-by table type and attributes of it as well. The expression processing module is an important component of PL/SQL engine. On the bases of the recursive structure of expression, This paper discusses practical details of expression compiling and execution. The expression processing module needs adequate consideration for all aspects of implementation details and program structure, because it deals with varieties of complicated operators, precedence of operators, data type conversion, attributes of cursor etc. At last, trigger mechanic is discussed in this paper as well, including the formal definition of trigger, triggering mechanic, cascade triggering, terminationand so on. When implementing trigger, this paper presents a method of tighten coupled with database core, data structures and algorithms, such as the better accessing database dictions, new tuple and old tuple of row-level trigger and so on.All the technologies discussed in this paper have been applied in GKD-PL/SQL engine. Now, The engine can run stably. And we have compared it with the PL/SQL engine of Oracle. We can conclude the GKD-PL/SQL engine is compatible with that of Oracle.
Keywords/Search Tags:Database System, PL/SQL language, compiler, runtime engine, expression processing, trigger, termination
PDF Full Text Request
Related items