首页> 外国专利> System, method, and program for applying query rewrite technology to object building

System, method, and program for applying query rewrite technology to object building

机译:用于将查询重写技术应用于对象构建的系统,方法和程序

摘要

The system, method, and program of this invention enables an object language application (e.g., C++, JAVA, etc.,) to issue a query over a view and to receive back, as query results, handles to application type objects which can be further manipulated by the application. A view is defined herein as a collection of a view type, and a view type is defined as a class or type. Upon receipt of the query referencing a view type, a query engine generates a query plan that builds mock (i.e., proxy) application type objects in memory based upon the view types. The application can run methods on the application type objects or point to other application type objects from the handles, to the application objects, that are returned to the application; and these manipulations will be understood by the query engine. In a preferred embodiment, query rewrite optimizations are applied to the queries over views requiring object building in order to optimize the evaluation of the query and the building of view objects as query results. For example, when a query over a view is analyzed and it is determined that the query is not requesting a handle, and is not referencing a method, but only asks for values, no objects are built. Also, if a query traverses a reference type attribute, but the query can be transformed into a join or outer join operation between relational tables, then no object building is required. In these above described situations, the rewritten query can be pushed down to the database management system of the data source for resolution. If the query does request a handle or references a method, then some object building is required. However, query rewrite techniques can still be applied so that parts of the query are pushed down to the DBMS to minimize the number of objects that are built.
机译:本发明的系统,方法和程序使对象语言应用程序(例如,C ++,JAVA等)能够在视图上发出查询,并接收作为应用程序对象的句柄作为查询结果。由应用程序进一步操纵。这里将视图定义为视图类型的集合,并且将视图类型定义为类或类型。收到引用视图类型的查询后,查询引擎将生成一个查询计划,该查询计划会根据视图类型在内存中构建模拟(即代理)应用程序类型对象。应用程序可以在应用程序类型对象上运行方法,也可以从句柄指向其他应用程序类型对象,再指向返回给应用程序的应用程序对象;并且查询引擎会理解这些操作。在优选实施例中,查询重写优化被应用于需要对象构建的视图上的查询,以优化查询的评估以及视图对象作为查询结果的构建。例如,当分析视图查询时,确定该查询没有在请求句柄,并且没有在引用方法,而是仅询问值,则不构建任何对象。同样,如果查询遍历引用类型属性,但是该查询可以转换为关系表之间的联接或外部联接操作,则不需要对象构建。在上述这些情况下,可以将重写的查询下推到数据源的数据库管理系统以进行解析。如果查询确实请求了句柄或引用了方法,则需要一些对象构建。但是,仍然可以应用查询重写技术,以便将查询的一部分下推到DBMS,以最大程度地减少构建的对象的数量。

著录项

相似文献

  • 专利
  • 外文文献
  • 中文文献
获取专利

客服邮箱:kefu@zhangqiaokeyan.com

京公网安备:11010802029741号 ICP备案号:京ICP备15016152号-6 六维联合信息科技 (北京) 有限公司©版权所有
  • 客服微信

  • 服务号