Skip to content

Clarification and Documentation Request on Cross-Model Queries #463

@stone-ts15

Description

@stone-ts15

Affected Areas

DB

Feature Description

Hello Polypheny Team,

I'm currently exploring the capabilities of Polypheny and am interested in executing cross-model queries, specifically between HSQLDB and Neo4j. However, I've encountered some difficulties as the documentation (Polypheny-documentation) does not clearly indicate whether this feature is supported. It would be immensely helpful if you could confirm whether Polypheny supports cross-model queries and possibly update the documentation to include examples or use cases showcasing this functionality.

Any clarification or assistance with this matter would be greatly appreciated. Thank you for your attention to this issue.

Use Case(s)

To illustrate my point, here's an example scenario involving a cross-model query between HSQLDB and Neo4j:

In Neo4j, with the namespace university, we have graph vertices labeled Student and edges labeled Friend created as follows:

CREATE (n: Student {deptno: 10});
CREATE (m: Student {deptno: 20});
MATCH (n: Student {deptno: 10}), (m: Student {deptno: 20}) CREATE (n)-[r:Friend]-(m);

Additionally, there is a predefined table named depts in the public namespace with a deptno column as its primary key. The query requirement (Q for short) is to find friends of students from the "Sales" department.

The Polypheny Web UI restricts users to one query language—either SQL or Cypher in this case. Therefore, it's unclear how to integrate the two models to satisfy Q. While attempting to write the Cypher query under the university namespace, all my queries failed to execute. For instance, the following statement triggered an org.polypheny.db.languages.NodeParseException:

MATCH (d: public.depts), (n: Student)-[r: Friend]-(m: Student)
WHERE d.name = 'Sales'
  AND d.deptno = n.deptno
RETURN m;

The error persists regardless of whether public.depts is quoted. It seems that the public.depts namespace is not recognized within the Cypher environment. When I replace public.depts with just depts, the query executes but returns an empty result set. Perhaps Polypheny considers depts as a individual vertex label in Neo4j.

Possible Solutions

No response

Possible Alternatives

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-docsC-enhancementCategory: An issue proposing an enhancement

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions