New answers tagged


The syntax of comma-style joins (SQL-89) versus using the JOIN keyword (SQL-92) is not the point. You should use the more modern syntax, but it doesn't address the question of why the default would be a Cartesian product if you do not specify a condition. The answer to that is that it makes relational algebra work. A Cartesian product is the set of all ...


You should NOT use the , (comma) as a proxy for a CROSS JOIN clause to join your tables. It provides CROSS JOIN functionality, but at a cost - that of readability, clarity and explicitness - this latter word meaning the quality of being clear and exact (wasn't sure it existed)! As for your question about "why the comma" (in the past, but not any ...


Answer left as a comment by Lennart: SQL was an attempt to implement the relational model defined in "A Relational Model of Data for Large Shared Data Banks" (pdf). I don't think there is a good answer to why the symbol "," was chosen to denote one of the operations and cartesian product in particular.


I'm not familiar with how concatenate works in Pandas, but I think CROSS JOIN is the only clause that makes sense with nothing else specified in this case. You certainly couldn't vertically concatenate (UNION in SQL) the tables because they could vary in columns (by number of columns and their data types) and how would one horizontally concatenate them, i.e. ...

Top 50 recent answers are included