1. A method implemented on a computer system, the method comprising: for each table of a plurality of database tables and for each column of a plurality of columns within the each table: accessing and analyzing a subset of values stored in the each column, determining a data type for the each column based on the accessing and analyzing the subset of values, and creating a profile for the each column, wherein the profile for the each column includes the determined data type; establishing a join graph of nodes, wherein each node represents one of the plurality of database tables; for each pair of a plurality of pairs of a first table and a second table from the plurality of database tables, wherein the first table is different than the second table and wherein no defined relationship exists between the first table and the second table: for each pair of at least one pair of a first column from the first table and a second column from the second table: comparing the data type included in the profile for the first column with the data type included in the profile for the second column, determining that the data type included in the profile for the first column matches the data type included in the profile for the second column, calculating a joinability score based upon the profile for the first column and the profile for the second column, wherein calculating the joinability score comprises: estimating the cardinality of an intersection between the first column and the second column, estimating the cardinality of the first column, and dividing the estimated cardinality of the intersection by the estimated cardinality of the first column, and adding a directed weighted edge to the join graph from a node representing the first table to a node representing the second table, wherein the weight of the added edge is based on the joinability score; receiving a selection of a subset of the plurality of database tables; creating a join tree comprising a maximum weight subset of edges in the join graph that spans a subset of nodes in the join graph corresponding to the selected subset of the plurality of database tables; extracting a set of joins represented by the subset of edges; creating a database query based on the extracted set of joins; and executing the created database query to produce a query result.