Added by aaime, last edited by jgarnett on Dec 14, 2005  (view change)

Labels:

Enter labels to add to this page:
Wait Image 
Looking for a label? Just start typing.

Spatial databases and the JDBCDataStore

In recent years GIS applications have grown to require more and more DBMS capabilities such as handling of large data quantities, transactions, multiuser capabilities, flexible and easy to use query language and indexing.
Ways have been devised to handle vector geographic data into databases, specifically, at present we either:

  • use a traditional database, save geographic data into BLOB fields and leave the knowledge about how to handle those data into the applications (the geodatabase/ArcSDE/geomedia approach);
  • extend the type system of a object/relational database so that the database has knowledge about geometry and spatial referencing, can handle this data, perform operations on it, and appropriately index it for fast geographic searches (the Oracle spatial/Postgis/MySQL approach).

Either way, the basics of DBMS data handling, table oriented data structures, relations and query language remain fundamentally the same, and at the same time we use JDBC to communicate with all those database systems.
Thus, we can see that there is quite a large part of common work in building DBMS based data stores, and this common part has been factored out in the JDBCDataStore and related classes.

This tutorial will explain the basic architecture of the JDBCDataStore, what the base class provides, and what do you need to add in order to build a concrete data store.

The abstract architecture

Mapping tables onto FeatureTypes

Mapping primary keys to IDs

Wrapping ResultSets into Feature readers and writers

Creating a custom implementation