SlideShare ist ein Scribd-Unternehmen logo
1 von 35
Downloaden Sie, um offline zu lesen
Artifacts and Databases
Need for Event Relation Graphs and Synchronous Composition
Dirk Fahland, 2010-11-23
 abstract model of a database
• with events
• a normal form
• the Event Relation Graph
 What is a case?
• Some ideas
• a “case algebra”
 Synchronous artifact model
Overview
PAGE 1
 Database DB = { R1, R2, …, Rn}
• table is a relation Ri  D1  …  Dk
 events: defined by “time-stamp” columns in DB, so:
Ri  D1  …  Dk  Tk+1  …  Tl
 relations between different tables:
• key-foreign key relations defined in some DB schema
PAGE 2
Abstract model of a database
data in Ti time-stamps in Ri
 given table Ri  D1  …  Dk  Tk+1  …  Tl
 separate data Di from events Ti
 assume each Ri with events defines a key D1 = Ki
 Ri  Ki  D2  …  Dk  Tk+1  …  Tl
 data table event table
Ri  Ki  D2  …  Dk Ei  Ki  Type  Time
PAGE 3
Normal form
{k+1,…,l} distinguish events of the
different columns Tk+1  …  Tl
 DB in normal form {R1, R2, …, Rn , E1, E2, …, En}
Ri  Ki  D2  …  Dk, Ki – key of table Ri
Ei  Ki  Type  Time
key(e) := Ki iff e  Ei
 Event Relation Graph: G = (V, F)
 V = E1  … En, F  V  V
 F = { (e1,e2) | there is a key-foreign-key relation
from key(e1) to key(e2) or key(e1) = key(e2) }
PAGE 4
Event Relation Graph
PAGE 5
Example
Order
Customer : CustID
Amount : Euro
Created : DateTime
Paid : DateTime
Completed : DateTime
Orderline
Product : ProdID
NofItems : PosInt
TotalWeight : Weight
Entered : DateTime
BackOrdered : DateTime
Secured : DateTime
Delivery
DelAddress : Address
Contact : PhoneNo
Attempt
When : DateTime
Successful : Bool
1
1..*
0..* 1
0..1
1..*
OrderID : OrderID OrderID : OrderID
OrderLineID : OrderLineID
DelID : DelID
DelID : DelID
DelID : DelID
Order = [OrderID:OrderID, Customer:CustomerID, Amount:Euro]
EOrder = [OrderID:OrderID, Type:{Created,Paid,Completed}, Time:DateTime]
PAGE 6
Example
Order
Customer : CustID
Amount : Euro
Created : DateTime
Paid : DateTime
Completed : DateTime
Orderline
Product : ProdID
NofItems : PosInt
TotalWeight : Weight
Entered : DateTime
BackOrdered : DateTime
Secured : DateTime
Delivery
DelAddress : Address
Contact : PhoneNo
Attempt
When : DateTime
Successful : Bool
1
1..*
0..* 1
0..1
1..*
OrderID : OrderID OrderID : OrderID
OrderLineID : OrderLineID
DelID : DelID
DelID : DelID
DelID : DelID
OrderLine = [OrderLineID:OrderLineID, OrderID:OrderID,…]
EOrderLine = [OrderLineID:OrderLineID, Type:{Entered, …}, Time:DateTime]
PAGE 7
Example: events
Order
OrderID Amount Created Paid Completed
91245 100 € 28-11-10(8:12) 2-12-10(13:45) 5-12-10(11:33)
Customer
“John”
91561 530 € 28-11-10(12:22) 3-12-10(14:34) 5-12-10(9:32)
“Mike”
91812 234 € 29-11-10(9:45) 2-12-10(9:44) 4-12-10(13:33)
“Mary”
92233 110 € 29-11-10(10:12) null null
“Sue”
92345 195 € 29-11-10(14:45) 2-12-10(13:45) null
“Kirsten”
92355 320 € 29-11-10(16:32) null null
“Pete”
... ... ... ... ... ...
[91245, Created, 28-11-10(8:12)]
Eorder:
[91245, Created, 02-12-10(13:45)]
[91245, Created, 05-12-10(11:33)]
[92233, Created, 29-11-10(10:12)]
the other events
for 92233 do not exist
…
…
PAGE 8
Example: Event Relation Graph
Order
OrderID Amount Created Paid Completed
91245 100 € 28-11-10(8:12) 2-12-10(13:45) 5-12-10(11:33)
Customer
“John”
91561 530 € 28-11-10(12:22) 3-12-10(14:34) 5-12-10(9:32)
“Mike”
Orderline
Product NofItems TotalWeight Entered BackOrdered Secured
OrderID
OrderLineID DelID
91245
91245
112345
91561
112346
112448
“iPhone 3GS”
“iPhone 3GS”
“iPod nano”
1
2
1
0.250
0.300
0.250
28-11-10(8:13)
28-11-10(8:14)
28-11-10(12:23)
null 28-11-10(8:55) 882345
28-11-10(8:55) 30-11-10(9:06) 882346
null 28-11-10(12:59) 882345
245,Cr 245,P 245,Co 561,Cr 561,P 561,Co
345,E 345,Se 346,E 346,Bo 346,Se 448,E 448,Se
PAGE 9
Example: Event Relation Graph
Order
OrderID Amount Created Paid Completed
91245 100 € 28-11-10(8:12) 2-12-10(13:45) 5-12-10(11:33)
Customer
“John”
91561 530 € 28-11-10(12:22) 3-12-10(14:34) 5-12-10(9:32)
“Mike”
Orderline
Product NofItems TotalWeight Entered BackOrdered Secured
OrderID
OrderLineID DelID
91245
91245
112345
91561
112346
112448
“iPhone 3GS”
“iPhone 3GS”
“iPod nano”
1
2
1
0.250
0.300
0.250
28-11-10(8:13)
28-11-10(8:14)
28-11-10(12:23)
null 28-11-10(8:55) 882345
28-11-10(8:55) 30-11-10(9:06) 882346
null 28-11-10(12:59) 882345
245,Cr 245,P 245,Co 561,Cr 561,P 561,Co
345,E 345,Se 346,E 346,Bo 346,Se 448,E 448,Se
transitively
reduced
PAGE 10
Example: Event Relation Graph
245,Cr 245,P 245,Co 561,Cr 561,P 561,Co
345,E 345,Se 346,E 346,Bo 346,Se 448,E 448,Se
transitively
reduced
Attempt
When Successful
DelID
...
882345
882346
882345
882345
5-12-10(8:55)
6-12-10(9:12)
7-12-10(8:56)
5-12-10(8:43)
...
false
false
true
true
...
Orderline
OrderID
OrderLineID DelID
91245
91245
112345
91561
112346
112448
882345
882346
882345
882345,A,t1 882345,A,t2 882345,A,t3 882346,A,t1
 Abstract model of database
• with events
• a normal form
• the event relation graph
 What is a case?
• some ideas
• a “case algebra”
 Synchronous artifact model
Overview
PAGE 11
 describes which event relates by data to which
other events
 directed:
• event relations that can be retrieved by following the key-
foreign key relations forward
• directions indicate which events should be considered
together for a “case”
 suggests notion of a case: subgraph
• starting at a specific event (without predecessor?)
• containing all transitive predecessor
and/or successors (or only up to a certain point)
• “viewpoint” = set of all cases of a specific kind
PAGE 12
Properties of the Event Relation Graph
PAGE 13
Example: Cases
245,Cr 245,P 245,Co 561,Cr 561,P 561,Co
345,E 345,Se 346,E 346,Bo 346,Se 448,E 448,Se
882345,A,t1 882345,A,t2 882345,A,t3 882346,A,t1
PAGE 14
Example: Order Line, Case 1
245,Cr 245,P 245,Co 561,Cr 561,P 561,Co
345,E 345,Se 346,E 346,Bo 346,Se 448,E 448,Se
882345,A,t1 882345,A,t2 882345,A,t3 882346,A,t1
PAGE 15
Example: Order Line, Case 2
245,Cr 245,P 245,Co 561,Cr 561,P 561,Co
345,E 345,Se 346,E 346,Bo 346,Se 448,E 448,Se
882345,A,t1 882345,A,t2 882345,A,t3 882346,A,t1
PAGE 16
Example: Order Line, Case 3
245,Cr 245,P 245,Co 561,Cr 561,P 561,Co
345,E 345,Se 346,E 346,Bo 346,Se 448,E 448,Se
882345,A,t1 882345,A,t2 882345,A,t3 882346,A,t1
PAGE 17
Example: Complete Order, Case 1
245,Cr 245,P 245,Co 561,Cr 561,P 561,Co
345,E 345,Se 346,E 346,Bo 346,Se 448,E 448,Se
882345,A,t1 882345,A,t2 882345,A,t3 882346,A,t1
PAGE 18
Example: Complete Order, Case 2
245,Cr 245,P 245,Co 561,Cr 561,P 561,Co
345,E 345,Se 346,E 346,Bo 346,Se 448,E 448,Se
882345,A,t1 882345,A,t2 882345,A,t3 882346,A,t1
PAGE 19
Example: Complete Delivery, Case 1
245,Cr 245,P 245,Co 561,Cr 561,P 561,Co
345,E 345,Se 346,E 346,Bo 346,Se 448,E 448,Se
882345,A,t1 882345,A,t2 882345,A,t3 882346,A,t1
etc.
 a case is a subgraph of the event relation graph
 different notions of a case, cases can be combined,
e.g. complete order + complete delivery etc.
 define a case algebra:
• basic cases
• composition of cases (union)
• composition wrt. case properties (only completed cases)
• joins, etc.
 operations all should follow from relational algebra
of the underlying database
PAGE 20
Case Algebra for Artifact Models
PAGE 21
Example:
Complete Order 
 Complete Delivery, 1
245,Cr 245,P 245,Co 561,Cr 561,P 561,Co
345,E 345,Se 346,E 346,Bo 346,Se 448,E 448,Se
882345,A,t1 882345,A,t2 882345,A,t3 882346,A,t1
PAGE 22
Example:
Complete Order 
 Complete Delivery, 2
245,Cr 245,P 245,Co 561,Cr 561,P 561,Co
345,E 345,Se 346,E 346,Bo 346,Se 448,E 448,Se
882345,A,t1 882345,A,t2 882345,A,t3 882346,A,t1
PAGE 23
Example:
Complete Order 
 Complete Delivery, 3
245,Cr 245,P 245,Co 561,Cr 561,P 561,Co
345,E 345,Se 346,E 346,Bo 346,Se 448,E 448,Se
882345,A,t1 882345,A,t2 882345,A,t3 882346,A,t1
 Abstract model of database
• with events
• a normal form
• the event relation graph
 What is case?
• Some ideas
• a “case algebra”
 Synchronous artifact model
Overview
PAGE 24
 Proposition: Synchronous communication
describes more precisely how a set of artifacts
relates to a database.
PAGE 25
Aim: relate Database to Artifact model
Artifact
B C
Artifact C
Artifact B
Artifact A
Artifact
B A
PAGE 26
A first idea…
Table A
Table C
Table B
date1, date2
date3, date4
date5, date6
d1 d2 d1 d2
d3 d4
d5 d6 d5 d6
d3 d4
Event Relation Graph
Database schema
Artifact
B C
Artifact C
Artifact B
PAGE 27
A first idea…
Table A
Table C
Table B
date1, date2
date3, date4
date5, date6
d1 d2 d1 d2
d3 d4
d5 d6 d5 d6
d3 d4
“Artifact-Centric Traces”
Database schema
Artifact A
Artifact
B A
d1 d2
d3 d4 d3 d4
d5 d6 d5 d6
d3 d4 d3 d4
d1 d2
Artifact
B C
Artifact C
Artifact B
PAGE 28
A first idea…
d1 d2 d1 d2
d3 d4
d5 d6 d5 d6
d3 d4
“Artifact-Centric Traces”
Artifact A
Artifact
B A
d1 d2
d3 d4 d3 d4
d5 d6 d5 d6
d3 d4 d3 d4
d1 d2
describes occurrences of
events wrt. Table A
describes occurrences of
events the relation from B to A
describes occurrences of
events wrt. Table B
PAGE 29
Corresponding Petri net model
d1 d2 d1 d2 Artifact A
Artifact
B A
d1 d2
d3 d4 d3 d4
d1 d2
d1
d2
d1
d2
d3
d4
d3
d4
Artifact B
d3 d4 d3 d4
A B  A B
…
PAGE 30
Corresponding Artifact-Model
d1 d2 d1 d2 Artifact A
Artifact
B A
d1 d2
d3 d4 d3 d4
d1 d2
d1
d2
d1
d2
d3
d4
d3
d4
Artifact B
d3 d4 d3 d4
A B  A B
1,1
1,1
1,*
1,*
1,*
1,*
1,*
1,*
PAGE 31
Semantics of Synchronous Ports?
d1
d2
d1
d2
d3
d4
d3
d4
A B  A B
1,1
1,1
1,*
1,*
1,*
1,*
1,*
1,*
c,m c,m
X X
A B
multiplicity m: how often X occurs in
one instance of A
cardinality c: with how many
instances of B does an occurrence
of X in A synchronize?
PAGE 32
Semantics of Synchronous Ports?
d1
d2
d1
d2
A B
1,1
*,1
*,1
*,1
d1
d2
B1
d1
d2
A1
d1
d2
B2
d1
d2
A2
d1
d2
A3
N:M Proclet Model
Instances
PAGE 33
Semantics of Synchronous Ports?
d1
d2
B1
d1
d2
A1
d1
d2
B2
d1
d2
A2
d1
d2
A3
A2
d1
d2
A1
d1
d2
B1
d1
d2
A3
d1
d2
B2
d1
d2
the partially ordered runs of A1,…,B2
+ synchronization
PAGE 34
Semantics of Synchronous Ports?
d1
d2
B1
d1
d2
A1
d1
d2
B2
d1
d2
A2
d1
d2
A3
A2
d1
d2
A1
d1
d2
B1
d1
d2
A3
d1
d2
B2
d1
d2
the partially ordered runs of A1,…,B2
+ synchronization

Weitere ähnliche Inhalte

Mehr von Dirk Fahland

Describing, Discovering, and Understanding Multi-Dimensional Processes
Describing, Discovering, and Understanding Multi-Dimensional ProcessesDescribing, Discovering, and Understanding Multi-Dimensional Processes
Describing, Discovering, and Understanding Multi-Dimensional ProcessesDirk Fahland
 
Process Mining: Past, Present, and Open Challenges (AIST 2017 Keynote)
Process Mining: Past, Present, and Open Challenges (AIST 2017 Keynote)Process Mining: Past, Present, and Open Challenges (AIST 2017 Keynote)
Process Mining: Past, Present, and Open Challenges (AIST 2017 Keynote)Dirk Fahland
 
Where did I go wrong? Explaining errors in process models
Where did I go wrong? Explaining errors in process modelsWhere did I go wrong? Explaining errors in process models
Where did I go wrong? Explaining errors in process modelsDirk Fahland
 
Mining Branch-Time Scenarios From Execution Logs
Mining Branch-Time Scenarios From Execution LogsMining Branch-Time Scenarios From Execution Logs
Mining Branch-Time Scenarios From Execution LogsDirk Fahland
 
From Live Sequence Chart Specifications to Distributed Components
From Live Sequence Chart Specifications to Distributed ComponentsFrom Live Sequence Chart Specifications to Distributed Components
From Live Sequence Chart Specifications to Distributed ComponentsDirk Fahland
 
LSC Revisited - From Scenarios to Distributed Components
LSC Revisited - From Scenarios to Distributed ComponentsLSC Revisited - From Scenarios to Distributed Components
LSC Revisited - From Scenarios to Distributed ComponentsDirk Fahland
 
Repairing Process Models to Match Reality
Repairing Process Models to Match RealityRepairing Process Models to Match Reality
Repairing Process Models to Match RealityDirk Fahland
 
Process Mining for ERP Systems
Process Mining for ERP SystemsProcess Mining for ERP Systems
Process Mining for ERP SystemsDirk Fahland
 
Simplifying Mined Process Models
Simplifying Mined Process ModelsSimplifying Mined Process Models
Simplifying Mined Process ModelsDirk Fahland
 
The Process of Process Modeling
The Process of Process ModelingThe Process of Process Modeling
The Process of Process ModelingDirk Fahland
 
Behavioral Conformance of Artifact-Centric Process Models
Behavioral Conformance of Artifact-Centric Process ModelsBehavioral Conformance of Artifact-Centric Process Models
Behavioral Conformance of Artifact-Centric Process ModelsDirk Fahland
 
Many-to-Many: Interactions in Artifact-Centric Choreographies
Many-to-Many: Interactions in Artifact-Centric ChoreographiesMany-to-Many: Interactions in Artifact-Centric Choreographies
Many-to-Many: Interactions in Artifact-Centric ChoreographiesDirk Fahland
 
Artifacts - Processes with Multiple Instances
Artifacts - Processes with Multiple InstancesArtifacts - Processes with Multiple Instances
Artifacts - Processes with Multiple InstancesDirk Fahland
 

Mehr von Dirk Fahland (13)

Describing, Discovering, and Understanding Multi-Dimensional Processes
Describing, Discovering, and Understanding Multi-Dimensional ProcessesDescribing, Discovering, and Understanding Multi-Dimensional Processes
Describing, Discovering, and Understanding Multi-Dimensional Processes
 
Process Mining: Past, Present, and Open Challenges (AIST 2017 Keynote)
Process Mining: Past, Present, and Open Challenges (AIST 2017 Keynote)Process Mining: Past, Present, and Open Challenges (AIST 2017 Keynote)
Process Mining: Past, Present, and Open Challenges (AIST 2017 Keynote)
 
Where did I go wrong? Explaining errors in process models
Where did I go wrong? Explaining errors in process modelsWhere did I go wrong? Explaining errors in process models
Where did I go wrong? Explaining errors in process models
 
Mining Branch-Time Scenarios From Execution Logs
Mining Branch-Time Scenarios From Execution LogsMining Branch-Time Scenarios From Execution Logs
Mining Branch-Time Scenarios From Execution Logs
 
From Live Sequence Chart Specifications to Distributed Components
From Live Sequence Chart Specifications to Distributed ComponentsFrom Live Sequence Chart Specifications to Distributed Components
From Live Sequence Chart Specifications to Distributed Components
 
LSC Revisited - From Scenarios to Distributed Components
LSC Revisited - From Scenarios to Distributed ComponentsLSC Revisited - From Scenarios to Distributed Components
LSC Revisited - From Scenarios to Distributed Components
 
Repairing Process Models to Match Reality
Repairing Process Models to Match RealityRepairing Process Models to Match Reality
Repairing Process Models to Match Reality
 
Process Mining for ERP Systems
Process Mining for ERP SystemsProcess Mining for ERP Systems
Process Mining for ERP Systems
 
Simplifying Mined Process Models
Simplifying Mined Process ModelsSimplifying Mined Process Models
Simplifying Mined Process Models
 
The Process of Process Modeling
The Process of Process ModelingThe Process of Process Modeling
The Process of Process Modeling
 
Behavioral Conformance of Artifact-Centric Process Models
Behavioral Conformance of Artifact-Centric Process ModelsBehavioral Conformance of Artifact-Centric Process Models
Behavioral Conformance of Artifact-Centric Process Models
 
Many-to-Many: Interactions in Artifact-Centric Choreographies
Many-to-Many: Interactions in Artifact-Centric ChoreographiesMany-to-Many: Interactions in Artifact-Centric Choreographies
Many-to-Many: Interactions in Artifact-Centric Choreographies
 
Artifacts - Processes with Multiple Instances
Artifacts - Processes with Multiple InstancesArtifacts - Processes with Multiple Instances
Artifacts - Processes with Multiple Instances
 

Kürzlich hochgeladen

Virtuosoft SmartSync Product Introduction
Virtuosoft SmartSync Product IntroductionVirtuosoft SmartSync Product Introduction
Virtuosoft SmartSync Product Introductionsanjaymuralee1
 
Mapping the pubmed data under different suptopics using NLP.pptx
Mapping the pubmed data under different suptopics using NLP.pptxMapping the pubmed data under different suptopics using NLP.pptx
Mapping the pubmed data under different suptopics using NLP.pptxVenkatasubramani13
 
TINJUAN PEMROSESAN TRANSAKSI DAN ERP.pptx
TINJUAN PEMROSESAN TRANSAKSI DAN ERP.pptxTINJUAN PEMROSESAN TRANSAKSI DAN ERP.pptx
TINJUAN PEMROSESAN TRANSAKSI DAN ERP.pptxDwiAyuSitiHartinah
 
ChistaDATA Real-Time DATA Analytics Infrastructure
ChistaDATA Real-Time DATA Analytics InfrastructureChistaDATA Real-Time DATA Analytics Infrastructure
ChistaDATA Real-Time DATA Analytics Infrastructuresonikadigital1
 
Cash Is Still King: ATM market research '2023
Cash Is Still King: ATM market research '2023Cash Is Still King: ATM market research '2023
Cash Is Still King: ATM market research '2023Vladislav Solodkiy
 
Elements of language learning - an analysis of how different elements of lang...
Elements of language learning - an analysis of how different elements of lang...Elements of language learning - an analysis of how different elements of lang...
Elements of language learning - an analysis of how different elements of lang...PrithaVashisht1
 
Optimal Decision Making - Cost Reduction in Logistics
Optimal Decision Making - Cost Reduction in LogisticsOptimal Decision Making - Cost Reduction in Logistics
Optimal Decision Making - Cost Reduction in LogisticsThinkInnovation
 
Strategic CX: A Deep Dive into Voice of the Customer Insights for Clarity
Strategic CX: A Deep Dive into Voice of the Customer Insights for ClarityStrategic CX: A Deep Dive into Voice of the Customer Insights for Clarity
Strategic CX: A Deep Dive into Voice of the Customer Insights for ClarityAggregage
 
Persuasive E-commerce, Our Biased Brain @ Bikkeldag 2024
Persuasive E-commerce, Our Biased Brain @ Bikkeldag 2024Persuasive E-commerce, Our Biased Brain @ Bikkeldag 2024
Persuasive E-commerce, Our Biased Brain @ Bikkeldag 2024Guido X Jansen
 
Master's Thesis - Data Science - Presentation
Master's Thesis - Data Science - PresentationMaster's Thesis - Data Science - Presentation
Master's Thesis - Data Science - PresentationGiorgio Carbone
 
CI, CD -Tools to integrate without manual intervention
CI, CD -Tools to integrate without manual interventionCI, CD -Tools to integrate without manual intervention
CI, CD -Tools to integrate without manual interventionajayrajaganeshkayala
 
5 Ds to Define Data Archiving Best Practices
5 Ds to Define Data Archiving Best Practices5 Ds to Define Data Archiving Best Practices
5 Ds to Define Data Archiving Best PracticesDataArchiva
 
How is Real-Time Analytics Different from Traditional OLAP?
How is Real-Time Analytics Different from Traditional OLAP?How is Real-Time Analytics Different from Traditional OLAP?
How is Real-Time Analytics Different from Traditional OLAP?sonikadigital1
 
CCS336-Cloud-Services-Management-Lecture-Notes-1.pptx
CCS336-Cloud-Services-Management-Lecture-Notes-1.pptxCCS336-Cloud-Services-Management-Lecture-Notes-1.pptx
CCS336-Cloud-Services-Management-Lecture-Notes-1.pptxdhiyaneswaranv1
 
The Universal GTM - how we design GTM and dataLayer
The Universal GTM - how we design GTM and dataLayerThe Universal GTM - how we design GTM and dataLayer
The Universal GTM - how we design GTM and dataLayerPavel Šabatka
 
Rock Songs common codes and conventions.pptx
Rock Songs common codes and conventions.pptxRock Songs common codes and conventions.pptx
Rock Songs common codes and conventions.pptxFinatron037
 

Kürzlich hochgeladen (16)

Virtuosoft SmartSync Product Introduction
Virtuosoft SmartSync Product IntroductionVirtuosoft SmartSync Product Introduction
Virtuosoft SmartSync Product Introduction
 
Mapping the pubmed data under different suptopics using NLP.pptx
Mapping the pubmed data under different suptopics using NLP.pptxMapping the pubmed data under different suptopics using NLP.pptx
Mapping the pubmed data under different suptopics using NLP.pptx
 
TINJUAN PEMROSESAN TRANSAKSI DAN ERP.pptx
TINJUAN PEMROSESAN TRANSAKSI DAN ERP.pptxTINJUAN PEMROSESAN TRANSAKSI DAN ERP.pptx
TINJUAN PEMROSESAN TRANSAKSI DAN ERP.pptx
 
ChistaDATA Real-Time DATA Analytics Infrastructure
ChistaDATA Real-Time DATA Analytics InfrastructureChistaDATA Real-Time DATA Analytics Infrastructure
ChistaDATA Real-Time DATA Analytics Infrastructure
 
Cash Is Still King: ATM market research '2023
Cash Is Still King: ATM market research '2023Cash Is Still King: ATM market research '2023
Cash Is Still King: ATM market research '2023
 
Elements of language learning - an analysis of how different elements of lang...
Elements of language learning - an analysis of how different elements of lang...Elements of language learning - an analysis of how different elements of lang...
Elements of language learning - an analysis of how different elements of lang...
 
Optimal Decision Making - Cost Reduction in Logistics
Optimal Decision Making - Cost Reduction in LogisticsOptimal Decision Making - Cost Reduction in Logistics
Optimal Decision Making - Cost Reduction in Logistics
 
Strategic CX: A Deep Dive into Voice of the Customer Insights for Clarity
Strategic CX: A Deep Dive into Voice of the Customer Insights for ClarityStrategic CX: A Deep Dive into Voice of the Customer Insights for Clarity
Strategic CX: A Deep Dive into Voice of the Customer Insights for Clarity
 
Persuasive E-commerce, Our Biased Brain @ Bikkeldag 2024
Persuasive E-commerce, Our Biased Brain @ Bikkeldag 2024Persuasive E-commerce, Our Biased Brain @ Bikkeldag 2024
Persuasive E-commerce, Our Biased Brain @ Bikkeldag 2024
 
Master's Thesis - Data Science - Presentation
Master's Thesis - Data Science - PresentationMaster's Thesis - Data Science - Presentation
Master's Thesis - Data Science - Presentation
 
CI, CD -Tools to integrate without manual intervention
CI, CD -Tools to integrate without manual interventionCI, CD -Tools to integrate without manual intervention
CI, CD -Tools to integrate without manual intervention
 
5 Ds to Define Data Archiving Best Practices
5 Ds to Define Data Archiving Best Practices5 Ds to Define Data Archiving Best Practices
5 Ds to Define Data Archiving Best Practices
 
How is Real-Time Analytics Different from Traditional OLAP?
How is Real-Time Analytics Different from Traditional OLAP?How is Real-Time Analytics Different from Traditional OLAP?
How is Real-Time Analytics Different from Traditional OLAP?
 
CCS336-Cloud-Services-Management-Lecture-Notes-1.pptx
CCS336-Cloud-Services-Management-Lecture-Notes-1.pptxCCS336-Cloud-Services-Management-Lecture-Notes-1.pptx
CCS336-Cloud-Services-Management-Lecture-Notes-1.pptx
 
The Universal GTM - how we design GTM and dataLayer
The Universal GTM - how we design GTM and dataLayerThe Universal GTM - how we design GTM and dataLayer
The Universal GTM - how we design GTM and dataLayer
 
Rock Songs common codes and conventions.pptx
Rock Songs common codes and conventions.pptxRock Songs common codes and conventions.pptx
Rock Songs common codes and conventions.pptx
 

Artifacts and Databases - the Need for Event Relation Graphs and Synchronous Composition

  • 1. Artifacts and Databases Need for Event Relation Graphs and Synchronous Composition Dirk Fahland, 2010-11-23
  • 2.  abstract model of a database • with events • a normal form • the Event Relation Graph  What is a case? • Some ideas • a “case algebra”  Synchronous artifact model Overview PAGE 1
  • 3.  Database DB = { R1, R2, …, Rn} • table is a relation Ri  D1  …  Dk  events: defined by “time-stamp” columns in DB, so: Ri  D1  …  Dk  Tk+1  …  Tl  relations between different tables: • key-foreign key relations defined in some DB schema PAGE 2 Abstract model of a database data in Ti time-stamps in Ri
  • 4.  given table Ri  D1  …  Dk  Tk+1  …  Tl  separate data Di from events Ti  assume each Ri with events defines a key D1 = Ki  Ri  Ki  D2  …  Dk  Tk+1  …  Tl  data table event table Ri  Ki  D2  …  Dk Ei  Ki  Type  Time PAGE 3 Normal form {k+1,…,l} distinguish events of the different columns Tk+1  …  Tl
  • 5.  DB in normal form {R1, R2, …, Rn , E1, E2, …, En} Ri  Ki  D2  …  Dk, Ki – key of table Ri Ei  Ki  Type  Time key(e) := Ki iff e  Ei  Event Relation Graph: G = (V, F)  V = E1  … En, F  V  V  F = { (e1,e2) | there is a key-foreign-key relation from key(e1) to key(e2) or key(e1) = key(e2) } PAGE 4 Event Relation Graph
  • 6. PAGE 5 Example Order Customer : CustID Amount : Euro Created : DateTime Paid : DateTime Completed : DateTime Orderline Product : ProdID NofItems : PosInt TotalWeight : Weight Entered : DateTime BackOrdered : DateTime Secured : DateTime Delivery DelAddress : Address Contact : PhoneNo Attempt When : DateTime Successful : Bool 1 1..* 0..* 1 0..1 1..* OrderID : OrderID OrderID : OrderID OrderLineID : OrderLineID DelID : DelID DelID : DelID DelID : DelID Order = [OrderID:OrderID, Customer:CustomerID, Amount:Euro] EOrder = [OrderID:OrderID, Type:{Created,Paid,Completed}, Time:DateTime]
  • 7. PAGE 6 Example Order Customer : CustID Amount : Euro Created : DateTime Paid : DateTime Completed : DateTime Orderline Product : ProdID NofItems : PosInt TotalWeight : Weight Entered : DateTime BackOrdered : DateTime Secured : DateTime Delivery DelAddress : Address Contact : PhoneNo Attempt When : DateTime Successful : Bool 1 1..* 0..* 1 0..1 1..* OrderID : OrderID OrderID : OrderID OrderLineID : OrderLineID DelID : DelID DelID : DelID DelID : DelID OrderLine = [OrderLineID:OrderLineID, OrderID:OrderID,…] EOrderLine = [OrderLineID:OrderLineID, Type:{Entered, …}, Time:DateTime]
  • 8. PAGE 7 Example: events Order OrderID Amount Created Paid Completed 91245 100 € 28-11-10(8:12) 2-12-10(13:45) 5-12-10(11:33) Customer “John” 91561 530 € 28-11-10(12:22) 3-12-10(14:34) 5-12-10(9:32) “Mike” 91812 234 € 29-11-10(9:45) 2-12-10(9:44) 4-12-10(13:33) “Mary” 92233 110 € 29-11-10(10:12) null null “Sue” 92345 195 € 29-11-10(14:45) 2-12-10(13:45) null “Kirsten” 92355 320 € 29-11-10(16:32) null null “Pete” ... ... ... ... ... ... [91245, Created, 28-11-10(8:12)] Eorder: [91245, Created, 02-12-10(13:45)] [91245, Created, 05-12-10(11:33)] [92233, Created, 29-11-10(10:12)] the other events for 92233 do not exist … …
  • 9. PAGE 8 Example: Event Relation Graph Order OrderID Amount Created Paid Completed 91245 100 € 28-11-10(8:12) 2-12-10(13:45) 5-12-10(11:33) Customer “John” 91561 530 € 28-11-10(12:22) 3-12-10(14:34) 5-12-10(9:32) “Mike” Orderline Product NofItems TotalWeight Entered BackOrdered Secured OrderID OrderLineID DelID 91245 91245 112345 91561 112346 112448 “iPhone 3GS” “iPhone 3GS” “iPod nano” 1 2 1 0.250 0.300 0.250 28-11-10(8:13) 28-11-10(8:14) 28-11-10(12:23) null 28-11-10(8:55) 882345 28-11-10(8:55) 30-11-10(9:06) 882346 null 28-11-10(12:59) 882345 245,Cr 245,P 245,Co 561,Cr 561,P 561,Co 345,E 345,Se 346,E 346,Bo 346,Se 448,E 448,Se
  • 10. PAGE 9 Example: Event Relation Graph Order OrderID Amount Created Paid Completed 91245 100 € 28-11-10(8:12) 2-12-10(13:45) 5-12-10(11:33) Customer “John” 91561 530 € 28-11-10(12:22) 3-12-10(14:34) 5-12-10(9:32) “Mike” Orderline Product NofItems TotalWeight Entered BackOrdered Secured OrderID OrderLineID DelID 91245 91245 112345 91561 112346 112448 “iPhone 3GS” “iPhone 3GS” “iPod nano” 1 2 1 0.250 0.300 0.250 28-11-10(8:13) 28-11-10(8:14) 28-11-10(12:23) null 28-11-10(8:55) 882345 28-11-10(8:55) 30-11-10(9:06) 882346 null 28-11-10(12:59) 882345 245,Cr 245,P 245,Co 561,Cr 561,P 561,Co 345,E 345,Se 346,E 346,Bo 346,Se 448,E 448,Se transitively reduced
  • 11. PAGE 10 Example: Event Relation Graph 245,Cr 245,P 245,Co 561,Cr 561,P 561,Co 345,E 345,Se 346,E 346,Bo 346,Se 448,E 448,Se transitively reduced Attempt When Successful DelID ... 882345 882346 882345 882345 5-12-10(8:55) 6-12-10(9:12) 7-12-10(8:56) 5-12-10(8:43) ... false false true true ... Orderline OrderID OrderLineID DelID 91245 91245 112345 91561 112346 112448 882345 882346 882345 882345,A,t1 882345,A,t2 882345,A,t3 882346,A,t1
  • 12.  Abstract model of database • with events • a normal form • the event relation graph  What is a case? • some ideas • a “case algebra”  Synchronous artifact model Overview PAGE 11
  • 13.  describes which event relates by data to which other events  directed: • event relations that can be retrieved by following the key- foreign key relations forward • directions indicate which events should be considered together for a “case”  suggests notion of a case: subgraph • starting at a specific event (without predecessor?) • containing all transitive predecessor and/or successors (or only up to a certain point) • “viewpoint” = set of all cases of a specific kind PAGE 12 Properties of the Event Relation Graph
  • 14. PAGE 13 Example: Cases 245,Cr 245,P 245,Co 561,Cr 561,P 561,Co 345,E 345,Se 346,E 346,Bo 346,Se 448,E 448,Se 882345,A,t1 882345,A,t2 882345,A,t3 882346,A,t1
  • 15. PAGE 14 Example: Order Line, Case 1 245,Cr 245,P 245,Co 561,Cr 561,P 561,Co 345,E 345,Se 346,E 346,Bo 346,Se 448,E 448,Se 882345,A,t1 882345,A,t2 882345,A,t3 882346,A,t1
  • 16. PAGE 15 Example: Order Line, Case 2 245,Cr 245,P 245,Co 561,Cr 561,P 561,Co 345,E 345,Se 346,E 346,Bo 346,Se 448,E 448,Se 882345,A,t1 882345,A,t2 882345,A,t3 882346,A,t1
  • 17. PAGE 16 Example: Order Line, Case 3 245,Cr 245,P 245,Co 561,Cr 561,P 561,Co 345,E 345,Se 346,E 346,Bo 346,Se 448,E 448,Se 882345,A,t1 882345,A,t2 882345,A,t3 882346,A,t1
  • 18. PAGE 17 Example: Complete Order, Case 1 245,Cr 245,P 245,Co 561,Cr 561,P 561,Co 345,E 345,Se 346,E 346,Bo 346,Se 448,E 448,Se 882345,A,t1 882345,A,t2 882345,A,t3 882346,A,t1
  • 19. PAGE 18 Example: Complete Order, Case 2 245,Cr 245,P 245,Co 561,Cr 561,P 561,Co 345,E 345,Se 346,E 346,Bo 346,Se 448,E 448,Se 882345,A,t1 882345,A,t2 882345,A,t3 882346,A,t1
  • 20. PAGE 19 Example: Complete Delivery, Case 1 245,Cr 245,P 245,Co 561,Cr 561,P 561,Co 345,E 345,Se 346,E 346,Bo 346,Se 448,E 448,Se 882345,A,t1 882345,A,t2 882345,A,t3 882346,A,t1 etc.
  • 21.  a case is a subgraph of the event relation graph  different notions of a case, cases can be combined, e.g. complete order + complete delivery etc.  define a case algebra: • basic cases • composition of cases (union) • composition wrt. case properties (only completed cases) • joins, etc.  operations all should follow from relational algebra of the underlying database PAGE 20 Case Algebra for Artifact Models
  • 22. PAGE 21 Example: Complete Order   Complete Delivery, 1 245,Cr 245,P 245,Co 561,Cr 561,P 561,Co 345,E 345,Se 346,E 346,Bo 346,Se 448,E 448,Se 882345,A,t1 882345,A,t2 882345,A,t3 882346,A,t1
  • 23. PAGE 22 Example: Complete Order   Complete Delivery, 2 245,Cr 245,P 245,Co 561,Cr 561,P 561,Co 345,E 345,Se 346,E 346,Bo 346,Se 448,E 448,Se 882345,A,t1 882345,A,t2 882345,A,t3 882346,A,t1
  • 24. PAGE 23 Example: Complete Order   Complete Delivery, 3 245,Cr 245,P 245,Co 561,Cr 561,P 561,Co 345,E 345,Se 346,E 346,Bo 346,Se 448,E 448,Se 882345,A,t1 882345,A,t2 882345,A,t3 882346,A,t1
  • 25.  Abstract model of database • with events • a normal form • the event relation graph  What is case? • Some ideas • a “case algebra”  Synchronous artifact model Overview PAGE 24
  • 26.  Proposition: Synchronous communication describes more precisely how a set of artifacts relates to a database. PAGE 25 Aim: relate Database to Artifact model
  • 27. Artifact B C Artifact C Artifact B Artifact A Artifact B A PAGE 26 A first idea… Table A Table C Table B date1, date2 date3, date4 date5, date6 d1 d2 d1 d2 d3 d4 d5 d6 d5 d6 d3 d4 Event Relation Graph Database schema
  • 28. Artifact B C Artifact C Artifact B PAGE 27 A first idea… Table A Table C Table B date1, date2 date3, date4 date5, date6 d1 d2 d1 d2 d3 d4 d5 d6 d5 d6 d3 d4 “Artifact-Centric Traces” Database schema Artifact A Artifact B A d1 d2 d3 d4 d3 d4 d5 d6 d5 d6 d3 d4 d3 d4 d1 d2
  • 29. Artifact B C Artifact C Artifact B PAGE 28 A first idea… d1 d2 d1 d2 d3 d4 d5 d6 d5 d6 d3 d4 “Artifact-Centric Traces” Artifact A Artifact B A d1 d2 d3 d4 d3 d4 d5 d6 d5 d6 d3 d4 d3 d4 d1 d2 describes occurrences of events wrt. Table A describes occurrences of events the relation from B to A describes occurrences of events wrt. Table B
  • 30. PAGE 29 Corresponding Petri net model d1 d2 d1 d2 Artifact A Artifact B A d1 d2 d3 d4 d3 d4 d1 d2 d1 d2 d1 d2 d3 d4 d3 d4 Artifact B d3 d4 d3 d4 A B  A B …
  • 31. PAGE 30 Corresponding Artifact-Model d1 d2 d1 d2 Artifact A Artifact B A d1 d2 d3 d4 d3 d4 d1 d2 d1 d2 d1 d2 d3 d4 d3 d4 Artifact B d3 d4 d3 d4 A B  A B 1,1 1,1 1,* 1,* 1,* 1,* 1,* 1,*
  • 32. PAGE 31 Semantics of Synchronous Ports? d1 d2 d1 d2 d3 d4 d3 d4 A B  A B 1,1 1,1 1,* 1,* 1,* 1,* 1,* 1,* c,m c,m X X A B multiplicity m: how often X occurs in one instance of A cardinality c: with how many instances of B does an occurrence of X in A synchronize?
  • 33. PAGE 32 Semantics of Synchronous Ports? d1 d2 d1 d2 A B 1,1 *,1 *,1 *,1 d1 d2 B1 d1 d2 A1 d1 d2 B2 d1 d2 A2 d1 d2 A3 N:M Proclet Model Instances
  • 34. PAGE 33 Semantics of Synchronous Ports? d1 d2 B1 d1 d2 A1 d1 d2 B2 d1 d2 A2 d1 d2 A3 A2 d1 d2 A1 d1 d2 B1 d1 d2 A3 d1 d2 B2 d1 d2 the partially ordered runs of A1,…,B2 + synchronization
  • 35. PAGE 34 Semantics of Synchronous Ports? d1 d2 B1 d1 d2 A1 d1 d2 B2 d1 d2 A2 d1 d2 A3 A2 d1 d2 A1 d1 d2 B1 d1 d2 A3 d1 d2 B2 d1 d2 the partially ordered runs of A1,…,B2 + synchronization