Patent ID: 6996567

Claim:
A method for automatic generation of a join graph for a relational database query, comprising: receiving an input list that includes a plurality of tables for inclusion in said join graph, at least one attribute of interest wherein said attribute may be used for at least one function selected from the group consisting of output and filtering; determining whether each of said plurality of tables is a single instance; marking each of said plurality of tables determined to be single instance and each table that is an ancestor of each of said plurality of tables determined to be single instance for inclusion in said join graph; determining whether each of said plurality of tables is a multi-dimensional table wherein a multi-dimensional table is a table directly dependent from at least two other tables in said relational database; inserting each of said plurality of tables determined to be a multi-dimensional table in a multi-dimensional table list; determining whether each of said plurality of tables is a one-dimensional table wherein a one-dimensional table is a table directly dependent from one other table in said relational database; inserting each of said plurality of tables determined to be a one-dimensional table in a one-dimensional table list; marking an instance of each table in said multi-dimensional list closest to a marked table in a hierarchal representation of said relational database and each ancestor of said instance; generating a dimension list for each table in said multi-dimensional list including each reference table for a particular table; determining whether each table in each dimension list is included in said one-dimensional list; marking each instance of each table in each dimension list having a multi-dimensional table as a parent and removing said each table from said one-dimensional table list responsive to a determination that said each table is in said one-dimensional list; and determining whether each table in said one-dimensional list is unmarked; determining for each of said table in said one-dimensional list determined to be unmarked a closest instance to a marked table in said hierarchal representation of said relational database and each ancestor of said instance; and generating a join graph from said marked instances of tables in said hierarchal representation of said relational database and said at least one attribute.