db.createdb1grass
Creates an empty database.
Usage
db.createdb
db.createdb --help
db.createdb driver=name
database=name
[--help]
[--verbose]
[--quiet]
[--ui]
Keywords
database, attribute table, SQL
Overview
db.createdb allows the user to create a new empty database through different drivers. A working database connection needs to be established, see db.login.
Currently only SQLite and PostgreSQL database drivers are supported.
Examples
Create a new SQLite file-based database
Note that the standard GRASS GIS SQLite database is by default generated in the user’s current mapset. This example shows an out-of-mapset database file creation:
db.createdb driver=sqlite database=/opt/sqlite.db
Create a new PostgreSQL database
Create a new PostgreSQL database (after the PostgreSQL connection got established through the pg driver):
db.createdb driver=pg database=grassdb
Create a new PostgreSQL database (after the PostgreSQL connection got established through the odbc driver):
db.createdb driver=odbc database=grassdb
Todo
Support other database drivers, too.
Source code
Available at: db.createdb source code (history)
Accessed: Monday Feb 24 17:50:22 2025
Main index | Database index | Topics index | Keywords index | Graphical index | Full index
© 2003-2025 GRASS Development Team, GRASS GIS 8.4.1 Reference Manual
Releases
5 releases since Debian 9 (Stretch); the text changed 4 times.