Font Size: a A A

Subquery Implementation And Flating On Embedded Database Of DM

Posted on:2012-10-28Degree:MasterType:Thesis
Country:ChinaCandidate:X ZhangFull Text:PDF
GTID:2218330362457840Subject:Computer technology
Abstract/Summary:PDF Full Text Request
There are many restrictions in the embeddedenvironment, for example, the performance of embedded processors, memory is limited and so, for embedded real-time database has very strict requirements, such as low memory, efficient queries, such as high throughput, that is embedded database, a higher requirement.The most frequent operation is query,the sub-query plays an important status and role in the query, many domestic and open-source embedded database only provides a simple sub-query feature or not provided, so implementing and optimizing the sub-query has an important significance, the main works of the sub-query are the following 4 points.First, study the virtual machine system of DM, careful analysis the operation code and the meaning of the parameters in each operation code, add some operation code designed by myself, in which mainly related with the sub-query is to create a temporary table with operation code OP_OpenTemp and through the secondary index point to the record bound to the clustered index using rowid with opcode OP_Seek.Second, in the sub-query, mainly implement three kinds of queries: 1. In sub-queries, including the related sub-queries and In In sub-queries are not related; 2. Comparison operator queries, constraints are sub-query the contents of a single record, if multiple records, just take the first record; 3. EXISTS subquery, EXISTS subquery that contains the relevant and irrelevant EXISTS subquery.Third, in the sub-query optimization, the main achievement of the flat queries, relational algebra by the equivalent transformation of the correlation algorithm, avoid the use of temporary tables.Finally, design experiments to test the three kinds of subqueries and subqueries flating, verify the results is correct or not, whether to achieve the desired functionality or not.
Keywords/Search Tags:embedded database, the query plan, query optimization, subquery, flat
PDF Full Text Request
Related items