Invention Grant
- Patent Title: Method and system for rewriting a database query
- Patent Title (中): 用于重写数据库查询的方法和系统
-
Application No.: US11612019Application Date: 2006-12-18
-
Publication No.: US07657567B2Publication Date: 2010-02-02
- Inventor: Donald Reichart , Pradeep Sathyanarayan , Ahmad Ghazal
- Applicant: Donald Reichart , Pradeep Sathyanarayan , Ahmad Ghazal
- Applicant Address: US OH Miamisburg
- Assignee: Teradata US, Inc.
- Current Assignee: Teradata US, Inc.
- Current Assignee Address: US OH Miamisburg
- Agent Steve McDonald
- Main IPC: G06F17/00
- IPC: G06F17/00

Abstract:
The invention relates to a method and database system for rewriting a SQL query having at least one null sensitive expression (NSE) in a select list of the query, the query comprising at least one outer join command to be performed on at least two tables and involving a view or a Derived Table (DT). The method comprising the steps of: identifying at least one unmatching row belonging to the view or DT using non-nullable fields that belong to the outermost table in the view or DT; converting the NSE(s) from the at least one identified rows into a SQL case construct; and performing the at least one outer join. The database system comprising means for rewriting a SQL query having at least one null sensitive expression (NSE) in a select list of the query, the query comprising at least one outer join command to be performed on at least two tables and involving a view or a Derived Table (DT). The system comprises a device configured to identify at least one unmatching row belonging to the view or DT using non-nullable fields that belong to the outermost table in the view or DT; a device configured to convert the NSE(s) from the at least one identified rows into a SQL case construct; and a device configured to perform the at least one outer join.
Public/Granted literature
- US20080154841A1 METHOD AND SYSTEM FOR REWRITING A DATABASE QUERY Public/Granted day:2008-06-26
Information query