Chap. 7. Cases where extended transactions are recommended: • • • • • • • • • • • ERP systems E-commerce Mobile-commerce Patient records/Elektronisk patientjournal Airline reservation systems CSCW systemer Distributed calender systems Mobile applications Supply chain management Library systems Banking systems Enterprise Resource Planning(ERP) A distributed modular ERP system have relaxed ACID properties across the autonomous databases of the ERP modules. The sales module Customers Exercise: How would you implement relaxed ACID properties between the modules? Orders Orderlines Stocks per product per location Products The account module offer services with relaxed ACID properties. (That is read-only, compensatable, and retriable subtransactions). Account items Accounts A distributed modular ERP system have relaxed ACID properties across the autonomous databases of the ERP modules. The sales module Customers Departments Exercise: How would you replicate the department table? The account module offer services with relaxed ACID properties. (That is at least read, compensatable, and retriable services). Orders Account items Orderlines Accounts Products Stocks per product per location Departments A data model for an integrated Ecommerce/ERP system: Exercise. Suppose a distributed modular ERP system has Sale, Accounting, Procurement, and CRM modules. What tables/table fragments should these modules own? Product Product# ProductName Price Order-Detail Product# Order# Qty Price Timestamp Order-DetailHistory Inv-Item# Order# Seq# State Timestamp InvoyceHistory Invoice# Timestamp State Notes Product-Stock Product# Location# Qty Order Order# OrderDate Balance State Shipping Shipping# ShipMethod ShipCharge State ShipDate Address Address# Name Add1 Add2 City State Zip Shipping Invoice Invoice# CreationDate Location Location# Address Customer Customer# Kredit-Limit Balance UserSession Session# IPaddress #Click Timestamp UserAccount Salesman# PassWord Timestamp #visits #trans Ttl-tr-amount Payment Payment# Ammount State Timestamp Billing CreditCard Card# HolderName ExpireDate Exercise: How would you implement relaxed ACID properties in the E-Government module? An E-Governance module Citizens Case officers The account module offer services with relaxed ACID properties. Cases Deparments Case items Accounts Account items Item types Concept definitions used in logistic exercise: Pallet = wooden skeleton where packages may be stored in such a way that they all can be moved by a truck. Collie = alle the packages that are stored on a pallet(palle). Leg = Route or subroute where the transportation does not have stops ER-diagram of a logistics management system Transport Orders Orderlines from Packages, Collies and Containers Package- Damage relationship Collie hierarchy Customers to Locations from to Physical containers Container-routes relationships of order 3 Route-leg hierarchy Routes and legs Transport operator Scheduled routes and legs Transport medias like ships, airplanes, and trucks. How should the transport orders and sub-orders to sub-contractors be replicated in order to optimize the transports? Global ER-diagram of integrated logistics management Transport Orders Orderlines from Packages, Collies and Containers Package- Damage relationship Collie hierarchy Customers to Locations from to Physical containers Container-routes relationships of order 3 Route-leg hierarchy Routes and legs Transport operator Scheduled routes and legs Transport medias like ships, airplanes, and trucks. Describe the local databases in the central location of the transport company, the locations of the sub-contractors, and the mobile locations of the Transport medias. Design a workflow with focus on the integration of the local database locations. Start Petri net: Work flow of a global E-commerce transactions where the stocks are in the locations of the different suppliers. Canseled order 1. Put products in the basket Stock rejected order Non confirmed order 2. Confirm order-lines and update stocks in servers Sub orders 3.Suppliers send products Confirmed order Timer OR split 5. Send the received products to the customer End Products 4. Receive products from suppliers and update QUANTITY received All products are received 6. Send the rest of the products to the customer SubPetri net of activity 2 Non confirmed order AND split Order -line 2.1 try to confirm the next order-line Order -line 2.2 Supplier's server try to confirm order-line More order-lines Order 2.3 Update Order with supplier answer for each order-line OR split AND join All answers received Order Stock rejected order May the suppliers be transport sub-contractors? 2.4 Send Order with confirm answers to the Customer. If the Order was confirmed The Timer is set and confirming Sub-orders are send to the involved suppliers. Confirmed Order Timer Sub-orders Answer Global ER-diagram of integrated logistics management Transport Orders Orderlines from Packages, Collies and Containers Package- Damage relationship Collie hierarchy Customers to Locations from to Physical containers Container-routes relationships of order 3 Route-leg hierarchy Routes and legs Transport operator Scheduled routes and legs Transport medias like ships, airplanes, and trucks. How would you recommend to integrate and later merge the shipping companies Maersk and P&O Nedlloyd if Maersk had used the logistics architecture above? Exercise. Suppose a production firm has central planning and de-central production. How would you recommend to design the planning and production modules of a distributed modular ERP system that support the organization of the compamy? Ressource types Logical processes Input Output Logical products Physical ressources Physical processes Input Physical products Output Time Exercise: How would you implement/replicate the tables Network Branches? Design a modile distributed calender system! ER-diagram of an integrated calender and meating system: RoomLocation Relationship Dates Roles Rooms Locations Meatings/ appointments Time Participants Persons Exercise: How would you implement relaxed ACID properties in the Supplier module? Suppliers Supplier orders Orderllines Accepted product deliveries Delivery locations Productstocks Products Exercise: Describe and design the local databases for a distributed brewery with many different production, sale and depot locations. Can a distributed modular ERP system bee used to integrate the different locations? Customers Orders Locations Orderlines Productstocks Products Electronic Health Records (EHR) Patients - Patient - ID - Name - Address - Balance Health records EHR records should be craeted by Hospital service modules that are exchangable as the modules in a distributed modular ERP system. That is, Hospital service modules should offer and only use reading, compensatable, and retriable SOA services from other modules. ……. Hospital admissions Diagnoses Prescriptions Surgeries Hospital discharges Electronic Health Records (EHR) Patients - Patient - ID - Name - Address - Balance Health records Suppose all Health records are owned by the ”CRM module”. How would you recommend to integrate a new module that make test results that later are used for making diagnoses? How would you recommend to integrate the diagnose module? How would you recommend to integrate the Surgery planning module and the Surgery module itself? ……. Hospital admissions Diagnoses Prescriptions Surgeries Hospital discharges Patients Health records Patient ID Name Address Patient admits ER-diagram for an EHR system Health record subtypes ... Sympthoms /test results Diagnoses/ diseases Treatments Prescriptions Patient discharges Prescription lines Basic Health records are above the dottet line Conseptual hospital entites in general are below the dottet line Employees Patient admit types Sympthom ... types Medical Disease types Treatment types Medicin types Patient discharge types Patients Health records Patient ID Name Address Patient admits ER-diagram for an EHR system Health record subtypes ... Sympthoms /test results Diagnoses/ diseases Prescriptions Treatments Patient discharges Prescription lines Entities with different versions of 0-safe designs Entities with different versions of 1-safe designs Employees Patient admit types Sympthom ... types Medical Disease types Treatment types Medicin types Patient discharge types The 0-safe design with local commit: Client Nearest location Remote location Trans. record drecord The 0-safe design with local commit is recommended when it is possible to implement sufficient local countermeasures against the isolation anomalies. Example. Patients_____ Patient ID Name Address Sympthoms Symptom types The 0-safe design with deferred commit: Nearest location Primary location Client Compensate? Trans. record drecord Compensate? The 0-safe design with deferred commit is recommended when update delays should be minimized, and when it is not possible to implement sufficient local countermeasures against the isolation anomalies. Example. Patients_____ Patient ID Name Address Diagnoses/ diseases Disease types Health Records Database Patients Entities with different versions of 0-safe design - Patient - ID - Name - Address - Balance Health records ……. Hospital admissions Diagnoses Prescriptions Deffered commit Surgeries Hospital discharges Local commit Patients_____ Patient ID Name Address Entities with different Entities of versions of physical objects 0-safe design Patient admits ... Patient records Doctors Patient record subtypes Sympthoms Diagnoses/ diseases Ordinations Treatments Patient discharges Ordination lines Patient admit types Entities of Entities conceptual with the basic objects 1-safe design ... Sympthom types Disease types Treatment types Medicin types Medicin products Medical tests Patient discharges types Medicin companies Overview of the most important EHR integr. architectures Evaluation criteria Architectures for integrating electronic health records Local autonomy Read performance Software costs Anomaly problems 1. Integration by using SOA health services Best Worst Worst Worst 2. Central database solution Worst Best Best Best 3. Central database solution mixed with SAO integration Average Above worst Average Above worst 4. Distributed subscriber solution Best Best Worst Average 5. Central subscriber offering SOA services to others Best Average Worst Average 6. Central database solution with central subscription and SOA services to others Average Average Average Average Best Average Average 7. Central database solution mixed Average with distributed subscription on top of central subscription Architectures for integrating electronic health records Evaluation criteria Local auto- Read perfor- Software nomy mance costs Anomaly problems 1. Integration by using SOA health services Best Worst Worst Worst 2. Central database solution Worst Best Best Best 3. Central database solution mixed with SAO integration Average Above worst Average Above worst Any other hospital Data Read Data Data Read Hospital of residence Hospital of admission Architectures for integrating electronic health records Local auto- Read perfor- Software nomy mance costs Anomaly problems 1. Integration by using SOA health services Best Worst Worst Worst 2. Central database solution Worst Best Best Best 3. Central database solution mixed with SAO integration Average worst Any otherAbove hospital Average Above worst Hospital of residence Update Update Hospital of admission Read Data Central database with all functions Architectures for integrating electronic health records Local auto- Read perfor- Software nomy mance costs Anomaly problems 1. Integration by using SOA health services Best Worst Worst Worst 2. Central database solution Worst Best Best Best Average Above worst 3. Central database Average Above worst Any other hospital solution mixed with Data SAO integration Read Data Hospital of residence Read Update Update Data Hospital of admission Read Data Central database with only new develloped functions Architectures for integrating electronic health records Local autonomy Read perfor- Softwar mance e costs Anomaly problems 4. Distributed subscriber solution Best Best Worst Average 5. Central subscriber offering SOA services to others Best Average Worst Average 6. Central solution with central sub-scription and SOA services to others Average Average Average Average Any other hospital Data Update Data Hospital of residence Data Update Hospital of admission Architectures for integrating electronic health records Local autonomy Read perfor- Softwar mance e costs Anomaly problems 4. Distributed subscriber solution Best Best Worst Average 5. Central subscriber offering SOA services to others Best Average Worst Average 6. Central solution with central sub-scription and SOA services to others Average Average Average Average Any other hospital Data Data Data Hospital of residence Hospital of admission Update Update Read Data Central read distribution of redundant data Architectures for integrating electronic health records Local autonomy Read perfor- Softwar mance e costs Anomaly problems 4. Distributed subscriber solution Best Best Worst Average 5. Central subscriber offering SOA services to others Best Average Worst Average Average Average 6. Central solution with central Average Average sub-scription and SOA services to others Any other hospital Data Data Hospital of residence Read Read Update Update Data Hospital of admission Read Data Central database with new develloped functions Architectures for integrating electronic health records Local autonomy Read perfor- Softwar mance e costs Anomaly problems 5. Central subscriber offering SOA services to others Best Average Worst Average 6. Central database solution with central subscription and SOA services to others Average Average Average Average 7. Central solution mixed with distributed subscription on top of central subscription Average Best Average Average Any other hospital Data Data Hospital of residence Data Update Update Hospital of admission Update Update Data Central update distribution of both redundant and central data Overview of the most important EHR integr. architectures Evaluation criteria Architectures for integrating electronic health records Local autonomy Read performance Software costs Anomaly problems 1. Integration by using SOA health services Best Worst Worst Worst 2. Central database solution Worst Best Best Best 3. Central database solution mixed with SOA integration Average Above worst Average Above worst 4. Distributed subscriber solution Best Best Worst Average 5. Central subscriber offering SOA services to others Best Average Worst Average 6. Central database solution with central subscription and SOA services to others Average Average Average Average Best Average Average 7. Central database solution mixed Average with distributed subscription on top of central subscription Countermeasures against missing isolation property Patients - Patient - ID Name Address Balance Version file countermeasure Commutative update countermeasure Health records ……. Hospital admitments Diagnoses Prescriptions Surgeries Hospital discharges Pessimistic view countermeasure for related resources Version file countermeasure Properties of different EHR database design methods Evaluation criteria Database designs for EHR systems. Traditional normalized database design XML based storing of variable health attributes Generalized subtypes are used for storing variable health attributes Flexibility towards new health record types Worst Best Best Performance of overview queries Worst Best Best Performance of queries that need variable health attributes Best Average Worst Storage consumption Best Average Worst Development costs for table driven applications Worst Best Best Flexibility towards data analyses Average Worst Best Contries EHR Datawarehouse: Regions Hospitals Departments EHR event types Patients Time dimension The most important attributes of Electronic Health Record events One-to-one relationship One-to-one relationship Attributes special for ERP event type 1 ......... Dimensions for event type 1 ......... Attributes special for ERP event type n Dimensions for event type n Properties of different EHR database design methods Evaluation criteria Database designs for EHR systems. Traditional normalized database design XML based storing of variable health attributes Generalized subtypes are used for storing variable health attributes Flexibility towards new health record types Worst Best Best Performance of overview queries Worst Best Best Performance of queries that need variable health attributes Best Average Worst Storage consumption Best Average Worst Development costs for table driven applications Worst Best Best Flexibility towards data analyses Average Worst Best Chap. 7. EHR integration with ERP: Existing EHR System Planning Module of ERP EHR event type Work flow processes EHR Fact table Common EHR event subtype Symptoms/Tests Accounts Surgery Symp/Test Item Account item Surgery item New Test Module Accounting Module of ERP New Suregry Module Integration of new modules into an existing EHR system Design a Distributed Airline Database Design local databases and the workflow of an integrated distributed database that integrate the e-commerce sale of different airline companies in a way that optimize performance, availability and consistency of a common distributed airline system with local databases in the airline companies, airports, and “sale offices” at e.g. travel agents, hotels and e-commerce servers. (Do not use a GDS in this exercise). Airline companies Flight routes Airports Subroutes Plains Departures Plain types Tickets Customers Travel arrangement Exercise: Design local databases and the workflow of an integrated distributed database that integrate the e-commerce sale of different airline companies, hotel chains in a way that optimize performance, availability and consistency of a common distributed system with local databases in the airline companies, hotel chains, airports, car rental companies, and “sale offices” at e.g. travel agents, hotels and ecommerce servers. (Do not use a GDS in this exercise). Describe the workflow of the integrated e-commerce system. Hotel chains Hotels Rooms Room reservations Services/ tours/ car rentals Customer groups Check-in periods Customers Exercise How would you recommend integrating two airline companies? Does it make any difference whether the companies are in alliance or not? What problems may occur if travel arrangements are converted while some of the flights are not finished yet? Airline companies Flight routes Airports Subroutes Plains Departures Plain types Tickets Can the ideas of a distributed modular ERP system be used? Customers Travel arrangement Exercise: A GDS (Global Distribution Service) is a worldwide computerized reservation system for reserving airline tickets, hotel rooms, rental cars, and other travel related items. The largest GDSs are Amadeus, Galileo, Sabre, and Worldspan. Design an integrated distributed database that integrate the databases of different airline companies and hotel chains in a way that optimize performance, availability and consistency of a common distributed system with local databases in GDSs, the airline companies, hotel chains, airports, and “sale offices” at e.g. travel agents, hotels and e-commerce servers. Suppliers of travel products GDS Primary online reservation sites Secondary online reservation sites The relationships of the diagram illustrate that a travel product stored in one system may be stored in many other systems from where data are replicated in sequence from left to right between the different types of systems. How would you design relaxed ACID properties in the global distributed system? How would you design a workflow for flexible transactions? Root transaction Committing subtransaction Routing by using flexible transactions. Question 1. Describe a Petri net workflow for flexible transactions. Question 2. Change the Petri net workflow in such a way that it also functions for recovered transactions. Syntax for the State diagram: Event [condition] Action Workflow of flexible transactions . Input Input is supplier orders or deliveries. New Supplier orders. Orderlines are replicated to the mobile controllers Workflow for making mobile control of supplier deliveries. Reduced product delivery Product Delivery AND SPLIT deliveries larger than Accepted product ordered Select deliveries AND JOIN a control action Update the local stock Delivery matches an Orderline Accepted product deliveries Reduced orderline Orderlines What is the most important part of the workflow from a system integration point of view? Delivery less than ordered AND SPLIT Replicate the mobile registrations to the central ERP system Delivery is not ordered Error reports End of workflow Input Input is supplier orders or deliveries. New Supplier orders. Orderlines are replicated to the mobile controllers Workflow for making mobile control of supplier deliveries. Reduced product delivery Product Delivery AND SPLIT deliveries larger than Accepted product ordered Select deliveries AND JOIN a control action Update the local stock Delivery matches an Orderline Accepted product deliveries Reduced orderline Orderlines How would you implement the database of the workflow? Delivery less than ordered AND SPLIT Replicate the mobile registrations to the central ERP system Delivery is not ordered Error reports End of workflow from Workflow nodes A: to Activities Places Branches from one workflow node to another Colored tokens Allokation of fragments: Allocation is the physical placement of fragments in different locations. Allocated fragments may be redundant. Exercise: How are the tables fragmented and allocated in a distributed ERP system? Customers Orders Locations Orderlines Products Productstocks Can the Product and Product stock tables be integrated to a single table locally? Can a DDBMS allocate fragments from different tables in a single local table? End of session Thank you !!!