Font Size: a A A

Research And Implementation Of Key Techniques Of Embedded SQL In GKD-Base

Posted on:2006-06-09Degree:MasterType:Thesis
Country:ChinaCandidate:Q YanFull Text:PDF
GTID:2178360185963611Subject:Computer Science and Technology
Abstract/Summary:PDF Full Text Request
Besides the Structured Query Language (SQL), current relational Database Management System products should provide the language that can process the business logic of the server side. This language is of managing and processing data capability. Under the endure research work of database academia and database industry, the embedded SQL language is designed. It embedds the SQL statements into the host language's source code. The embedded SQL language synthesizes data managing capacity of SQL and data processing capacity of procedural language. It is a high-performance transactional processing language, which is more and more being recognized and applied. It can be migrated to other DBMSs.GKD-ESQL is the embedded SQL language's pre-compiler and running enviroment of GKD-Base. The design and implementation of GKD-ESQL is discussed. Based on the introduced basic structure and the statement elements, the general infrastructure of GKD-ESQL system is presented. In order to discuss the pre-compoler's design and implementation, the compiler's tools flex and bison are introduced, then the pre-compiler's main modules—Lexical Analysis Module and Syntax Analysis Module are described. Lexical Analysis Module implemented the deterministic finite automation, which can recognize the identifiers. It inputs the ESQL source file and recognizes the keywords, identifiers and C variables, output the recognized identifiers to Syntax Analysis Module. Syntax Analysis Module receives the identifiers from Lexical Analysis Module. It checks the ESQL statement's syntax and semantic anlysis base on the ESQL language's rules. The ESQL statements are translated into C language's variable declarations or the function callers, and outputed to destination file. The C statements are outputed to destination file unchangeably.ESQL runtime library is an important part of GKD-ESQL. After the process of pre-compiler, the application program made by ESQL language is translated into C application program. The compiler to this program calls the functions implemented by ESQL runtime library, which access the GKD-Base. The pre-compiler translates most executable SQL statements into ESQLdo() function. The most important work of ESQL runtime library is the implementation of this function. This function accesses and manipulates GKD-Base database by XPI functions provided by GKD-Base.The design and implementation of dynamic SQL method are discussed. The three methods are implemented. Dynamic SQL mehod 3 is the most difficult method, which process dynamic SQL by cursor. The process of cursor statement is divided into two parts, one is the compiler of cursor, and the other is interpretive executor of cursor.Finally, the design and implementation of error handler mechanism is presented.
Keywords/Search Tags:Database Management System, Embedded SQL, Pre-compiler, Runtime Library, Dynamic SQL, Error Handler
PDF Full Text Request
Related items