vikramrathour
asked on
Detecting a cartesian product
I am developing a query builder form something similar to TOAD.
When the user selects multiple columns from various tables i need to detect whether the tables can be joined or not. I want this to be done so that i can avoid a cartesian product when the final query is built and run on the server.
Is there a way to detect if two tables would cause a cartesian product / not.
When the user selects multiple columns from various tables i need to detect whether the tables can be joined or not. I want this to be done so that i can avoid a cartesian product when the final query is built and run on the server.
Is there a way to detect if two tables would cause a cartesian product / not.
ASKER
I am using Oracle Database.
The joins will either be specified by the user or i would be picking up the primary keys of both tables and try and equate them.
Thats what i am thinking of right now but can some one tell me a better solution.
The joins will either be specified by the user or i would be picking up the primary keys of both tables and try and equate them.
Thats what i am thinking of right now but can some one tell me a better solution.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
how are you expecting the joins to be specified anyway?