Situation-oriented databases provide processing of documents from heterogeneous data sources under the control of a hierarchical situational model. This article discusses the problem of processing database documents in JSON format, along with XML. Two implementation approaches are discussed: (1) on the fly JSON to XML document conversion and using Document Object Model for processing XML, and (2) loading the JSON document into an associative/indexed array followed by applying the template engine. The database interpreter works with external heterogeneous data extracted from files, databases, archives, web services, data is processed using virtual documents. Examples of processing JSON documents received from a web service are analyzed. Data from the San Francisco Open Data web server is used as the JSON test source. Query in Socrata Query Language used for JSON data extraction is presented. The implementation of approaches in the research situation-oriented database prototype based on Hypertext Preprocessor is considered.
Data stream processing in situational-oriented databases (SODB) is discussed. SODB is a heterogeneous data integrator operating under the control of the built-in hierarchical situational model (HSM). The processed data is defined in the HSM as virtual documents (VD) mapped to real data stores. HSM specifies the loading of a VD data into Data Processing Objects (DPO), the data transformation in DPO, and unloading of processing results to a VD. Stream processing of large documents that do not fit entirely into RAM is discussed. A VD model involving multiple pieces of data that can be processed separately is considered. Portions of data are extracted from the VD input stream, processed in the DPO, and then sent to the VD output stream. Invariance should ensure the independence of the DPO model when the VD model changes. Invariance to different schemes streaming data is discussed. Algorithms for loading and unloading DPO are considered, ensuring invariance due to the hidden cyclical processing of data portions. The proposed solutions are illustrated with examples of processing XML and JSON documents.
scite is a Brooklyn-based organization that helps researchers better discover and understand research articles through Smart Citations–citations that display the context of the citation and describe whether the article provides supporting or contrasting evidence. scite is used by students and researchers from around the world and is funded in part by the National Science Foundation and the National Institute on Drug Abuse of the National Institutes of Health.