Polypheny JDBC Driver - Multimodel Extension

The JDBC standard is inherently oriented towards relational databases and SQL queries. However, Polypheny extends beyond these limitations, supporting multiple data models and languages. To accommodate this, the JDBC standard has been extended in a feature known as the Multimodel Extension which goes beyond what is traditionally available through JDBC.

The features of the Multimodel Extension are considered experimental and are still a work in progress. Nonetheless, high priority is given to its development. Frequent changes and rapid expansion of features thus uccurs.

Supported Data Models

The Multimodel Extension of the Polypheny JDBC Driver is designed to accommodate a diverse range of data models. Specifically, it supports the Relational model the Labeled Property Graph model (LPG) and the Document model. This allows Java applications to interact with all datamodels currently supported by Polypheny using a single driver. .

Supported Languages

Currently, only SQL and MQL are supported for queries and data manipulation.

In the future, the intention is to support all languages that can be loaded as plugins into Polypheny.

Currently the following languages are supported. At some points when working with the multi model extension langugaes must be specified. This is done using their names. The name for each language is provided below.

Query Language Name used for the languageName parameter
SQL sql
MongoDB Query Language mql

These are the query languages currently supported by the Polypheny JDBC Driver. When using the execute method, the languageName parameter should be one of these names to correctly interpret the provided statement.

Unwrapping for Multi-Model Support

To access the features of the Multimodel Extension, the JDBC Connection object must be unwrapped to a PolyConnection object, which provides Polypheny-specific features. Specifically, you can use the createPolyStatement method to generate a statement object aligned with the Multimodel Extension.

For detailed documentation on the PolyStatement object please refer to the corresponding documentation.


try (
    Connection connection = DriverManager.getConnection("jdbc:polypheny://localhost:20590");
) {
    if (connection.isWrapperFor(PolyConnection.class)) {
        PolyConnection polyConnection = connection.unwrap(PolyConnection.class);
        PolyStatement polyStatement = polyConnection.createPolyStatement();

        // You can now use polyStatement to execute multi-model queries...
} catch (SQLException e) {
© Polypheny GmbH. All Rights Reserved.