amosproj / amos2021ss02-project2-context-map

A context map for corporate data
MIT License
1 stars 0 forks source link

Entity filter combinators #114

Open CatoLeanTruetschel opened 3 years ago

CatoLeanTruetschel commented 3 years ago

Filtering a graph with multiple filter conditions leads to the question, how these multiple filter conditions are combined. In the implementation of #47, filter conditions are combined via AND relation, that as for an entity to be part of the result sub-graph, all filter conditions must be met.
Another possible options is the combination with OR relation, that is for an entity to be part of the result sub-graph, at least one filter conditions must be met.
A simple approach to leverage this is a global switch, whether to use AND or OR relation to combine filter conditions. A more powerfull aproach allows the combination of filter conditions and groups of filter conditions ina flexible way by arbitrary relations.

If we find a reasoable and user friendly visual way of defining these combinations, the resulting solution is a powerful way of building a (mostly generic) query in a visual non-code way.

Example

Filter conditions

The following filter conditions are specified:

  1. Node is of type Person
  2. Node has attribute name with value 'Simon'
  3. Node has at least one edge

Current filter condition combination (AND relation)

The resulting sub-graph contains all nodes that are of type Person with a name of Simon and at lease one edge attached.

Alternative: OR relation

The resulting sub-graph contains all nodes that are of type Person together with all nodes with a name of Simon together with all nodes that have at least one edge attached.

Generic approach

The filter conditions are combined as (1 OR 2) AND 3. The resulting sub-graph contains all nodes that are of type Person with a name of Simon together with all nodes that have at least one edge attached.

CatoLeanTruetschel commented 3 years ago

/CC @julevdl @zuberman35 Possible user-story.