db_select query for given sql query with equi join I'm trying to do a equi join but it isn't working.
I have 2 tables:
Table 1 - taxonomy_term_data with fields "tid,vid,name,description,format,weight etc"

Table -2 -taxonomy_term_hierarchy with fields "tid and parent" 

I have sql query with me it is working fine. This is the query "select t1. *,t2.vid,t2.name from taxonomy_term_hierarchy t1, taxonomy_term_data t2 where t1.tid = t2.tid AND vid=2 limit 5;"

I just want to get tid,name,vid from taxonomy_term_data table and parent from taxonomy_hierarchy table in db_select query format
You can built any type of select query using db_select, you can see in detail on following url
https://api.drupal.org/api/drupal/includes!database!database.inc/function/db_select/7.x