_\|/_ GRASS logo

Database management in GRASS GIS

Attribute management in general

GRASS can be linked to one or many database management systems (DBMS). The db.* set of commands provides basic SQL support for attribute management, while the v.db.* set of commands operates on the vector map (see Vector introduction).

Available drivers

Available drivers are listed in SQL support in GRASS GIS.

The default DBF driver provides only very limited SQL support (as DBF is not an SQL DB) while the other DBMS backends (such as PostgreSQL, MySQL etc) provide full SQL support since the SQL commands are sent directly to the DBMS.

SQL commands

SQL commands can be directly executed with db.execute, db.select and the other db.* modules. See the SQL help page for examples.

Managing the default settings

Per default vector map attributes are stored in DBF table files. This default definition can be modified with db.connect. If an external DBMS is used, db.login may be required.

Creating a database

Specific commands are explained on the individual driver pages (these pages are only available if driver was compiled in this installation): Conversion tools:

Database Schema

Currently schema support only works for PostgreSQL connections. Default schema can be set with db.connect. Note that the default schema will be used by all db.* modules.

db.tables returns 'schema.table' if schemas are available in the database.

See also

Main index - database index - full index

Last changed: $Date: 2006/08/24 19:11:36 $