db.createdb(1grass)

πŸ’– db.createdb πŸ’–

okay bestie, welcome to the GRASS User's Manual β€” this one's db.createdb(1grass) and it's literally here to make you an empty database, no cap πŸŽ€


✨ NAME ✨

db.createdb β€” creates an empty database. that's it, that's the whole job, and she does it flawlessly πŸ’…


πŸ”‘ KEYWORDS πŸ”‘

database, attribute table, SQL β€” the holy trinity, iykyk 🧚


🌸 SYNOPSIS 🌸

db.createdb
db.createdb --help
db.createdb driver=name database=name  [--help]  [--verbose]  [--quiet]
[--ui]

πŸŽ€ Flags πŸŽ€

  • --help β€” prints the usage summary, aka the "what does this even do" button
  • --verbose β€” verbose module output, for when you want the module to talk to you
  • --quiet β€” quiet module output, for when you want her to shut up and just work
  • --ui β€” force launches the GUI dialog. graphical era ✨

πŸ¦‹ Parameters πŸ¦‹

  • driver=name [required] β€” the name of the database driver. your options, queen: dbf, mysql, odbc, ogr, pg, sqlite. default is sqlite
  • database=name [required] β€” the name of your database. give her a name, she needs an identity πŸ’œ

πŸ’« DESCRIPTION πŸ’«

db.createdb lets you create a brand new empty database through all sorts of different drivers. but listen β€” a working database connection needs to be established first, ok? go see db.login for that part πŸ”‘

reread that: currently only SQLite and PostgreSQL database drivers are supported. so like, yes the driver= options list has more names in it, and no, that doesn't mean all of them actually work. it's giving "menu with items that aren't ready yet" 😭


🌈 EXAMPLES 🌈

πŸ“ Create a new SQLite file-based database

ok so quick note, bestie: the standard GRASS 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

and now the same thing but the connection got established through the odbc driver instead:

db.createdb driver=odbc database=grassdb

look at her go, two paths, same iconic result πŸ‘‘


πŸ’€ TODO πŸ’€

support other database drivers, too. that's the whole note. manifesting it for the future πŸ™


πŸ‘€ SEE ALSO πŸ‘€

db.columns, db.connect, db.describe, db.drivers, db.dropdb, db.droptable, db.execute, db.login, db.tables

GRASS SQL interface


πŸ‘‘ AUTHORS πŸ‘‘

  • Radim Blazek, ITC-Irst, Trento, Italy
  • SQLite and PostgreSQL support by Martin Landa, Czech Technical University in Prague, Czech Republic

🫢 SOURCE CODE 🫢

available at: db.createdb source code (history)

latest change: Friday Aug 08 09:39:19 2025 in commit: ed72c71d8580e872cd6fd345c84a15c324764465

Main index | Database index | Topics index | Keywords index | Graphical index | Full index

Β© 2003-2026 GRASS Development Team, GRASS 8.5.0 Reference Manual


and that's the whole page, babe! GRASS 8.5.0, db.createdb(1grass) β€” go make some empty databases, you're gonna ate πŸ’–βœ¨
πŸ“¦ where this page comes from