As a promising object-oriented reuse technology, frameworks have been attracting enough attention. However, much less work has been done on framework-based development, compared with on framework development.; In this thesis we described our work, framework-based implementation of an optimizer for a relational database. We implemented our target optimizer based on a query optimization framework, OPT++. In order to borrow expertise from a mature optimizer, we studied a model optimizer, the PostgreSQL optimizer. The operators and algorithms supported by it are summarized. The transformative rules applied are extracted. Its search strategy is analyzed.; In our application, typical operators for relational algebra are supported. Main transformative rules extracted from the PostgreSQL optimizer are applied. A PostgreSQL-like search strategy is implemented. Constrained dynamic programming and genetic algorithm are incorporated to optimize joins. Additionally, we modified the framework to fit sub-queries and explicit joins. We describe our implementation by following the framework recipes. Problems and implementation considerations are presented in detail. Furthermore, more general issues in framework-based development are discussed. |