File: db.createdb.html

package info (click to toggle)
grass 8.4.2-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 277,040 kB
  • sloc: ansic: 460,798; python: 227,732; cpp: 42,026; sh: 11,262; makefile: 7,007; xml: 3,637; sql: 968; lex: 520; javascript: 484; yacc: 450; asm: 387; perl: 157; sed: 25; objc: 6; ruby: 4
file content (65 lines) | stat: -rw-r--r-- 1,783 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
<h2>DESCRIPTION</h2>

<em>db.createdb</em> allows the user to create a new empty database
through different drivers. A working database connection needs to be
established, see <em><a href="db.login.html">db.login</a></em>.

<p>
Currently only <a href="grass-sqlite.html">SQLite</a>
and <a href="grass-pg.html">PostgreSQL</a> database drivers are
supported.

<h2>EXAMPLES</h2>

<h3>Create a new SQLite file-based database</h3>

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:

<div class="code"><pre>
db.createdb driver=sqlite database=/opt/sqlite.db
</pre></div>

<h3>Create a new PostgreSQL database</h3>

Create a new PostgreSQL database (after the PostgreSQL connection got
established through the <em>pg</em> driver):

<div class="code"><pre>
db.createdb driver=pg database=grassdb
</pre></div>

<p>
Create a new PostgreSQL database (after the PostgreSQL connection got
established through the <em>odbc</em> driver):

<div class="code"><pre>
db.createdb driver=odbc database=grassdb
</pre></div>

<h2>TODO</h2>

Support other database drivers, too.

<h2>SEE ALSO</h2>

<em>
<a href="db.columns.html">db.columns</a>,
<a href="db.connect.html">db.connect</a>,
<a href="db.describe.html">db.describe</a>,
<a href="db.drivers.html">db.drivers</a>,
<a href="db.dropdb.html">db.dropdb</a>,
<a href="db.droptable.html">db.droptable</a>,
<a href="db.execute.html">db.execute</a>,
<a href="db.login.html">db.login</a>,
<a href="db.tables.html">db.tables</a>
</em>

<p>
<a href="sql.html">GRASS SQL interface</a>

<h2>AUTHORS</h2>

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