SlideShare a Scribd company logo
© AtlanMod - atlanmod-contact@mines-nantes.fr
Extracting UML/OCL Integrity Constraints and
Derived Types from Relational Databases
Valerio Cosentino
Salvador Martínez
{valerio.cosentino, salvador.martinez}@mines-nantes.fr
07/10/13 © AtlanMod - atlanmod-contact@mines-nantes.fr
Outline
 Introduction
 Approach overview
 Model Extraction
 Constraint Extraction
 Conclusion and future work
07/10/13 © AtlanMod - atlanmod-contact@mines-nantes.fr
Introduction
Relational databases play a key role in most organizations
 They store relevant information according to:
–Schema: data structure definitions and relations
–Integrity constraints (declarative, operational):
implementation of organization policies/business
rules
 These constraints should evolve together with the
organization policies
07/10/13 © AtlanMod - atlanmod-contact@mines-nantes.fr
Introduction
 Discovering/understanding the business rules in a db is:
–Time-consuming (querying/browsing the database)
–Error-prone (manual analysis)
–Tailored process (each SQL vendor offers slight
variations for the standard language)
 Model Driven Engineering offers:
–Homogeneous representation (schema + constraints)
–Higher abstraction level (no SQL vendor specificities)
–Automatation of repetitive activities (extraction of
schema and constraints)
07/10/13 © AtlanMod - atlanmod-contact@mines-nantes.fr
Approach overview
 Model Extraction translates tables, relations and views
into UML classes and associations
 Constraint Extraction focuses on inferring the OCL
expressions required to complement the UML model
07/10/13 © AtlanMod - atlanmod-contact@mines-nantes.fr
Model Extraction
 Mappings:
– Tables → classes
– Views → derived classes
– Columns → class's attributes
– Database data types → UML data types
 CHAR(n), VARCHAR2(n) → String
 Integer, Float, Date → Integer, Real, Date
 Number(precision, scale) → if precision = 0 Integer else Real
– Foreign keys → associations between classes
– SQL queries → associations' cardinalities
07/10/13 © AtlanMod - atlanmod-contact@mines-nantes.fr
Model Extraction
 Example: human resource database
07/10/13 © AtlanMod - atlanmod-contact@mines-nantes.fr
Constraint Extraction
 Declarative constraints:
– PRIMARY KEY
– UNIQUE
– NOT NULL
– CHECK
 Operational constraints:
– Triggers: PL/SQL - SQL code automatically executed in
response to certain database events
 Key elements: SQL-to-OCL and PL/SQL-to-OCL
– they map SQL and PL/SQL constructs to OCL
07/10/13 © AtlanMod - atlanmod-contact@mines-nantes.fr
Declarative constraints
 Declarative constraints:
 Example:
07/10/13 © AtlanMod - atlanmod-contact@mines-nantes.fr
SQL to OCL
 Projection and selection:
 Example:
07/10/13 © AtlanMod - atlanmod-contact@mines-nantes.fr
SQL to OCL
 Join:
 Example:
07/10/13 © AtlanMod - atlanmod-contact@mines-nantes.fr
SQL to OCL
 Group and having clause:
 Example:
07/10/13 © AtlanMod - atlanmod-contact@mines-nantes.fr
Triggers
 Triggers are composed by:
– Triggering event: SQL statement, database or user event
– Trigger condition (optional): boolean expression
– Triggered action: PL/SQL block (procedural and SQL code)
 They can be executed: instead of, before or after
performing the triggering event
07/10/13 © AtlanMod - atlanmod-contact@mines-nantes.fr
PL/SQL to OCL
 All triggers that embed in their action a PL/SQL
statement raising an exception defined by the user are
classified as business-relevant
– Two ways to use user exceptions:
 RAISE statement (Override an already-defined exception)
 RAISE APPLICATION ERROR statement
 These exceptions are generally nested in conditional
statements. For each exception, the conditions
triggering the exception are mapped to an equivalent
OCL expression.
07/10/13 © AtlanMod - atlanmod-contact@mines-nantes.fr
PL/SQL to OCL
 Trigger:
 Example:
SQL to OCL mappings
07/10/13 © AtlanMod - atlanmod-contact@mines-nantes.fr
Refining OCL Constraints
 UML stereotype mechanisms are used to annotate each
OCL constraint extracted from a Trigger with the
information of the events that apply to it (insert,
update, delete)
 Annotated OCL constraints can be merged together
when:
– they are semantically-equivalent
– they are applied to different events
07/10/13 © AtlanMod - atlanmod-contact@mines-nantes.fr
Conclusion and future work
 MDE benefits:
– Modular and generic approach
– Automatic extraction of the organization policies in
databases
 Future work
– Test the framework on a real database application
– Extend the OCL language with additional libraries for
representing calendar-based constraints
– Integrate the extracted business rules with those ones
extracted from other system's components
07/10/13 © AtlanMod - atlanmod-contact@mines-nantes.fr
Questions

More Related Content

Similar to Extracting UML/OCL Integrity Constraints and Derived Types from Relational Databases

MoDisco & ATL - Eclipse DemoCamp Indigo 2011 in Nantes
MoDisco & ATL - Eclipse DemoCamp Indigo 2011 in NantesMoDisco & ATL - Eclipse DemoCamp Indigo 2011 in Nantes
MoDisco & ATL - Eclipse DemoCamp Indigo 2011 in Nantes
Hugo Bruneliere
 
Continuous Performance Monitoring of a Distributed Application [CON4730]
Continuous Performance Monitoring of a Distributed Application [CON4730]Continuous Performance Monitoring of a Distributed Application [CON4730]
Continuous Performance Monitoring of a Distributed Application [CON4730]
Ashish Srivastava
 
CAE_Tech_Seminar_PD
CAE_Tech_Seminar_PDCAE_Tech_Seminar_PD
CAE_Tech_Seminar_PD
Steve Fletcher CEng FIMechE
 
Best Practices & Lessons Learned from the field on EMC Documentum xCP 2.0
Best Practices & Lessons Learned from the field on EMC Documentum xCP 2.0Best Practices & Lessons Learned from the field on EMC Documentum xCP 2.0
Best Practices & Lessons Learned from the field on EMC Documentum xCP 2.0
Haytham Ghandour
 
SantoshDengale
SantoshDengaleSantoshDengale
SantoshDengale
Santosh Dengale
 
Matthew Hause Building Bridges between Systems and Software with SysML and UML
Matthew Hause Building Bridges between Systems and Software with SysML and UMLMatthew Hause Building Bridges between Systems and Software with SysML and UML
Matthew Hause Building Bridges between Systems and Software with SysML and UML
INCOSE Colorado Front Range Chapter
 
Practical machine learning
Practical machine learningPractical machine learning
Practical machine learning
Faizan Javed
 
Ciel mech june2014_webinarpresentation
Ciel mech june2014_webinarpresentationCiel mech june2014_webinarpresentation
Ciel mech june2014_webinarpresentation
Kamal Karimanal
 
con9578-2088758.pdf
con9578-2088758.pdfcon9578-2088758.pdf
con9578-2088758.pdf
TricantinoLopezPerez
 
Upgrading to Oracle SOA Suite 11g While Maintaining 100% Uptime
Upgrading to Oracle SOA Suite 11g While Maintaining 100% UptimeUpgrading to Oracle SOA Suite 11g While Maintaining 100% Uptime
Upgrading to Oracle SOA Suite 11g While Maintaining 100% Uptime
Revelation Technologies
 
SantoshDengale
SantoshDengaleSantoshDengale
SantoshDengale
Santosh Dengale
 
Productionizing Predictive Analytics using the Rendezvous Architecture - for ...
Productionizing Predictive Analytics using the Rendezvous Architecture - for ...Productionizing Predictive Analytics using the Rendezvous Architecture - for ...
Productionizing Predictive Analytics using the Rendezvous Architecture - for ...
danielschulz2005
 
Javawug
JavawugJavawug
Javawug
Skills Matter
 
Oracle - Enterprise Manager 12c Overview
Oracle - Enterprise Manager 12c OverviewOracle - Enterprise Manager 12c Overview
Oracle - Enterprise Manager 12c Overview
Fred Sim
 
OFMP The Road To OSGi Eclipse Democamp Luxembour 2008
OFMP The Road To OSGi Eclipse Democamp Luxembour 2008OFMP The Road To OSGi Eclipse Democamp Luxembour 2008
OFMP The Road To OSGi Eclipse Democamp Luxembour 2008
Frederic Conrotte
 
Real-Time Coherence Monitoring in Integrated Environments
Real-Time Coherence Monitoring in Integrated EnvironmentsReal-Time Coherence Monitoring in Integrated Environments
Real-Time Coherence Monitoring in Integrated Environments
SL Corporation
 
See Inside the Middleware Black Box
See Inside the Middleware Black Box See Inside the Middleware Black Box
See Inside the Middleware Black Box
CA Technologies
 
Stop the Blame Game with Increased Visibility of your Mobile-to-Mainframe IT ...
Stop the Blame Game with Increased Visibility of your Mobile-to-Mainframe IT ...Stop the Blame Game with Increased Visibility of your Mobile-to-Mainframe IT ...
Stop the Blame Game with Increased Visibility of your Mobile-to-Mainframe IT ...
CA Technologies
 
Dcs or plc
Dcs or plcDcs or plc
Dcs or plc
Ch Aamir
 
DDS Advanced Tutorial - OMG June 2013 Berlin Meeting
DDS Advanced Tutorial - OMG June 2013 Berlin MeetingDDS Advanced Tutorial - OMG June 2013 Berlin Meeting
DDS Advanced Tutorial - OMG June 2013 Berlin Meeting
Jaime Martin Losa
 

Similar to Extracting UML/OCL Integrity Constraints and Derived Types from Relational Databases (20)

MoDisco & ATL - Eclipse DemoCamp Indigo 2011 in Nantes
MoDisco & ATL - Eclipse DemoCamp Indigo 2011 in NantesMoDisco & ATL - Eclipse DemoCamp Indigo 2011 in Nantes
MoDisco & ATL - Eclipse DemoCamp Indigo 2011 in Nantes
 
Continuous Performance Monitoring of a Distributed Application [CON4730]
Continuous Performance Monitoring of a Distributed Application [CON4730]Continuous Performance Monitoring of a Distributed Application [CON4730]
Continuous Performance Monitoring of a Distributed Application [CON4730]
 
CAE_Tech_Seminar_PD
CAE_Tech_Seminar_PDCAE_Tech_Seminar_PD
CAE_Tech_Seminar_PD
 
Best Practices & Lessons Learned from the field on EMC Documentum xCP 2.0
Best Practices & Lessons Learned from the field on EMC Documentum xCP 2.0Best Practices & Lessons Learned from the field on EMC Documentum xCP 2.0
Best Practices & Lessons Learned from the field on EMC Documentum xCP 2.0
 
SantoshDengale
SantoshDengaleSantoshDengale
SantoshDengale
 
Matthew Hause Building Bridges between Systems and Software with SysML and UML
Matthew Hause Building Bridges between Systems and Software with SysML and UMLMatthew Hause Building Bridges between Systems and Software with SysML and UML
Matthew Hause Building Bridges between Systems and Software with SysML and UML
 
Practical machine learning
Practical machine learningPractical machine learning
Practical machine learning
 
Ciel mech june2014_webinarpresentation
Ciel mech june2014_webinarpresentationCiel mech june2014_webinarpresentation
Ciel mech june2014_webinarpresentation
 
con9578-2088758.pdf
con9578-2088758.pdfcon9578-2088758.pdf
con9578-2088758.pdf
 
Upgrading to Oracle SOA Suite 11g While Maintaining 100% Uptime
Upgrading to Oracle SOA Suite 11g While Maintaining 100% UptimeUpgrading to Oracle SOA Suite 11g While Maintaining 100% Uptime
Upgrading to Oracle SOA Suite 11g While Maintaining 100% Uptime
 
SantoshDengale
SantoshDengaleSantoshDengale
SantoshDengale
 
Productionizing Predictive Analytics using the Rendezvous Architecture - for ...
Productionizing Predictive Analytics using the Rendezvous Architecture - for ...Productionizing Predictive Analytics using the Rendezvous Architecture - for ...
Productionizing Predictive Analytics using the Rendezvous Architecture - for ...
 
Javawug
JavawugJavawug
Javawug
 
Oracle - Enterprise Manager 12c Overview
Oracle - Enterprise Manager 12c OverviewOracle - Enterprise Manager 12c Overview
Oracle - Enterprise Manager 12c Overview
 
OFMP The Road To OSGi Eclipse Democamp Luxembour 2008
OFMP The Road To OSGi Eclipse Democamp Luxembour 2008OFMP The Road To OSGi Eclipse Democamp Luxembour 2008
OFMP The Road To OSGi Eclipse Democamp Luxembour 2008
 
Real-Time Coherence Monitoring in Integrated Environments
Real-Time Coherence Monitoring in Integrated EnvironmentsReal-Time Coherence Monitoring in Integrated Environments
Real-Time Coherence Monitoring in Integrated Environments
 
See Inside the Middleware Black Box
See Inside the Middleware Black Box See Inside the Middleware Black Box
See Inside the Middleware Black Box
 
Stop the Blame Game with Increased Visibility of your Mobile-to-Mainframe IT ...
Stop the Blame Game with Increased Visibility of your Mobile-to-Mainframe IT ...Stop the Blame Game with Increased Visibility of your Mobile-to-Mainframe IT ...
Stop the Blame Game with Increased Visibility of your Mobile-to-Mainframe IT ...
 
Dcs or plc
Dcs or plcDcs or plc
Dcs or plc
 
DDS Advanced Tutorial - OMG June 2013 Berlin Meeting
DDS Advanced Tutorial - OMG June 2013 Berlin MeetingDDS Advanced Tutorial - OMG June 2013 Berlin Meeting
DDS Advanced Tutorial - OMG June 2013 Berlin Meeting
 

More from Valerio Cosentino

Tracking counterfeiting on the web with python and ml
Tracking counterfeiting on the web with python and mlTracking counterfeiting on the web with python and ml
Tracking counterfeiting on the web with python and ml
Valerio Cosentino
 
GrimoireLab: Measuring the health of your software project with Python
GrimoireLab: Measuring the health of your software project with PythonGrimoireLab: Measuring the health of your software project with Python
GrimoireLab: Measuring the health of your software project with Python
Valerio Cosentino
 
Perceval, Graal and Arthur: The Quest for Software Project Data
Perceval, Graal and Arthur: The Quest for Software Project DataPerceval, Graal and Arthur: The Quest for Software Project Data
Perceval, Graal and Arthur: The Quest for Software Project Data
Valerio Cosentino
 
Gamification oss
Gamification ossGamification oss
Gamification oss
Valerio Cosentino
 
SortingHat: Wizardry on Software Project Members
SortingHat: Wizardry on Software Project MembersSortingHat: Wizardry on Software Project Members
SortingHat: Wizardry on Software Project Members
Valerio Cosentino
 
Measuring Software development with GrimoireLab
Measuring Software development with GrimoireLabMeasuring Software development with GrimoireLab
Measuring Software development with GrimoireLab
Valerio Cosentino
 
Graal The Quest for Source Code Knowledge
Graal  The Quest for Source Code KnowledgeGraal  The Quest for Source Code Knowledge
Graal The Quest for Source Code Knowledge
Valerio Cosentino
 
Measuring Software development with GrimoireLab
Measuring Software development with GrimoireLabMeasuring Software development with GrimoireLab
Measuring Software development with GrimoireLab
Valerio Cosentino
 
Crossminer and GrimoireLab
Crossminer and GrimoireLabCrossminer and GrimoireLab
Crossminer and GrimoireLab
Valerio Cosentino
 
Perceval: Software Project Data at Your Will
Perceval: Software Project Data at Your WillPerceval: Software Project Data at Your Will
Perceval: Software Project Data at Your Will
Valerio Cosentino
 
Extending grimoirelab
Extending grimoirelabExtending grimoirelab
Extending grimoirelab
Valerio Cosentino
 
Perceval
PercevalPerceval
Gamification pres-scme-2017
Gamification pres-scme-2017Gamification pres-scme-2017
Gamification pres-scme-2017
Valerio Cosentino
 
A Model-Based Approach for Extracting Business Rules out of Legacy Informatio...
A Model-Based Approach for Extracting Business Rules out of Legacy Informatio...A Model-Based Approach for Extracting Business Rules out of Legacy Informatio...
A Model-Based Approach for Extracting Business Rules out of Legacy Informatio...
Valerio Cosentino
 
Gitana: a SQL-based Git Repository Inspector
Gitana: a SQL-based Git Repository InspectorGitana: a SQL-based Git Repository Inspector
Gitana: a SQL-based Git Repository Inspector
Valerio Cosentino
 
Assessing the Bus Factor of Git Repositories
Assessing the Bus Factor of Git RepositoriesAssessing the Bus Factor of Git Repositories
Assessing the Bus Factor of Git Repositories
Valerio Cosentino
 
A Model-Driven Approach to Generate External DSLs from Object-Oriented APIs
A Model-Driven Approach to Generate External DSLs from Object-Oriented APIsA Model-Driven Approach to Generate External DSLs from Object-Oriented APIs
A Model-Driven Approach to Generate External DSLs from Object-Oriented APIs
Valerio Cosentino
 
Extracting Business Rules from COBOL: A Model-Based Framework
Extracting Business Rules from COBOL: A Model-Based FrameworkExtracting Business Rules from COBOL: A Model-Based Framework
Extracting Business Rules from COBOL: A Model-Based Framework
Valerio Cosentino
 
A Model Driven Reverse Engineering framework for extracting business rules ou...
A Model Driven Reverse Engineering framework for extracting business rules ou...A Model Driven Reverse Engineering framework for extracting business rules ou...
A Model Driven Reverse Engineering framework for extracting business rules ou...
Valerio Cosentino
 

More from Valerio Cosentino (19)

Tracking counterfeiting on the web with python and ml
Tracking counterfeiting on the web with python and mlTracking counterfeiting on the web with python and ml
Tracking counterfeiting on the web with python and ml
 
GrimoireLab: Measuring the health of your software project with Python
GrimoireLab: Measuring the health of your software project with PythonGrimoireLab: Measuring the health of your software project with Python
GrimoireLab: Measuring the health of your software project with Python
 
Perceval, Graal and Arthur: The Quest for Software Project Data
Perceval, Graal and Arthur: The Quest for Software Project DataPerceval, Graal and Arthur: The Quest for Software Project Data
Perceval, Graal and Arthur: The Quest for Software Project Data
 
Gamification oss
Gamification ossGamification oss
Gamification oss
 
SortingHat: Wizardry on Software Project Members
SortingHat: Wizardry on Software Project MembersSortingHat: Wizardry on Software Project Members
SortingHat: Wizardry on Software Project Members
 
Measuring Software development with GrimoireLab
Measuring Software development with GrimoireLabMeasuring Software development with GrimoireLab
Measuring Software development with GrimoireLab
 
Graal The Quest for Source Code Knowledge
Graal  The Quest for Source Code KnowledgeGraal  The Quest for Source Code Knowledge
Graal The Quest for Source Code Knowledge
 
Measuring Software development with GrimoireLab
Measuring Software development with GrimoireLabMeasuring Software development with GrimoireLab
Measuring Software development with GrimoireLab
 
Crossminer and GrimoireLab
Crossminer and GrimoireLabCrossminer and GrimoireLab
Crossminer and GrimoireLab
 
Perceval: Software Project Data at Your Will
Perceval: Software Project Data at Your WillPerceval: Software Project Data at Your Will
Perceval: Software Project Data at Your Will
 
Extending grimoirelab
Extending grimoirelabExtending grimoirelab
Extending grimoirelab
 
Perceval
PercevalPerceval
Perceval
 
Gamification pres-scme-2017
Gamification pres-scme-2017Gamification pres-scme-2017
Gamification pres-scme-2017
 
A Model-Based Approach for Extracting Business Rules out of Legacy Informatio...
A Model-Based Approach for Extracting Business Rules out of Legacy Informatio...A Model-Based Approach for Extracting Business Rules out of Legacy Informatio...
A Model-Based Approach for Extracting Business Rules out of Legacy Informatio...
 
Gitana: a SQL-based Git Repository Inspector
Gitana: a SQL-based Git Repository InspectorGitana: a SQL-based Git Repository Inspector
Gitana: a SQL-based Git Repository Inspector
 
Assessing the Bus Factor of Git Repositories
Assessing the Bus Factor of Git RepositoriesAssessing the Bus Factor of Git Repositories
Assessing the Bus Factor of Git Repositories
 
A Model-Driven Approach to Generate External DSLs from Object-Oriented APIs
A Model-Driven Approach to Generate External DSLs from Object-Oriented APIsA Model-Driven Approach to Generate External DSLs from Object-Oriented APIs
A Model-Driven Approach to Generate External DSLs from Object-Oriented APIs
 
Extracting Business Rules from COBOL: A Model-Based Framework
Extracting Business Rules from COBOL: A Model-Based FrameworkExtracting Business Rules from COBOL: A Model-Based Framework
Extracting Business Rules from COBOL: A Model-Based Framework
 
A Model Driven Reverse Engineering framework for extracting business rules ou...
A Model Driven Reverse Engineering framework for extracting business rules ou...A Model Driven Reverse Engineering framework for extracting business rules ou...
A Model Driven Reverse Engineering framework for extracting business rules ou...
 

Recently uploaded

20240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 202420240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 2024
Matthew Sinclair
 
GraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracyGraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracy
Tomaz Bratanic
 
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdfUnlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Malak Abu Hammad
 
Presentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of GermanyPresentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of Germany
innovationoecd
 
Serial Arm Control in Real Time Presentation
Serial Arm Control in Real Time PresentationSerial Arm Control in Real Time Presentation
Serial Arm Control in Real Time Presentation
tolgahangng
 
20240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 202420240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 2024
Matthew Sinclair
 
Programming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup SlidesProgramming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup Slides
Zilliz
 
How to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For FlutterHow to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For Flutter
Daiki Mogmet Ito
 
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
名前 です男
 
UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6
DianaGray10
 
20240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 202420240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 2024
Matthew Sinclair
 
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdfUni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems S.M.S.A.
 
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
Neo4j
 
Climate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing DaysClimate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing Days
Kari Kakkonen
 
Mind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AIMind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AI
Kumud Singh
 
Infrastructure Challenges in Scaling RAG with Custom AI models
Infrastructure Challenges in Scaling RAG with Custom AI modelsInfrastructure Challenges in Scaling RAG with Custom AI models
Infrastructure Challenges in Scaling RAG with Custom AI models
Zilliz
 
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
Edge AI and Vision Alliance
 
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
Neo4j
 
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy SurveyTrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc
 
“I’m still / I’m still / Chaining from the Block”
“I’m still / I’m still / Chaining from the Block”“I’m still / I’m still / Chaining from the Block”
“I’m still / I’m still / Chaining from the Block”
Claudio Di Ciccio
 

Recently uploaded (20)

20240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 202420240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 2024
 
GraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracyGraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracy
 
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdfUnlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
 
Presentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of GermanyPresentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of Germany
 
Serial Arm Control in Real Time Presentation
Serial Arm Control in Real Time PresentationSerial Arm Control in Real Time Presentation
Serial Arm Control in Real Time Presentation
 
20240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 202420240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 2024
 
Programming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup SlidesProgramming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup Slides
 
How to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For FlutterHow to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For Flutter
 
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
 
UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6
 
20240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 202420240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 2024
 
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdfUni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdf
 
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
 
Climate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing DaysClimate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing Days
 
Mind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AIMind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AI
 
Infrastructure Challenges in Scaling RAG with Custom AI models
Infrastructure Challenges in Scaling RAG with Custom AI modelsInfrastructure Challenges in Scaling RAG with Custom AI models
Infrastructure Challenges in Scaling RAG with Custom AI models
 
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
 
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
 
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy SurveyTrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy Survey
 
“I’m still / I’m still / Chaining from the Block”
“I’m still / I’m still / Chaining from the Block”“I’m still / I’m still / Chaining from the Block”
“I’m still / I’m still / Chaining from the Block”
 

Extracting UML/OCL Integrity Constraints and Derived Types from Relational Databases

  • 1. © AtlanMod - atlanmod-contact@mines-nantes.fr Extracting UML/OCL Integrity Constraints and Derived Types from Relational Databases Valerio Cosentino Salvador Martínez {valerio.cosentino, salvador.martinez}@mines-nantes.fr
  • 2. 07/10/13 © AtlanMod - atlanmod-contact@mines-nantes.fr Outline  Introduction  Approach overview  Model Extraction  Constraint Extraction  Conclusion and future work
  • 3. 07/10/13 © AtlanMod - atlanmod-contact@mines-nantes.fr Introduction Relational databases play a key role in most organizations  They store relevant information according to: –Schema: data structure definitions and relations –Integrity constraints (declarative, operational): implementation of organization policies/business rules  These constraints should evolve together with the organization policies
  • 4. 07/10/13 © AtlanMod - atlanmod-contact@mines-nantes.fr Introduction  Discovering/understanding the business rules in a db is: –Time-consuming (querying/browsing the database) –Error-prone (manual analysis) –Tailored process (each SQL vendor offers slight variations for the standard language)  Model Driven Engineering offers: –Homogeneous representation (schema + constraints) –Higher abstraction level (no SQL vendor specificities) –Automatation of repetitive activities (extraction of schema and constraints)
  • 5. 07/10/13 © AtlanMod - atlanmod-contact@mines-nantes.fr Approach overview  Model Extraction translates tables, relations and views into UML classes and associations  Constraint Extraction focuses on inferring the OCL expressions required to complement the UML model
  • 6. 07/10/13 © AtlanMod - atlanmod-contact@mines-nantes.fr Model Extraction  Mappings: – Tables → classes – Views → derived classes – Columns → class's attributes – Database data types → UML data types  CHAR(n), VARCHAR2(n) → String  Integer, Float, Date → Integer, Real, Date  Number(precision, scale) → if precision = 0 Integer else Real – Foreign keys → associations between classes – SQL queries → associations' cardinalities
  • 7. 07/10/13 © AtlanMod - atlanmod-contact@mines-nantes.fr Model Extraction  Example: human resource database
  • 8. 07/10/13 © AtlanMod - atlanmod-contact@mines-nantes.fr Constraint Extraction  Declarative constraints: – PRIMARY KEY – UNIQUE – NOT NULL – CHECK  Operational constraints: – Triggers: PL/SQL - SQL code automatically executed in response to certain database events  Key elements: SQL-to-OCL and PL/SQL-to-OCL – they map SQL and PL/SQL constructs to OCL
  • 9. 07/10/13 © AtlanMod - atlanmod-contact@mines-nantes.fr Declarative constraints  Declarative constraints:  Example:
  • 10. 07/10/13 © AtlanMod - atlanmod-contact@mines-nantes.fr SQL to OCL  Projection and selection:  Example:
  • 11. 07/10/13 © AtlanMod - atlanmod-contact@mines-nantes.fr SQL to OCL  Join:  Example:
  • 12. 07/10/13 © AtlanMod - atlanmod-contact@mines-nantes.fr SQL to OCL  Group and having clause:  Example:
  • 13. 07/10/13 © AtlanMod - atlanmod-contact@mines-nantes.fr Triggers  Triggers are composed by: – Triggering event: SQL statement, database or user event – Trigger condition (optional): boolean expression – Triggered action: PL/SQL block (procedural and SQL code)  They can be executed: instead of, before or after performing the triggering event
  • 14. 07/10/13 © AtlanMod - atlanmod-contact@mines-nantes.fr PL/SQL to OCL  All triggers that embed in their action a PL/SQL statement raising an exception defined by the user are classified as business-relevant – Two ways to use user exceptions:  RAISE statement (Override an already-defined exception)  RAISE APPLICATION ERROR statement  These exceptions are generally nested in conditional statements. For each exception, the conditions triggering the exception are mapped to an equivalent OCL expression.
  • 15. 07/10/13 © AtlanMod - atlanmod-contact@mines-nantes.fr PL/SQL to OCL  Trigger:  Example: SQL to OCL mappings
  • 16. 07/10/13 © AtlanMod - atlanmod-contact@mines-nantes.fr Refining OCL Constraints  UML stereotype mechanisms are used to annotate each OCL constraint extracted from a Trigger with the information of the events that apply to it (insert, update, delete)  Annotated OCL constraints can be merged together when: – they are semantically-equivalent – they are applied to different events
  • 17. 07/10/13 © AtlanMod - atlanmod-contact@mines-nantes.fr Conclusion and future work  MDE benefits: – Modular and generic approach – Automatic extraction of the organization policies in databases  Future work – Test the framework on a real database application – Extend the OCL language with additional libraries for representing calendar-based constraints – Integrate the extracted business rules with those ones extracted from other system's components
  • 18. 07/10/13 © AtlanMod - atlanmod-contact@mines-nantes.fr Questions