13. A computer system comprising: at least one storage medium storing instruction code; and at least one processing unit configured to execute the instruction code to perform a method comprising: for each table of a plurality of database tables and for each column of a plurality of columns within the each table: determining a data type for the each column by accessing and analyzing a subset of values stored in the each column, determining a cardinality of the each column, and storing a profile for the each column, wherein the profile for the each column includes the determined data type and the determined cardinality; establishing a join graph comprising a plurality of nodes, wherein each node of the plurality of nodes 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: 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: retrieving the determined cardinality of the first column from the stored profile for the first column, retrieving the determined cardinality of the second column from the stored profile for the second column, determining a cardinality of a union between the first column and the second column, determining a cardinality of an intersection between the first column and the second column by subtracting the determined cardinality of the union from the sum of the determined cardinality of the first column and the determined cardinality of the second column, and dividing the determined cardinality of the intersection by the determined 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.
13. A computer system comprising: at least one storage medium storing instruction code; and at least one processing unit configured to execute the instruction code to perform a method comprising: for each table of a plurality of database tables and for each column of a plurality of columns within the each table: determining a data type for the each column by accessing and analyzing a subset of values stored in the each column, determining a cardinality of the each column, and storing a profile for the each column, wherein the profile for the each column includes the determined data type and the determined cardinality; establishing a join graph comprising a plurality of nodes, wherein each node of the plurality of nodes 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: 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: retrieving the determined cardinality of the first column from the stored profile for the first column, retrieving the determined cardinality of the second column from the stored profile for the second column, determining a cardinality of a union between the first column and the second column, determining a cardinality of an intersection between the first column and the second column by subtracting the determined cardinality of the union from the sum of the determined cardinality of the first column and the determined cardinality of the second column, and dividing the determined cardinality of the intersection by the determined 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. 14. The computer system of claim 13 , wherein for each instance of determining a cardinality, the determining is performed by at least one of calculating an estimated cardinality and calculating an exact cardinality.