检索系统构建了用于记录各数据项在数据表和字段中位置的索引结构,以及基于数据库关系图的用于描述各个数据表之间关联关系的主外键关系表,根据索引结构和主外键关系表检索出与用户输入的多个关键词相关联的记录.为了进一步提高检索效率,又构建了一个查询结果存储结构,把查询过的关键词和对应的结果存入其中.当用户输入关键词进行检索时,检索系统先去查询结果存储结构中检索,如果检索到就直接输出结果,否则再通过访问索引结构和主外键关系表构建SQL语句到原始数据库中进行检索得到结果.实验结果表明,这种基于索引结构和查询结果存储结构的检索机制具有较好的检索性能.
The retrieval system has built indexing structure which has recorded the positions of each data item in the data tables and fields, and built main-foreign key relation table to describe correlation be- tween each data table based on the database program, according to the index structure and main-foreign key relation table, the retrieval system retrieves the records associated with multiple keywords input by users. In order to further improve the efficiency of retrieval, a queried results storage structure has been built, and the queried keywords and corresponding results are stored into it. When a user enters keywords to retrieve, retrieval system retrieves in the storage structure first, if results can be retrieved, the system output the queried results directly. Otherwise, it builds SQL commands by index structure and main-for- eign key relation table to search in original database. The experiment shows that the retrieval mechanism based index structure and queried results storage structure has nice retrieval efficiency.