Book Image

Mastering Geoserver

By : Colin Henderson
Book Image

Mastering Geoserver

By: Colin Henderson

Overview of this book

Table of Contents (19 chapters)
Mastering GeoServer
About the Author
About the Reviewers

General database connection parameters

Irrespective of the database platform you use to serve your vector data, there is a set of parameters that is common to all. In this section, we will take a look at:

  • How primary keys can be managed

  • Database startup session scripts

  • Database shutdown session scripts

The primary key metadata table

While not necessary, it is usually best practice to have your database tables configured with a primary key. A primary key should be a unique value for each record in the table, and most often, it's not a simple integer incremented by some value, often 1, for each newly inserted record. GeoServer usually derives its feature ID values from the table's primary key column, and it will make assumptions about how to generate new IDs when inserting features, for example, as a result of a WFS-Transaction (WFS-T) insert transaction. These will usually be based on common conventions for a database platform, for example, looking for an auto-incrementing column in PostGIS. If...