Module org.apache.sis.storage.sql


module org.apache.sis.storage.sql
Data store for features in a SQL spatial database. This module expects a spatial schema conforms to the conventions described in the OGC Simple feature access - Part 2: SQL option international standard, also known as ISO 19125-2.

Differences with Geopackage

Compared to the OGC Geopackage standard, this SQL module has the following differences:
  • There is no "gpkg_contents" table. The tables to use as resource definitions must be specified explicitly.
  • Each feature table can contain an arbitrary number of geometry columns, including zero. By contrast, Geopackage requires each feature table to have exactly one geometry column.
  • As a consequence of the above, this module makes no distinction between "features" table and "attributes" table.
  • This module supports complex features, i.e. features having associations to other features. The associations are discovered automatically by following the foreigner keys.
  • Primary keys are optional. If present, they can be of any type (not necessarily integers) and can be composite (made of many columns). By contrast, Geopackage mandates primary keys made of exactly one column of integers.
This module has been tested with PostgreSQL, Oracle, SQLite, DuckDB, HSQL, H2 and Derby. Other database engines should work if they are ANSI compliant but have not been tested.

MySQL/MariaDB databases should set their SQL mode to an ANSI-compliant mode. The options should contain at least NO_BACKSLASH_ESCAPES. For instructions about how to set options, see MariaDB documentation.

PostgreSQL databases should have the PostGIS extension installed (optional but recommended).

Since:
1.0