[Paper Review] Graph or Relational Databases: A Speed Comparison for Process Mining Algorithm
This paper compares the performance of relational (MySQL) and graph (Neo4j) databases for implementing two Organizational Mining algorithms—Similar-Task and Sub-Contract—used in process mining. It demonstrates that Neo4j outperforms MySQL in query execution for relationship-heavy tasks like sub-contract detection by up to 7x, while MySQL is faster for write operations and similarity computation, with Neo4j showing superior I/O efficiency and caching.
Process-Aware Information System (PAIS) are IT systems that manages, supports business processes and generate large event logs from execution of business processes. An event log is represented as a tuple of the form CaseID, TimeStamp, Activity and Actor. Process Mining is an emerging area of research that deals with the study and analysis of business processes based on event logs. Process Mining aims at analyzing event logs and discover business process models, enhance them or check for conformance with an a priori model. The large volume of event logs generated are stored in databases. Relational databases perform well for certain class of applications. However, there are certain class of applications for which relational databases are not able to scale. A number of NoSQL databases have emerged to encounter the challenges of scalability. Discovering social network from event logs is one of the most challenging and important Process Mining task. Similar-Task and Sub-Contract algorithms are some of the most widely used Organizational Mining techniques. Our objective is to investigate which of the databases (Relational or Graph) perform better for Organizational Mining under Process Mining. An intersection of Process Mining and Graph Databases can be accomplished by modelling these Organizational Mining metrics with graph databases. We implement Similar-Task and Sub-Contract algorithms on relational and NoSQL (graph-oriented) databases using only query language constructs. We conduct empirical analysis on a large real world data set to compare the performance of row-oriented database and NoSQL graph-oriented database. We benchmark performance factors like query execution time, CPU usage and disk/memory space usage for NoSQL graph-oriented database against row-oriented database.
Motivation & Objective
- To investigate the implementation of Similar-Task and Sub-Contract algorithms in a row-oriented relational database (MySQL) using only SQL constructs.
- To examine the adaptation of these algorithms in a graph-oriented database (Neo4j) using native CYPHER queries.
- To empirically benchmark and compare the performance of both databases across query execution time, CPU usage, disk I/O, and memory usage.
- To evaluate the scalability and efficiency of both systems under real-world data workloads typical in process mining.
- To determine the optimal database choice based on the nature of the Organizational Mining task—especially relationship traversal vs. computation-intensive operations.
Proposed method
- Implement the Similar-Task algorithm in MySQL using standard SQL queries and advanced stored procedures, treating it as a one-tier application.
- Implement the Similar-Task algorithm in Neo4j using native CYPHER query language, leveraging graph-native traversal capabilities.
- Implement the Sub-Contract algorithm in both MySQL and Neo4j using only SQL and CYPHER, respectively, to ensure fair comparison.
- Use Java API with memoization for both databases to evaluate performance under in-memory computation workloads.
- Conduct experiments on a large real-world event log dataset, measuring query execution time, CPU usage, disk I/O, memory usage, and page faults.
- Utilize system monitoring tools (e.g., Performance Monitor) to collect and compare low-level resource metrics across both database systems.
Experimental results
Research questions
- RQ1How does the performance of the Similar-Task algorithm compare between MySQL and Neo4j in terms of query execution time and resource usage?
- RQ2How does the Sub-Contract algorithm perform in Neo4j versus MySQL, particularly in traversing actor relationships?
- RQ3Which database system—MySQL or Neo4j—exhibits better I/O efficiency and caching behavior during large-scale data processing?
- RQ4What are the relative write performance characteristics of MySQL and Neo4j for event log data ingestion and storage?
- RQ5How do disk space requirements differ between MySQL tables and Neo4j graph elements for the same dataset and algorithms?
Key findings
- Neo4j is 1.25 times faster than MySQL in loading large datasets when only unique elements are created, indicating better performance for data ingestion with minimal duplication.
- MySQL outperforms Neo4j in write operations by 1.5 times, showing superior performance for data insertion and update workloads.
- Similarity calculation in the Similar-Task algorithm is 32 times faster in MySQL than in Neo4j, highlighting MySQL’s strength in computation-heavy tasks.
- Traversing relationships to detect sub-contracting actors is 7 times faster in Neo4j than in MySQL, demonstrating Neo4j’s advantage in relationship-intensive queries.
- Neo4j achieves 18x higher caching efficiency and incurs 6 times fewer disk I/O operations than MySQL, with 10 times less time spent on disk operations.
- Despite higher disk usage due to index-free adjacency and property storage, Neo4j uses 12 times less disk space than MySQL for unique graph elements, but over 30 times more for datasets with duplicated elements.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.