4 Database Architecture
4.1 Overview
The MAPS database architecture is designed for use with Postgres databases and is compatible with Postgres versions 13+. The PostGIS spatial extension is required for handling spatial coordinate data.
Flyway can be used to run and manage the database migration scripts to spin up an instance of the MAPS database.
4.2 Getting Started
Clone the database-architeture repository from GitHub
Install flyway
Rename
flyway.conf.template
toflyway.conf
and fill in the configurationRun
flyway migrate
to run all the sql scripts. Runflyway clean migrate
to delete pre-existing data in the schema and re-create the db objects from scratch
4.3 Database Architecture
The MAPS data model exists within a single schema, visualised below (click to expand). For more detail on table and field purposes, please see the table, view and field descriptions in the generated entities.
4.3.1 Loading Additional Data
The data model is deisnged to support loading of additional datasets which could then be displayed in an instance of the tool interface. All key datasests (FCT, FBS, HCES datasets etc.) are described using a polygonal coverage area which is utilized by the tool when deciding which datasets to combine for a given output.
Though the initial focus of the MAPS tool is Sub Saharan Africa, this flexible data model would allow a version of the tool to support datasets from a different geographic locale.