Software Open Access
Maritime data processing research has long used spatio-temporal relational databases. This model suits well the requirements of off-line applications dealing with average-size and known in advance geographic data that can be represented in tabular form. This set of SQL queries has been prepared for the book Maritime Informatics. It aims to help students and teachers explore off-line maritime data processing in relational databases and provides a step-by-step guide to build a maritime database for investigating maritime traffic and vessel behaviour. Examples and exercises of the book chapter are proposed to build a maritime database using the data available in the open, heterogeneous and integrated dataset also available on Zenodo (10.5281/zenodo.1167595). The dataset exemplifies the variety of data that are available as of today for monitoring the activities at sea, mainly the Automatic Identification System (AIS), which is openly broadcast and provides worldwide information on the maritime traffic. All the examples and the exercises refer to the syntax of the widespread relational database management system PostgreSQL and its spatial extension PostGIS, an established and standard-based combination for spatial data representation and querying. Along the chapter, through exercises, the reader is guided to handle the various spatio-temporal features offered by the database management system, that include spatial and temporal data types, indexes, queries and functions, and eventually to investigate, incrementally, behaviours of vessels at sea and the state of the maritime traffic.