[GIS] Table Relate Spatial and Tabular data in QGIS 2.0

postgispostgresqlqgisrelates

I am self taught in GIS, so I apologize ahead of time for my noobness.

In ArcGIS you have two options to associate data in a table to spatial data. Based upon my understanding, the first is Join which allows the join of 1:1 or many:1. Then there is Relate which allows 1:many.

I downloaded soils data from Web Soils Survey. In this data there is a spatial data, a shape file named soilmu_a_ny071.shp. And there is tabular data named component in soildb_US_2003.mdb.

I need to relate the spatial data to many attributes in the tabular data based upon the common field MUKEY. Is there a way to Relate in QGIS 2.0? I also have Postgresql and PostGIS installed, so is there a way to do it through there?

Best Answer

Here is a tutorial for doing the join in QGIS.

To do this in PostGIS, you would create a query or view that does the join between the two tables:

Select table_a.column, table_b.column  
from table_a   
join table_b   
on (table_a.MUKEY = table_b.MUKEY)

(...or something very similar...)

More info here