File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes EJB Certification (SCBCD/OCPJBCD) and the fly likes Theta Join Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Certification » EJB Certification (SCBCD/OCPJBCD)
Bookmark "Theta Join" Watch "Theta Join" New topic
Author

Theta Join

Amandeep Singh
Ranch Hand

Joined: Jul 17, 2008
Posts: 844
I am unable to makeout the meaning of theta join. To me there seems no difference between theta join and inner join.


SCJP 1.4, SCWCD 5, SCBCD 5, OCPJWSD 5,SCEA-1, Started Assignment Part 2
My blog- http://rkydesigns.blogspot.com
Arun Kumar Gupta
Ranch Hand

Joined: Jul 16, 2008
Posts: 33
Theta join is the join when two entities are joined not on the relationship exist between them but explicitly specifying some other field.

Select b
from b.item,c.categories
where b.(something other than relationship)=c.(something)

Inner join is the join on relationship entities and no need to sepecify the join in =,only the matching entities are there that exist in both the entities

select b
from b.item INNER JOIN c.categoreis

Outer join when you want all the field of one side to exist whether match is found or not LEFT ,RIGHT,

Correct me if i am wrong


SCJP 1.4<br />SCWCD 1.5
Amandeep Singh
Ranch Hand

Joined: Jul 17, 2008
Posts: 844
Thanks...

even if there is no relationship between the comparing the field's, it dosen't matter, the same thing we are doing in inner join.

i am again confused here for the differnce between theta join and inner join.

i thibk it would be best to give a sql query for theta join and inner join. Then highlight the differnce between them.
Chaminda Amarasinghe
Ranch Hand

Joined: May 17, 2006
Posts: 402
Inner Join:
based on database relationship. apply existing pk, fk relationship. you no need to specify how to join

Theta join:
the relationship is made by you explicitly. no primary key foreign key relationship in db level. so you have to explicitly specify fields used to define relationship.
Amandeep Singh
Ranch Hand

Joined: Jul 17, 2008
Posts: 844
Chaminda, i am unable to understand, can you give example.
 
jQuery in Action, 2nd edition
 
subject: Theta Join
 
Similar Threads
How to do inner join while working with set in Hibernate
Theta-style joins in Criteria
Left join using on keyword (Hibernate)
how to use variable with oracle like
Table Join without Foreign Key