QGIS supports PostGIS, SpatiaLite, MSSQL, SQL Anywhere, and Oracle Spatial databases. We will cover the two open source options: PostGIS and SpatiaLite. Both are available cross-platform, just like QGIS.
SpatiaLite is the spatial extension for Sqlite databases. Sqlite is a self-contained, serverless, zero-configuration, transactional SQL database engine (www.sqlite.org). This basically means that an Sqlite database, and therefore also a SpatiaLite database, doesn't need a server installation, and can be copied and exchanged just like any ordinary file.
You can download an example database from www.gaia-gis.it/spatialite-2.3.1/test-2.3.zip. Unzip the file; you will be able to connect to it by going to Layer | Add SpatiaLite Layer, using the Add SpatiaLite Layer
toolbar button, or by pressing Ctrl + Shift + L. Click on New to select the database file test-2.3.sqlite
. QGIS will save all connections and add them to the drop-down list at the top. After clicking on...