摘要
大多数数据库应用程序的查询统计功能是事先按照用户的需求定制的,动态查询功能非常有限.针对此类问题,根据一条合法的不确定的SQL语句,应用字符串解析技术,提出一种通用的智能查询方法.该方法可动态计算出SQL语句中所有字段名、字段别名及相应的字段类型,并据此生成一个自适应的查询界面;然后在用户设置查询条件后自动合成为一条新的SQL语句;并将由此SQL语句得到的结果显示在一个统一的查询统计窗口上;最后以引航调度系统为例,用Delphi7和oracle9i实现智能查询统计功能并给出相应源码.实践表明,该方法是十分有效的,实现的代码是可重复使用的.
According to an unsure but grammatical SQL sentence, this paper introduced a method of universal intelligent querying with character string parsing technique for the querying functions of most database applications which are finite or are ordered by the needs of user at that time. This method can dynamically calculate all field names, field alias and relevant field type, therefore form an auto-adaptive querying interface, and then create a new SQL sentence according to the user's settings, subsequently the querying results in accordance with the former SQL are showed on a universal querying window. Taking navigation-dispatch system for an example, intelligent querying function is implemented using DELPHI7 and ORACLE9i and some source code is presented. Experiments show that this method is very effective and the implementation code can be reused.
出处
《大连海事大学学报》
CAS
CSCD
北大核心
2005年第1期91-94,98,共5页
Journal of Dalian Maritime University
关键词
引航调度
智能查询
字符串解析
pilot dispatching
intelligent querying
character string parsing