This week's book giveaway is in the Mac OS forum.
We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line!
See this thread for details.
The moose likes EJB Certification (SCBCD/OCPJBCD) and the fly likes Enthuware say's this as a Cartesian Join Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Certification » EJB Certification (SCBCD/OCPJBCD)
Bookmark "Enthuware say Watch "Enthuware say New topic
Author

Enthuware say's this as a Cartesian Join

Amandeep Singh
Ranch Hand

Joined: Jul 17, 2008
Posts: 844
SELECT s.name FROM Student s, Program p where s.subjectid=p.subjectid

An inner join may be implicitly specified by the use of a cartesian product in the FROM clause and a join condition in the WHERE clause. In the absence of a join condition, this reduces to the cartesian product.
The main use case for this generalized style of join is when a join condition does not involve a foreign key relationship that is mapped to an entity relationship.

Example:
select c from Customer c, Employee e where c.hatsize = e.shoesize

In general, use of this style of inner join (also referred to as theta-join) is less typical than explicitly defined joins over entity relationships.


this given query does not qualify for cartesian join because there is relationship defined between them although join not being used here.


SCJP 1.4, SCWCD 5, SCBCD 5, OCPJWSD 5,SCEA-1, Started Assignment Part 2
My blog- http://rkydesigns.blogspot.com
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Enthuware say's this as a Cartesian Join