Skip to Content
Web Mapping Illustrated
book

Web Mapping Illustrated

by Tyler Mitchell
June 2005
Beginner to intermediate
372 pages
10h 1m
English
O'Reilly Media, Inc.
Content preview from Web Mapping Illustrated

Creating a Spatial Database

The template1 database is the default system template used when creating new databases. Don't use it as an operational database! Instead, create a new database for your projects. New databases are created using the command-line program createdb, followed by the name that identifies the new database:

> createdb project1
CREATE DATABASE

In this case, the new database is called project1. The text that is printed out (CREATE DATABASE) confirms that the command ran and finished. Now when existing databases are listed, project1 should be included:

> psql -l
       List of databases
    Name    |   Owner  | Encoding
------------+----------+-----------
 project1   | tyler    | SQL_ASCII
 template0  | postgres | SQL_ASCII
 template1  | postgres | SQL_ASCII
(3 rows)

The project1 database is now ready for data loading. To quit psql, use the \q command.

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Flask Web Development, 2nd Edition

Flask Web Development, 2nd Edition

Miguel Grinberg

Publisher Resources

ISBN: 0596008651Supplemental ContentErrata Page