Skip to content

Serialisation and Direct Object‐Oriented representation

Giacomo Bergami edited this page Nov 5, 2023 · 2 revisions

Data Model

The most recent description of our full data model and its associated meta-language are described in our seminal paper:

G. Bergami, W. Zegadło. 2023. "Towards a Generalised Semistructured Data Model and Query Language" SIGWEB Newsl. 2023, Summer, Article 4 (Summer 2023), 22 pages.

This was previously introduced in this PhD dissertation:

G.Bergami. “A new Nested Graph Model for Data Integration, [PhD Dissertation thesis]", Alma Mater Studiorum Università di Bologna. Dottorato di ricerca in Computer science and engineering (2018), XXX Ciclo.

Serialisation

The documentation related to the GSM model is provided in terms of JSON Schema. From this schema, we can also generate code for the following languages:

  • Python, generated through datamodel-codegen
  • Java, generated through jsonschema2pojo
  • YAML: this specification walks on the footsteps of the Python specification, and might be used to manually define databases in GSM if efficiency is not considered at parsing time.
  • GSM: This is the preferred syntax and representation of the Generalised Semistructured Data Model. Some examples on how to generate such representation are the following:
    • Generating GSM from the YAML representation of the data model: Python
    • Generating GSM from an arbitrary Java Object: Java

Object Oriented Mapping

The Generalised Semistructured Model comes with the precise goal of removing any need for Object-Relational Mapping, or any other kind of mapping between OO specification and database representation of data, thus minimising the representational and schema-mapping overhead. By taking Java as an example, it is quite straightforward to first represent any Java Object into a GSMObject (this) for then representing it either in the preferred GSM format (this method) or by exploiting the JSON serialisation abiding to the aforementioned schema (this example)

Clone this wiki locally