123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120 |
- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
- <html>
- <head>
- <title>Database management in GRASS GIS</title>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
- <meta name="Author" content="Markus Neteler/GRASS Development Team">
- <link rel="stylesheet" href="grassdocs.css" type="text/css">
- </head>
- <body bgcolor="white">
- <!-- This page is grass6/db/databaseintro.html -->
- <img src="grass_logo.png" alt="_\|/_ GRASS logo"><hr align=center size=6 noshade>
- <h2>Database management in GRASS GIS</h2>
- <h3>Attribute management in general</h3>
- GRASS can be linked to one or many database management systems (DBMS).
- The <em>db.*</em> set of commands provides basic SQL support for
- attribute management, while the <em>v.db.*</em> set of commands operates
- on the vector map (see <a href="vectorintro.html">Vector introduction</a>).
- <h3>Available drivers</h3>
- Available drivers are listed in <a href="sql.html">SQL support in GRASS GIS</a>.
- <p>
- <b>Notes</b>:<br>
- 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.
- <h3>DB connection management</h3>
- The current database management settings are shown or modified with
- <a href="db.connect.html">db.connect</a> for current mapset. Available DBMI drivers
- are listed with <a href="db.drivers.html">db.drivers</a>. Some DBMI backends
- require a user/password for driver/database to be set with <a href="db.login.html">db.login</a>.
- In order to test a driver, run <a href="db.test.html">db.test</a>.
- <h3>Attribute data import and export</h3>
- Attribute data can be imported with <a href="db.in.ogr.html">db.in.ogr</a> from
- various formats and exported with <a href="db.out.ogr.html">db.out.ogr</a>. To internally
- copy a a full table or selectively parts of it, use <a href="db.copy.html">db.copy</a>.
- <p>
- Further conversion tools:
- <ul>
- <li><a href="http://mdbtools.sourceforge.net/">MDB Tools</a>: Convert MS-Access data to SQL, DBF, etc.</li>
- <li><a href="http://grass.osgeo.org/wiki/Openoffice.org_with_SQL_Databases">Openoffice.org with SQL Databases</a>
- </ul>
- <h3>SQL commands</h3>
- GRASS supports to main SQL operations, execution of an SQL statement
- (<a href="db.execute.html">db.execute</a>) and selection
- of data from a table (<a href="db.select.html">db.select</a>).
- See the <a href="sql.html">SQL help page</a> for examples.
- <h3>Managing the default DBMI settings</h3>
-
- Per default vector map attributes are stored in DBF table files. This default
- definition can be modified with <a href="db.connect.html">db.connect</a>. If an
- external DBMS is used, <a href="db.login.html">db.login</a> may be required.
- <h3>Creating a database</h3>
- Specific commands are explained on the individual driver pages (these
- pages are only available if driver was compiled in this installation):
- <ul>
- <li>DBF: see <a href="grass-dbf.html">DBF</a> page</li>
- <li>SQLite: <a href="grass-sqlite.html">SQLite</a> page</li>
- <li>mySQL: <a href="grass-mysql.html">mySQL</a> and <a href="grass-mesql.html">meSQL</a> pages</li>
- <li>ODBC: <a href="grass-odbc.html">ODBC</a> page (connect to Oracle, etc.)</li>
- <li>PostgreSQL: <a href="grass-pg.html">PostgreSQL</a> and PostGIS page</li>
- </ul>
- <h3>Metadata</h3>
- All columns for a given table are listed with <a href="db.columns.html">db.columns</a>.
- The command <a href="db.describe.html">db.describe</a> describes a table in detail. To
- list all available tables for a given database, run <a href="db.tables.html">db.tables</a>.
- <h3>Table maintenance</h3>
- To drop a column from a selected attribute table, use <a href="db.dropcol.html">db.dropcol</a>.
- With <a href="db.droptable.html">db.droptable</a> an attribute table can be deleted.
- <h3>Database Schema</h3>
- Currently schema support only works for PostgreSQL connections. Default schema
- can be set with <a href="db.connect.html">db.connect</a>. Note that the default
- schema will be used by all db.* modules.
- <p>
- <a href="db.tables.html">db.tables</a> returns 'schema.table' if schemas are
- available in the database.
- <h3>See also</h3>
- <ul>
- <li><a href="vectorintro.html">Introduction to GRASS vector map processing</a></li>
- <li><a href="rasterintro.html">Introduction to GRASS raster map processing</a></li>
- </ul>
- <HR>
- <BR>
- <a href="index.html">Main index</a> -
- <a href="database.html">database index</a> -
- <a href="full_index.html">full index</a>
- <p><i>Last changed: $Date$</i></p>
- <P>© 2008 <a href="http://grass.osgeo.org">GRASS Development Team</a></P>
- </body>
- </html>
|