SlideShare a Scribd company logo
1 of 16
1Jarrar © 2015
Schema Equivalence and
Optimization
Reference:
Mustafa Jarrar: Lecture Notes on Schema Equivalence and Optimization in ORM
Birzeit University, Palestine, 2015
Mustafa Jarrar
Birzeit University, Palestine
mjarrar@birzeit.edu
www.jarrar.info
2Jarrar © 2015
Watch this lecture and download the slides from
http://jarrar-courses.blogspot.com/2015/01/dataandbusinessprocessmodelling.html
Some diagrams in this lecture are based on [1]
Keywords: Schema, Schema Engineering, constraints, Schema Equivalence, Schema
Optimization, constraints, Cardinality, multiplicity, Rules, Business Rules, Business logic derivation
rules, integrity constraints
Slides And Videos - Download, Watch, Interact
3Jarrar © 2015
Conceptual Schema Design Steps
1. From examples to elementary facts
2. Draw fact types and apply population check
3. Combine entity types
4. Add uniqueness constraints
5. Add mandatory constraints
6. Add subtype relations and other constraints
7. Final checks, & schema engineering issues
4Jarrar © 2015
Schema Equivalence and Optimization
• It is not surprising that people often come up with different ways (i.e.,
different conceptual models) of describing the same reality.
• Two conceptual schemas are equivalent if and only if whatever UoD
state can be modeled in one can also be modeled in the other.
• What is the difference between these two schemes:
The act of reshaping two equivalent schemes like this is said to
be a conceptual schema transformation.
Based on [1]
5Jarrar © 2015
Schema Equivalence and Optimization
• Skills of schema transformations helps you to see what different
design choices are possible.
• Moreover, if two independently developed schemas are to be either
fully or partly integrated, we often need to resolve the differences in
the ways that each schema models common UoD features.
• To do this, we need to know whether one representation can be
transformed into the other, and if so, how.
• Another use of conceptual schema transformations is to reshape the
original conceptual schema into one that maps directly to a more
efficient implementation, or to more conceptually elegant schema.
• This process is known as conceptual schema optimization.
There are two class of schema transformations:
Predicate Specialization, and Predicate Generalization
6Jarrar © 2015
Predicate Specialization and Generalization
We generalize smoking and drinking into indulging in a vice, where vice has
two specific cases. If we transform in the opposite direction, we specialize
indulging in a vice into two predicates, one for each case.
Based on [1]
If two or more predicates may be thought of as special cases of a more
general predicate, then we may replace them by the more general
predicate, so long as the original distinction can be preserved in some way.
7Jarrar © 2015
Predicate Specialization and Generalization
Because there are exactly three kinds of medals, the ternary may be
specialized into three binaries, one for each medal kind,
Where m1, and each Si corresponds
to R where B = bi
Theory: R may be specialized into S1..Sn by absorbing B.
If two or more predicates may be thought of as special cases of a more
general predicate, then we may replace them by the more general
predicate, so long as the original distinction can be preserved in some way.
?
Based on [1]
8Jarrar © 2015
Predicate Specialization and Generalization
Each Si corresponds to
R where B = bi
The previous theorem always holds, but any constraint added to one of the
schemas must be translated into an equivalent, additional constraint on the
other schema.
The UC on the left is equivalent to the UCs on the right.
 If a UC in R spans a combination of B’s role and other roles, a UC
spans the specialization of these other roles in S1,..,Sn, and conversely.
Based on [1]
9Jarrar © 2015
Predicate Specialization and Generalization
The UC on the left is equivalent to the exclusion constraint on the right.
The UC on the left is equivalent to the exclusion constraint on the right.
?
?
Where m1, and each
Si corresponds to R
where B = bi
The UC on the left is equivalent to the exclusion constraint on the right.
If a UC spans all roles of R except for B’s role, then S1 .. Sn are mutually
exclusive, and conversely.
Based on [1]
10Jarrar © 2015
?
Predicate Specialization and Generalization
if any medal results are recorded for a country, all three medal results (gold, silver,
and bronze) are required. To express, we add an equality constraint between the
medal winning roles played by Country.
 If R is a ternary with a UC spanning just B’s role and one other role, then
adding a frequency constraint of n to this other role is equivalent to adding an
equality constraint over the specialized versions of that role.
Based on [1]
11Jarrar © 2015
?
Predicate Specialization and Generalization
The impact of adding mandatory role and frequency constraints.
 If A’s role (or role disjunction) in R is mandatory, then the disjunction of its
specialized roles is mandatory, and conversely (1 i  m).
 If R is a ternary with a UC spanning just B’s role and one other role, then adding a
mandatory role constraint and frequency constraint of n (the number of possible
values for B) to this other role is equivalent to making each specialized version of that
role mandatory.
Each S corresponds
to R where B = bi
Based on [1]
12Jarrar © 2015
?
Other Cases and Examples
The drives predicate is specialized by absorbing Status.
Each car in the rally has two drivers (a main driver and a backup
driver), and each person drives exactly one car.
Based on [1]
13Jarrar © 2015
Other Cases and Examples
 Corollary 1: If s roles are mandatory in the left-hand schema, the disjunction of s
roles in the right-hand schema is mandatory, and conversely.
 Corollary 2: If an external UC spans the roles of and in the left-hand schema, then a
UC applies to each of s roles in the right-hand schema, and conversely.
 Corollary 3: If s role in the left-hand schema is mandatory, then each of s roles in
the right-hand schema is mandatory, and conversely.
 Corollary 4: An equality constraint over s roles in the RHS is equivalent to a
frequency constraint of on s role in the left-hand schema; this constraint is
strengthened to if a UC exists on each of s roles in the right-hand schema.
Each Si corresponds
to R where T is
restricted to B = bi
Theory: R may be specialized into S1..Sn by absorbing B.
Based on [1]
14Jarrar © 2015
Other Cases and Examples
Can the predicate be specialized?
• Transforming from the original schema to one of those strengthens the
schema by adding information.
• Transforming in the opposite direction weakens the schema by losing
information.
Any such transformations that add or lose information should be the result
of conscious decisions that are acceptable to the client (for which the
business domain is being modeled).
? ?
Based on [1]
15Jarrar © 2015
Other Cases and Examples
Each Si corresponds to
one instance of R
Corollary 1:If an equality constraint applies over s roles in the left-hand schema, then
the frequency constraint in the right-hand schema is strengthened to , and conversely.
Corollary 2: Adding a UC to role in the right-hand schema is equivalent in the left-
hand schema to adding UCs to s roles (making the S 1:1) and strengthening the
exclusion constraint to an exclusion constraint over s roles.
Theory: The left-hand schema implies the right-hand schema.
Based on [1]
16Jarrar © 2015
References
1. Terry Halpin, Tony Morgan: Information Modeling and Relational Databases, Second Edition. 2nd
Edition. The Morgan Kaufmann Series in Data Management Systems. ISBN: 0123735688
2. Mustafa Jarrar and Stijn Heymans: Towards Pattern-Based Reasoning For Friendly Ontology
Debugging. Journal of Artificial Intelligence Tools. Volume 17. No.4. World Scientific Publishing. Aug
2008.
3. Mustafa Jarrar: Mapping ORM Into The SHOIN/OWL Description Logic- Towards A Methodological
And Expressive Graphical Notation For Ontology Engineering. In OTM 2007 workshops:
Proceedings of the International Workshop on Object-Role Modeling (ORM'07). Pages (729-741), LNCS
4805, Springer. ISBN: 9783540768890. Portogal. November, 2007
4. Mustafa Jarrar: Towards Automated Reasoning On ORM Schemes. -Mapping ORM Into The
DLR_idf Description Logic. In proceedings of the 26th International Conference on Conceptual
Modeling (ER 2007). Pages (181-197). LNCS 4801, Springer. Auckland, New Zealand. ISBN
9783540755623. November 2007
5. Mustafa Jarrar and Stijn Heymans: Unsatisfiability Reasoning In ORM Conceptual Schemes. In
Current Trends in Database Technology - EDBT 2006: Proceeding of the IFIP-2.6 International
Conference on Semantics of a Networked. Pages (517-534). LNCS 4254, Springer. Munich, Germany.
ISBN: 3540467882. March 2006.
6. Mustafa Jarrar, Maria Keet, and Paolo Dongilli: Multilingual Verbalization Of ORM Conceptual Models
And Axiomatized Ontologies. Technical eport. STARLab, Vrije Universiteit Brussel, Feb 2006.
7. Mustafa Jarrar: Modularization And Automatic Composition Of Object-Role Modeling (ORM)
Schemes. OTM 2005 Workshops: Proceedings of the Object-Role Modeling (ORM'05). Pages (613-
625). LNCS 3762, Springer. Larnaca, Cyprus. ISBN: 3540297391. November 2005.

More Related Content

Viewers also liked

InnoDB Architecture and Performance Optimization, Peter Zaitsev
InnoDB Architecture and Performance Optimization, Peter ZaitsevInnoDB Architecture and Performance Optimization, Peter Zaitsev
InnoDB Architecture and Performance Optimization, Peter Zaitsev
Fuenteovejuna
 
HBase schema design Big Data TechCon Boston
HBase schema design Big Data TechCon BostonHBase schema design Big Data TechCon Boston
HBase schema design Big Data TechCon Boston
amansk
 
Covering indexes
Covering indexesCovering indexes
Covering indexes
MYXPLAIN
 
Optimal Execution Of MapReduce Jobs In Cloud - Voices 2015
Optimal Execution Of MapReduce Jobs In Cloud - Voices 2015Optimal Execution Of MapReduce Jobs In Cloud - Voices 2015
Optimal Execution Of MapReduce Jobs In Cloud - Voices 2015
Deanna Kosaraju
 

Viewers also liked (10)

Restivo Diagnóstico institucional- periodo 2
Restivo  Diagnóstico institucional- periodo 2Restivo  Diagnóstico institucional- periodo 2
Restivo Diagnóstico institucional- periodo 2
 
InnoDB Architecture and Performance Optimization, Peter Zaitsev
InnoDB Architecture and Performance Optimization, Peter ZaitsevInnoDB Architecture and Performance Optimization, Peter Zaitsev
InnoDB Architecture and Performance Optimization, Peter Zaitsev
 
Restivo- kindergarten- lesson 3
Restivo- kindergarten- lesson 3Restivo- kindergarten- lesson 3
Restivo- kindergarten- lesson 3
 
HBase schema design Big Data TechCon Boston
HBase schema design Big Data TechCon BostonHBase schema design Big Data TechCon Boston
HBase schema design Big Data TechCon Boston
 
MariaDB Galera Cluster - Simple, Transparent, Highly Available
MariaDB Galera Cluster - Simple, Transparent, Highly AvailableMariaDB Galera Cluster - Simple, Transparent, Highly Available
MariaDB Galera Cluster - Simple, Transparent, Highly Available
 
Query Optimization with MySQL 5.6: Old and New Tricks - Percona Live London 2013
Query Optimization with MySQL 5.6: Old and New Tricks - Percona Live London 2013Query Optimization with MySQL 5.6: Old and New Tricks - Percona Live London 2013
Query Optimization with MySQL 5.6: Old and New Tricks - Percona Live London 2013
 
Covering indexes
Covering indexesCovering indexes
Covering indexes
 
Optimal Execution Of MapReduce Jobs In Cloud - Voices 2015
Optimal Execution Of MapReduce Jobs In Cloud - Voices 2015Optimal Execution Of MapReduce Jobs In Cloud - Voices 2015
Optimal Execution Of MapReduce Jobs In Cloud - Voices 2015
 
MySQL 5.7 NEW FEATURES, BETTER PERFORMANCE, AND THINGS THAT WILL BREAK -- Mid...
MySQL 5.7 NEW FEATURES, BETTER PERFORMANCE, AND THINGS THAT WILL BREAK -- Mid...MySQL 5.7 NEW FEATURES, BETTER PERFORMANCE, AND THINGS THAT WILL BREAK -- Mid...
MySQL 5.7 NEW FEATURES, BETTER PERFORMANCE, AND THINGS THAT WILL BREAK -- Mid...
 
Advanced MySQL Query and Schema Tuning
Advanced MySQL Query and Schema TuningAdvanced MySQL Query and Schema Tuning
Advanced MySQL Query and Schema Tuning
 

More from Mustafa Jarrar

Habash: Arabic Natural Language Processing
Habash: Arabic Natural Language ProcessingHabash: Arabic Natural Language Processing
Habash: Arabic Natural Language Processing
Mustafa Jarrar
 
Adnan: Introduction to Natural Language Processing
Adnan: Introduction to Natural Language Processing Adnan: Introduction to Natural Language Processing
Adnan: Introduction to Natural Language Processing
Mustafa Jarrar
 
Jarrar: Sparql Project
Jarrar: Sparql ProjectJarrar: Sparql Project
Jarrar: Sparql Project
Mustafa Jarrar
 

More from Mustafa Jarrar (20)

Clustering Arabic Tweets for Sentiment Analysis
Clustering Arabic Tweets for Sentiment AnalysisClustering Arabic Tweets for Sentiment Analysis
Clustering Arabic Tweets for Sentiment Analysis
 
Classifying Processes and Basic Formal Ontology
Classifying Processes  and Basic Formal OntologyClassifying Processes  and Basic Formal Ontology
Classifying Processes and Basic Formal Ontology
 
Discrete Mathematics Course Outline
Discrete Mathematics Course OutlineDiscrete Mathematics Course Outline
Discrete Mathematics Course Outline
 
Business Process Implementation
Business Process ImplementationBusiness Process Implementation
Business Process Implementation
 
Business Process Design and Re-engineering
Business Process Design and Re-engineeringBusiness Process Design and Re-engineering
Business Process Design and Re-engineering
 
BPMN 2.0 Analytical Constructs
BPMN 2.0 Analytical ConstructsBPMN 2.0 Analytical Constructs
BPMN 2.0 Analytical Constructs
 
BPMN 2.0 Descriptive Constructs
BPMN 2.0 Descriptive Constructs  BPMN 2.0 Descriptive Constructs
BPMN 2.0 Descriptive Constructs
 
Introduction to Business Process Management
Introduction to Business Process ManagementIntroduction to Business Process Management
Introduction to Business Process Management
 
Customer Complaint Ontology
Customer Complaint Ontology Customer Complaint Ontology
Customer Complaint Ontology
 
Subset, Equality, and Exclusion Rules
Subset, Equality, and Exclusion RulesSubset, Equality, and Exclusion Rules
Subset, Equality, and Exclusion Rules
 
Schema Modularization in ORM
Schema Modularization in ORMSchema Modularization in ORM
Schema Modularization in ORM
 
On Computer Science Trends and Priorities in Palestine
On Computer Science Trends and Priorities in PalestineOn Computer Science Trends and Priorities in Palestine
On Computer Science Trends and Priorities in Palestine
 
Lessons from Class Recording & Publishing of Eight Online Courses
Lessons from Class Recording & Publishing of Eight Online CoursesLessons from Class Recording & Publishing of Eight Online Courses
Lessons from Class Recording & Publishing of Eight Online Courses
 
Presentation curras paper-emnlp2014-final
Presentation curras paper-emnlp2014-finalPresentation curras paper-emnlp2014-final
Presentation curras paper-emnlp2014-final
 
Jarrar: Future Internet in Horizon 2020 Calls
Jarrar: Future Internet in Horizon 2020 CallsJarrar: Future Internet in Horizon 2020 Calls
Jarrar: Future Internet in Horizon 2020 Calls
 
Habash: Arabic Natural Language Processing
Habash: Arabic Natural Language ProcessingHabash: Arabic Natural Language Processing
Habash: Arabic Natural Language Processing
 
Adnan: Introduction to Natural Language Processing
Adnan: Introduction to Natural Language Processing Adnan: Introduction to Natural Language Processing
Adnan: Introduction to Natural Language Processing
 
Riestra: How to Design and engineer Competitive Horizon 2020 Proposals
Riestra: How to Design and engineer Competitive Horizon 2020 ProposalsRiestra: How to Design and engineer Competitive Horizon 2020 Proposals
Riestra: How to Design and engineer Competitive Horizon 2020 Proposals
 
Bouquet: SIERA Workshop on The Pillars of Horizon2020
Bouquet: SIERA Workshop on The Pillars of Horizon2020Bouquet: SIERA Workshop on The Pillars of Horizon2020
Bouquet: SIERA Workshop on The Pillars of Horizon2020
 
Jarrar: Sparql Project
Jarrar: Sparql ProjectJarrar: Sparql Project
Jarrar: Sparql Project
 

Recently uploaded

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
Earley Information Science
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
giselly40
 

Recently uploaded (20)

The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 

Schema Optimization and Equivalence

  • 1. 1Jarrar © 2015 Schema Equivalence and Optimization Reference: Mustafa Jarrar: Lecture Notes on Schema Equivalence and Optimization in ORM Birzeit University, Palestine, 2015 Mustafa Jarrar Birzeit University, Palestine mjarrar@birzeit.edu www.jarrar.info
  • 2. 2Jarrar © 2015 Watch this lecture and download the slides from http://jarrar-courses.blogspot.com/2015/01/dataandbusinessprocessmodelling.html Some diagrams in this lecture are based on [1] Keywords: Schema, Schema Engineering, constraints, Schema Equivalence, Schema Optimization, constraints, Cardinality, multiplicity, Rules, Business Rules, Business logic derivation rules, integrity constraints Slides And Videos - Download, Watch, Interact
  • 3. 3Jarrar © 2015 Conceptual Schema Design Steps 1. From examples to elementary facts 2. Draw fact types and apply population check 3. Combine entity types 4. Add uniqueness constraints 5. Add mandatory constraints 6. Add subtype relations and other constraints 7. Final checks, & schema engineering issues
  • 4. 4Jarrar © 2015 Schema Equivalence and Optimization • It is not surprising that people often come up with different ways (i.e., different conceptual models) of describing the same reality. • Two conceptual schemas are equivalent if and only if whatever UoD state can be modeled in one can also be modeled in the other. • What is the difference between these two schemes: The act of reshaping two equivalent schemes like this is said to be a conceptual schema transformation. Based on [1]
  • 5. 5Jarrar © 2015 Schema Equivalence and Optimization • Skills of schema transformations helps you to see what different design choices are possible. • Moreover, if two independently developed schemas are to be either fully or partly integrated, we often need to resolve the differences in the ways that each schema models common UoD features. • To do this, we need to know whether one representation can be transformed into the other, and if so, how. • Another use of conceptual schema transformations is to reshape the original conceptual schema into one that maps directly to a more efficient implementation, or to more conceptually elegant schema. • This process is known as conceptual schema optimization. There are two class of schema transformations: Predicate Specialization, and Predicate Generalization
  • 6. 6Jarrar © 2015 Predicate Specialization and Generalization We generalize smoking and drinking into indulging in a vice, where vice has two specific cases. If we transform in the opposite direction, we specialize indulging in a vice into two predicates, one for each case. Based on [1] If two or more predicates may be thought of as special cases of a more general predicate, then we may replace them by the more general predicate, so long as the original distinction can be preserved in some way.
  • 7. 7Jarrar © 2015 Predicate Specialization and Generalization Because there are exactly three kinds of medals, the ternary may be specialized into three binaries, one for each medal kind, Where m1, and each Si corresponds to R where B = bi Theory: R may be specialized into S1..Sn by absorbing B. If two or more predicates may be thought of as special cases of a more general predicate, then we may replace them by the more general predicate, so long as the original distinction can be preserved in some way. ? Based on [1]
  • 8. 8Jarrar © 2015 Predicate Specialization and Generalization Each Si corresponds to R where B = bi The previous theorem always holds, but any constraint added to one of the schemas must be translated into an equivalent, additional constraint on the other schema. The UC on the left is equivalent to the UCs on the right.  If a UC in R spans a combination of B’s role and other roles, a UC spans the specialization of these other roles in S1,..,Sn, and conversely. Based on [1]
  • 9. 9Jarrar © 2015 Predicate Specialization and Generalization The UC on the left is equivalent to the exclusion constraint on the right. The UC on the left is equivalent to the exclusion constraint on the right. ? ? Where m1, and each Si corresponds to R where B = bi The UC on the left is equivalent to the exclusion constraint on the right. If a UC spans all roles of R except for B’s role, then S1 .. Sn are mutually exclusive, and conversely. Based on [1]
  • 10. 10Jarrar © 2015 ? Predicate Specialization and Generalization if any medal results are recorded for a country, all three medal results (gold, silver, and bronze) are required. To express, we add an equality constraint between the medal winning roles played by Country.  If R is a ternary with a UC spanning just B’s role and one other role, then adding a frequency constraint of n to this other role is equivalent to adding an equality constraint over the specialized versions of that role. Based on [1]
  • 11. 11Jarrar © 2015 ? Predicate Specialization and Generalization The impact of adding mandatory role and frequency constraints.  If A’s role (or role disjunction) in R is mandatory, then the disjunction of its specialized roles is mandatory, and conversely (1 i  m).  If R is a ternary with a UC spanning just B’s role and one other role, then adding a mandatory role constraint and frequency constraint of n (the number of possible values for B) to this other role is equivalent to making each specialized version of that role mandatory. Each S corresponds to R where B = bi Based on [1]
  • 12. 12Jarrar © 2015 ? Other Cases and Examples The drives predicate is specialized by absorbing Status. Each car in the rally has two drivers (a main driver and a backup driver), and each person drives exactly one car. Based on [1]
  • 13. 13Jarrar © 2015 Other Cases and Examples  Corollary 1: If s roles are mandatory in the left-hand schema, the disjunction of s roles in the right-hand schema is mandatory, and conversely.  Corollary 2: If an external UC spans the roles of and in the left-hand schema, then a UC applies to each of s roles in the right-hand schema, and conversely.  Corollary 3: If s role in the left-hand schema is mandatory, then each of s roles in the right-hand schema is mandatory, and conversely.  Corollary 4: An equality constraint over s roles in the RHS is equivalent to a frequency constraint of on s role in the left-hand schema; this constraint is strengthened to if a UC exists on each of s roles in the right-hand schema. Each Si corresponds to R where T is restricted to B = bi Theory: R may be specialized into S1..Sn by absorbing B. Based on [1]
  • 14. 14Jarrar © 2015 Other Cases and Examples Can the predicate be specialized? • Transforming from the original schema to one of those strengthens the schema by adding information. • Transforming in the opposite direction weakens the schema by losing information. Any such transformations that add or lose information should be the result of conscious decisions that are acceptable to the client (for which the business domain is being modeled). ? ? Based on [1]
  • 15. 15Jarrar © 2015 Other Cases and Examples Each Si corresponds to one instance of R Corollary 1:If an equality constraint applies over s roles in the left-hand schema, then the frequency constraint in the right-hand schema is strengthened to , and conversely. Corollary 2: Adding a UC to role in the right-hand schema is equivalent in the left- hand schema to adding UCs to s roles (making the S 1:1) and strengthening the exclusion constraint to an exclusion constraint over s roles. Theory: The left-hand schema implies the right-hand schema. Based on [1]
  • 16. 16Jarrar © 2015 References 1. Terry Halpin, Tony Morgan: Information Modeling and Relational Databases, Second Edition. 2nd Edition. The Morgan Kaufmann Series in Data Management Systems. ISBN: 0123735688 2. Mustafa Jarrar and Stijn Heymans: Towards Pattern-Based Reasoning For Friendly Ontology Debugging. Journal of Artificial Intelligence Tools. Volume 17. No.4. World Scientific Publishing. Aug 2008. 3. Mustafa Jarrar: Mapping ORM Into The SHOIN/OWL Description Logic- Towards A Methodological And Expressive Graphical Notation For Ontology Engineering. In OTM 2007 workshops: Proceedings of the International Workshop on Object-Role Modeling (ORM'07). Pages (729-741), LNCS 4805, Springer. ISBN: 9783540768890. Portogal. November, 2007 4. Mustafa Jarrar: Towards Automated Reasoning On ORM Schemes. -Mapping ORM Into The DLR_idf Description Logic. In proceedings of the 26th International Conference on Conceptual Modeling (ER 2007). Pages (181-197). LNCS 4801, Springer. Auckland, New Zealand. ISBN 9783540755623. November 2007 5. Mustafa Jarrar and Stijn Heymans: Unsatisfiability Reasoning In ORM Conceptual Schemes. In Current Trends in Database Technology - EDBT 2006: Proceeding of the IFIP-2.6 International Conference on Semantics of a Networked. Pages (517-534). LNCS 4254, Springer. Munich, Germany. ISBN: 3540467882. March 2006. 6. Mustafa Jarrar, Maria Keet, and Paolo Dongilli: Multilingual Verbalization Of ORM Conceptual Models And Axiomatized Ontologies. Technical eport. STARLab, Vrije Universiteit Brussel, Feb 2006. 7. Mustafa Jarrar: Modularization And Automatic Composition Of Object-Role Modeling (ORM) Schemes. OTM 2005 Workshops: Proceedings of the Object-Role Modeling (ORM'05). Pages (613- 625). LNCS 3762, Springer. Larnaca, Cyprus. ISBN: 3540297391. November 2005.