Active rule execution in graph databases
Active database systems support applications by moving the reactive behavior from applications into database management systems. It is a database system that includes an event-driven architecture that can respond to different types of events automatically. Graph databases use graph structures such as nodes and edges to store data. Cypher is a declarative query language and it is used to store and retrieve data from the Neo4j database system. This project incorporated active rules into graph databases, focusing on business rules instead of integrity constraints. The project consists of two parts: a language framework and an execution model. There are two types of rules that are triggered by Temporal Events and Mutation Events, respectively. The language framework had been completed by another master student. This project focused on the execution part and refining the language model. The execution system consists of two interfaces, i.e. Active Rule Specification Interface and Query Interface. The Active Rule Specification Interface is used to specify rules and the Query Interface allows user to input cypher commands such as insert, update and delete. The flow of the execution model is as follows. Users can specify active rules through the rule Creation Interface. The rule parser parses the rules and stores the rules in the Active Rule Repository. The event handler checks whether an event can be raised or not upon cypher commands. The event handler will notify the rule engine once an event occurs. Rule engine retrieves rules which are triggered by the event from the active rule repository. The main contribution of this project is the architecture design as well as the design and implementation of the execution model to incorporate active rules into graph databases.