Skip to content

NourEldin-Ali/GraphProcessDiscovery

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 

Repository files navigation

Enabling Multi-Process Discovery on Graph Databases

Table of Content

  • Experiments
    • Memory: contains the results of the experiment applied on RDB and GDB
    • Time: contains the results of the experiment applied on PM4PY,RDB and GDB, also a script python of use PM4PY with XES
  • Queries
    • GDB (Graph databases): contains all the queries (traditional and on the fly) run on the graph databases(BPI datasets)
    • RDB (Relational databases: query to extract Directly Follows Relation from relational databases(BPI datasets)

Installation

We used Neo4j 4.3.1 as a DBMS for Graph Databases.

For the experiments, we used python. After install python, you need to download PM4PY library.

pip install pm4py

Also, We used Microsoft SQL Server 2019 as a DBMS for Relational Databases.

To download the datasets click here, or contact me at [email protected].

After install the DBMS and download the datasets, for Neo4j, to restore the dataset,first open cypher-shell and run:

neo4j-admin load --from=$PWD/<dataset_name>.dump --database=neo4j --force

Then, you can run any query.

For Microsot SQL Server, to restore the database, run:

RESTORE DATABASE BPIDATASETS FROM DISK = '$PWD/databases.bak' WITH NORECOVERY

Then, you can run the query to extract directly follows relation.

Development

After install Neo4j and restore the database, you can run different queries to extract directly follows graph from graph database. You just need to change the Object_FollowedBy relation and the type of object in same cases.

For on the fly query , you change the label the relation named "relation" from "AppFollowedBy" to target relation:

...
MATCH (e1:Event)-[relation:AppFollowedBy]->(e2:Event)
WITH e1.activity AS cFrom, e2.activity AS cTo, count(*) AS count, events
...

For on the fly - intersection, you just need to change the type of objects:

...
MATCH (obj1:Object{Type:"Offer"})-[]->(obj2:Object{Type:"Application"})
...

For the traditional query, you need to change the relations "FollowedBy" and the type of objects. Like here, "OfferFollowedBy" and "ApplicationFollowedBy" relations, "Offer" and "Application" properties :

...
MATCH (e1S:Event)-[:AffectObject]->(:Object{Type:"Offer",ObjectID:baseObjects[0].ObjectID}),
(e1E:Event)-[:AffectObject]->(:Object{Type:"Offer",ObjectID:baseObjects[0].ObjectID}),
(e2S:Event)-[:AffectObject]->(:Object{Type:"Application",ObjectID:baseObjects[1].ObjectID}),
(e2E:Event)-[:AffectObject]->(:Object{Type:"Application",ObjectID:baseObjects[1].ObjectID})
WHERE NOT EXISTS((:Event)-[:OfferFollowedBy{ObjectID:baseObjects[0].ObjectID}]->(e1S)) 
AND NOT EXISTS((e1E)-[:OfferFollowedBy{ObjectID:baseObjects[0].ObjectID}]->(:Event)) 
AND NOT EXISTS((:Event)-[:ApplicationFollowedBy{ObjectID:baseObjects[1].ObjectID}]->(e2S)) 
AND NOT EXISTS((e2E)-[:ApplicationFollowedBy{ObjectID:baseObjects[1].ObjectID}]->(:Event)) 
...

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published