check if several events occurred in a predefined se-
quence. In terms of graph databases, the SEQUENCE
operator could be used to ensure that specific ac-
tion(s) are automatically performed as a reaction to
the event when several nodes are created in a spec-
ified order. For instance, if a student fails an exam
in the first course (E1), second course (E2) and third
course (E3), this would mean that he is most likely
not going to finish the semester (A). However, such
case could be easily modeled as an ECA(A) rule for a
SEQUENCE operator and implemented by using our
TBE approach.
Furthermore, the NEGATION event operator can
also be important in graph databases because it can
prevent certain anomalies. For instance, once a user
creates two nodes, but fails to create a relationship
between these nodes, the NEGATION operator could
be used to notify the user that the relationship has not
been created between the nodes.
Our future work includes extending the proposed
TBE approach to support trigger specification for re-
lationships and complex events, such as SEQUENCE
and NEGATION. Also, we will conduct a more de-
tailed query performance test to gain insight into how
much the TBE approach affects the query time execu-
tion with the increasing complexity of events (rules)
implemented.
7 CONCLUSIONS
In this paper, we discussed the need for building ac-
tive database systems able to automatically react to
certain events and perform different actions. Triggers
as active mechanisms still face a low level of support
in graph databases with limited features. Current re-
search approaches to build graph-based rule engines
require users with different levels of knowledge and
expertise to be familiar with query language syntax,
which may require a certain learning period from the
users. Hence, in this paper, we propose to use Trigger-
By-Example approach/language for rule specification
in graph databases. We developed a prototype imple-
mentation of the proposed approach as a layer built on
Neo4j GDBMS, which enables users to specify trig-
gers as active rules. At the moment, our implemen-
tation supports handling simple events, such as IN-
SERT, UPDATE and DELETE, so, as part of our fu-
ture work, we plan to extend this support on complex
events, such as SEQUENCE and other. The proposed
TBE approach can be used to perform certain actions
in graph databases automatically, such as node data
aggregation or integrity enforcement mechanism.
REFERENCES
Ceri, S. (1992). A declarative approach to active databases.
In [1992] Eighth International Conference on Data
Engineering, pages 452–456. IEEE.
Dayal, U., Hanson, E., and Widom, J. (1994). Active
database systems. Technical report, Stanford InfoLab.
De Marzi, M. (2015). Triggers in neo4j. Avail-
able at https://maxdemarzi.com/2015/03/25/triggers-
in-neo4j/.
DSG, U. (2017). Graphflow. Available at http:// graph-
flow.io/.
Gr
¨
uner, S., Weber, P., and Epple, U. (2014). Rule-based en-
gineering using declarative graph database queries. In
2014 12th IEEE International Conference on Indus-
trial Informatics (INDIN), pages 274–279. IEEE.
Herbst, H. (1996). Business rules in systems analysis: a
meta-model and repository system. Information Sys-
tems, 21(2):147–166.
JanusGraph (2017). Transaction log. Available at
https://docs.janusgraph.org/latest/log.html.
Kangsabanik, P., Mall, R., and Majumdar, A. K. (1997). A
technique for modeling applications in active object
oriented database management systems. Information
Sciences, 102(1-4):67–103.
Kankanamge, C., Sahu, S., Mhedbhi, A., Chen, J., and
Salihoglu, S. (2017). Graphflow: An active graph
database. In Proceedings of the 2017 ACM Inter-
national Conference on Management of Data, pages
1695–1698. ACM.
Lee, D., Mao, W., Chiu, H., and Chu, W. W. (2000a). Tbe:
A graphical interface for writing trigger rules in active
databases. In Advances in Visual Information Man-
agement, pages 367–386. Springer.
Lee, D., Mao, W., Chiu, H., and Chu, W. W. (2005). De-
signing triggers with trigger-by-example. Knowledge
and information systems, 7(1):110–134.
Lee, D., Mao, W., and Chu, W. W. (2000b). Tbe: Trigger-
by-example. In International Conference on Concep-
tual Modeling, pages 112–125. Springer.
Neo4j, I. (2018). opencypher. Available on May 15, 2019
at https://www.opencypher.org/about.
Nowak, M., Bak, J., and Jedrzejek, C. (2012). Graph-based
rule editor. In RuleML (2).
Rapsevicius, V. and Juska, E. (2014). Expert system
for the lhc cms cathode strip chambers (csc) detec-
tor. Nuclear Instruments and Methods in Physics Re-
search Section A: Accelerators, Spectrometers, Detec-
tors and Associated Equipment, 738:126–131.
Widom, J. and Ceri, S. (1996). Active database systems:
Triggers and rules for advanced database processing.
Morgan Kaufmann.
DATA 2019 - 8th International Conference on Data Science, Technology and Applications
144