This article solves the heterogenous data mapping problem on real data sources in Situation-Oriented
Databases. In accordance with Polyglot Persistence SODB uses various type of documents. It is necessary
to use external data sources like relational and JSON/XML documents. To manage this diversity of
sources proposed special provision for hierarchical situation model of SODB named as virtual multidocuments.
There are three type of data sources discussed — XML/JSON, Zip-archives, MySQLidocuments
from relational database MySQL. Introduced inversional methods for mapping virtual
multi-documents on real data sources by means of doc-elements. For each functional element three
special modules are recommended to implement with known structures. Implementation technique is
shown on SQLite example and based on three functions SQLite3_doc, SQLite3_load, SQLite3_save.
First SQLite3_doc module defines how to connect to source within model and send a query. Second
SQLite3_load module specifies how to return document is selected from table of relational database
and loaded in virtual multi-document for handling and subsequent saving. In this function interpreter
of SODB creates special DPO-object (DPO — Data Processing Object) within that all handling operations
are performed. DPO-object can concern of several virtual multi-documents. For late stages
must be implemented third function SQLite3_save that performs saving ending result in serverless
SQLite3 database. All proposed functions implemented on PHP example in web-application of SODB.
Key words
situation-oriented database, web-application, model-driven approach, hierarchical situation model, virtual document, relational data, data integration, HSM, NoSQL, XML, JSON, DOM, MySQL, PHP.