Patent ID: 7546291

Claim:
A computer-implemented method for relating tables for a database, the method comprising: providing a primary table comprising a first field; providing a user interface to display the first field; providing a secondary table comprising a second field; displaying on the user interface the second field; receiving commands from the user for creating a relationship between the first and second fields, wherein creating a relationship between the first and second fields comprises: receiving a selection of the second field displayed in the user interface; receiving a command to drag the selected second field to a first pane comprising the first field in the user interface; and receiving a command to drop the selected second field onto the first field in the user interface to create the relationship between the first and second fields, wherein the relationship comprises a one-to-many relationship from the secondary table to the primary table; and generating a query such that the generated query produces a results set from the primary and secondary tables in accordance with the relationship between the first and second fields, wherein the query is generated automatically upon receiving the commands to drag and drop the selected second field onto the first field in the user interface, and wherein other fields in the primary and secondary tables that are not in the query are distinguished from the first and second fields by at least one of a color and a font size of the first and second fields to distinguish the first and second fields from the other fields in the primary and secondary tables.