Chinese database system is a key project granted by National Natural Science Foundation of China(NSFC). The goal of the project is to develop a Chinese information processing oriented database system which caters for ease-to-use of database in Chinese environment. Chiql is a new database query language based on restricted Chinese natural language with well-defined grammar. It is designed for both novice and technical users to provide an easy-to-use, easy-to-remember and easy-to-understand query interface for Chinese database user. Different from SQL. Chiql combines both procedural and non-procedural style to support the specification of a query in multiple statements. Regarding to efficiency, we developed a two-phase optimizer to improve the efficiency of multi-statement queries. They are: (1) the Statement Merging Algorithm (SMA) and (2) the Pattern Mapping Algorithm (PMA). Regarding to transportability, we design a Chiql-to-SQL translator. By applying both SMA and PMA, the translation from Chiql to SQL is simple and the resulting SQL query is efficient. It is worth noting that the approach of multi-statement optimization can also be applied to SQL query in the transaction scope.
展开▼