Book Image

Mastering QGIS

Book Image

Mastering QGIS

Overview of this book

Table of Contents (18 chapters)
Mastering QGIS
Credits
Foreword
About the Authors
About the Reviewers
www.PacktPub.com
Preface
Index

Managing tables


DB Manager provides functions to create, rename, edit, delete, and empty tables using tools found under the Table menu. In this section, we will discuss each tool.

Creating a new table

Creating new tables using DB Manager is fairly straightforward. When creating a new table, you can specify whether it will be a spatial table or a nonspatial table. In this section, we will create a new spatial table in SpatiaLite to hold data about mountain peaks in a park; to do this, perform the following steps:

Tip

To quickly create a new SpatiaLite layer (and optionally a database) in one dialog box in QGIS Desktop, navigate to Layer | Create Layer | New SpatiaLite Layer….

  1. Open DB Manager by clicking on DB Manager under Database. Expand SpatiaLite and select GiffordPinochet.sqlite in the Tree panel.

  2. Navigate to Table | Create Table to open the Create Table window.

  3. Enter Peaks as the table name.

  4. Click on the Add field button to add a new table field. A new row will appear in the field list. Set...