Skip to Content
Author's profile photo Sreenivasulu Dasari

Cartesian Product

Hi All,

I am explaining to understand basics of Cartesian product.

Once we include tables in the data foundation, we need to link tables using different joins. based on join condition the data retired from the tables.

Tables are normally joined with a primary key and forging key relationship. If tables are not joined in the data foundation then a query run on this tables, this results as every row of one table to every row of another table like a cross joins.


Customer, City tables are included in the data foundation and not provided any join between these tables.

Selected the check box allows Cartesian products (Navigation: Select the Data Foundation -> Click in the SQL Options tab (SQL settings can be defined for relational universes only)).


Once business layer is created to generate the query to display customer and related cities, both the customer and cities have six records in the database.

Query using the Cartesian join between these two tables will give total as 36 records in the query results.

How SQL statement generated


If you have not provided a join between the tables and not selected the check box allows Cartesian products./wp-content/uploads/2014/06/1_481716.png

Generate the query to display customer and related city’s getting the error message:  “You cannot run this query because it will produce a Cartesian product.  (IES 00012)” and no SQl code will generate.


Cartesian product occurs when you select object from different tables and there is no link defined between the tables, always give incorrect results. Best practices should not be any free standing tables in the data foundation.

Hope this helpful.



Assigned Tags

      You must be Logged on to comment or reply to a post.
      Author's profile photo Former Member
      Former Member

      Hi Sreeni,

      Simple and nice. Thank u for sharing.

      Author's profile photo Former Member
      Former Member

      great and comprehensive!