
QGIS 2 Cookbook
By :

If you use a database (SpatiaLite or PostGIS) to store your data, vector and nonspatial, then you also have the option of using the database and SQL to perform tables joins. The primary advantages of this method include being able to filter data before loading in the map, perform multitable joins (three or more), and have full control over the details of the join via queries.
You'll need at least two layers in either a SpatiaLite or PostGIS database. These two layers need at least one column in common, and the column in common should contain unique values in at least one table. In this case, our example uses the census_wake_2000
polygon layer and census_wake_2000_pop.csv
.
Open the DB Manager plugin that comes with QGIS. You can find this in the Database menu.
Select your database from the tree on the left-hand side, use cookbook.db
in SpatiaLite (which was created in Chapter 1, Data Input and Output).
If you don't see this database listed...
Change the font size
Change margin width
Change background colour