2025/05/26 by Carlos Javier Fernández Candel, Fernandez-Candel, Carlos J., Anthony Cleve +3
Computer Science · #Advanced Database Systems and Queries #Cloud Computing and Resource Management #Databases (cs.DB) #FOS: Computer and information sciences #Service-Oriented Architecture and Web Services
paper · doi:10.48550/arxiv.2505.20230
openalex publication_date 2025/05/26 · openalex created_date 2025/10/10 · openalex updated_date 2026/08/01
In this paper, we present a static code analysis strategy to extract logical schemas from NoSQL applications. Our solution is based on a model-driven reverse engineering process composed of a chain of platform-independent model transformations. The extracted schema conforms to the U-Schema unified metamodel, which can represent both NoSQL and relational schemas. To support this process, we define a metamodel capable of representing the core elements of object-oriented languages. Application code is first injected into a code model, from which a control flow model is derived. This, in turn, enables the generation of a model representing both data access operations and the structure of stored data. From these models, the U-Schema logical schema is inferred. Additionally, the extracted information can be used to identify refactoring opportunities. We illustrate this capability through the detection of join-like query patterns and the automated application of field duplication strategies to eliminate expensive joins. All stages of the process are described in detail, and the approach is validated through a round-trip experiment in which a application using a MongoDB store is automatically generated from a predefined schema. The inferred schema is then compared to the original to assess the accuracy of the extraction process.