# Merging Spatio-Temporal Objects and Business Processes: Land Reform Process Case Study
## 3 Methodology
### Mapping MADS to Logical Model  
This approach combines MADS and BPMN at the conceptual level and PostgreSQL/PostGIS for implementation. PostgreSQL/PostGIS [45] is one of the most widely used and powerful spatial open-source SQL-based DBMS [46]. It is an object-relational database system combined with many features that safely stores and scales data workloads. PostGIS is a powerful open-source software program that adds support for geographic objects to PostgreSQL/PostGIS and follows the SQL specification of the Open Geospatial Consortium (OGC). PostGIS provides the most complete implementation of the OGC Simple Features Specification between free DBMS software [47]. A series of previous works have provided a series of guidelines for the implementation of MADS into relational DBMS, object-relational DBMS, object DBMS, and XML. [PERSON]. [22] developed MADS translation rules for relational and object-relational models as well as a translation of queries expressed in MADS algebra into SQL. The transformation of a MADS conceptual diagram initially consists of defining three groups of transformation rules (i.e., thematic, spatial, and temporal) into MADSLog logical diagrams. The MADSLog logical model is then transformed into Oracle 10 g and GML; GML consists of XML Schema documents and concepts from OGC that define XML-based grammars for encoding geospatial data in XML documents). [PERSON]. [23] proposed a set of transformations from MADS to db4o, which is an object database. Our target is to implement MADS in PostgreSQL/PostGIS. The most likely transformation rules are those suggested by [PERSON] [22] that transform MADS into MADSLog and then to Oracle 10 g. We follow these principles for the transformation of MADS into PostgreSQL/PostGIS. Our transformation from the entity relational model MADS to PostgreSQL/PostGIS automatically generates the necessary relations, functions, and procedures in PostgreSQL/PostGIS and permits the querying and manipulation of the resulting data. Let us introduce the transformation of the main features of MADS to PostgreSQL/PostGIS. Table 2 presents some examples of these transformations (The comprehensive transformation of all MADS fea  
\begin{table}
\begin{tabular}{c c} \hline \hline
**MADS** & **BPMN** \\ \hline \hline  
tures and concepts into PostgreSQL/PostGIS is not within the scope of this paper. However, interested readers can refer to [23] for a detailed explanation of these transformations):  
* Entities in the conceptual schemas are directly transformed into relations in the logical schema; relationships are translated according to their types (i.e., association, generalization, transformation) into relations or attributes in the logical relations. * Each attribute has a data type that can be thematic, spatial, or temporal. MADS's simple thematic data types are directly converted into their correspondences in PostgreSQL/PostGIS. The mapping between MADS and PostgreSQL/PostGIS spatial data types is presented in Table 3. A MADS multi-valued attribute (i.e., an attribute that takes more than one value) is transformed into an array of attributes in PostgreSQL/PostGIS. An additional PostgreSQL/PostGIS constraint is automatically generated to control the number of values for this attribute. * MADS spatial entity feature is transformed into a spatial attribute named 'SPATIALFEATURE'. The data type of this attribute will be the spatial PostgreSQL/PostGIS type that corresponds to the spatiality of the MADS entity. * MADS temporal entity feature is transformed into an attribute named 'TEMPORALFEATURE' of type 'lifecycle'. The Lifecycle tracks the scheduling, creation, deactivation, or deletion dates of the MADS class instances. At a given date, the status of a temporal object can be either planned, active, suspended, or destroyed. The active period of an object is the temporal element associated with its active status in its life cycle [22]. We implemented the MADS temporal types (Instant, Interval, etc.) with their corresponding temporal functions as object types in PostgreSQL/PostGIS.