We think you have liked this presentation. If you wish to download it, please recommend it to your friends in any social system. Share buttons are a little bit lower. Thank you!
Presentation is loading. Please wait.
Published byLucas Banwell
Modified over 2 years ago
1 ©Amit Mitra & Amar Gupta RELATIONSHIPS Reading Assignment Supplementary module 5
2 ©Amit Mitra & Amar Gupta A RELATIONSHIP IS AN INTERACTION BETWEEN OBJECTS productcustomerretailer is sold to..buys thru... productcustomerretailer XX CARTESIAN PRODUCT product 1customer 1retailer 1 product 1customer 1retailer 2 product 1customer 2retailer 1 product 1customer 2retailer 2 product 2customer 1retailer 1 …... Relationship Class Relationship Instances Order of relationship = No. of classes involved Degree of relationship = No. Of object instances involved EXAMPLE OF A RELATIONSHIPS BETWEEN OBJECTS (3 rd order, 3 rd degree relationship)
3 ©Amit Mitra & Amar Gupta object object 1 object 2 Instance of relationship OBJECT CLASS A object 1 object 2 Instances of relationship inverse of relationship OBJECT CLASS B OBJECT CLASS A OBJECT CLASS B Instance of inverse of relationship object 4 object 1 Instances of relationship object 2 OBJECT CLASS B OBJECT CLASS A Instance of inverse of relationship BIJECTIVE RELATIONSHIP (1 to 1) INJECTIVE RELATIONSHIP (1 to many) SURJECTIVE RELATIONSHIP (many to 1) M A N Y to M A N Y object 3 Instance of inverse of relationship CAREFULL!!! (2 nd order, 2 nd degree relationship) Cardinality or Cardinality Ratios may be constrained –Usually cardinality ratios in both directions are specified
4 ©Amit Mitra & Amar Gupta PERSON ORGANIZATION many to manymany to many many to many resolution PERSON ORGANIZATION Person employed In Organization 0 to many Employ 0 to many may be employed by 0 or more [employ 0 or more] MANY-TO-MANY RESOLUTION
5 ©Amit Mitra & Amar Gupta object instance 1 OBJECT CLASS Object instance 2 Instance of reflexive relationship Instance of irreflexive relationship RECURSIVE RELATIONSHIPS (homogenous facts) Idempotent relationship must loop back to the same object instance (1 st order, 1 st degree relationship) (1 st order, 2 nd degree relationship) (1 st order relationships, degree unknown) Symmetrical: Inverse must be same as relationship –Eg: Person is relative of Person Asymmetrical: Inverse cannot be same as relationship –Eg: Person is parent of Person –Cartesian Product Antisymmetrical (for reflexive relationships only): Inverse cannot be same as relationship unless it loops back to the same object instance, in which case the relationship must be the same in both directions. –Eg: Arithmetic subtraction –Poymorphism of patterns of separation SYMMETRY Subtype of
6 ©Amit Mitra & Amar Gupta Instance Class OBJECT Instance Class OBJECT Class Instance OBJECT INFORMATION RELATIONSHIP RECURSIVE IRREFLEXIVE Polymorphisms of Relationships NON-RECURSIVE
7 ©Amit Mitra & Amar Gupta Recursive Relationship Subtype of Idempotent Relationship Subtype of Reflexive Relationship Asymmetrical Relationship Subtype of Antisymmetrical Relationship Symmetrical Subset of subset of Exhaustive partition Subtype of Symmetrical Relationship Eg: involve Locate relative of Eg: Part of parent of Polymorphisms of Relationships (2) Eg: Help in Person help Person Eg: Self Help Idempotent relationship will always be symmetrical Irreflexive Relationship Non-recursive Relationship Polymorphism of Polymorphism of Subtype of (inherited from recursive relationship) Eg: Civil War Eg: Distinct Parts of the nation at war with itself Where relationships begin
8 ©Amit Mitra & Amar Gupta HIGHER ORDER RELATIONSHIP is sold to..buys thru... productcustomer retailer possible ways in which minimum and maximum occurrence (cardinality) constraints may be defined for a three-way relationship m..n is sold to..buys thru... productcustomer retailer m..n Instances of this combination must be unique, otherwise it will not be an object class The symmetry of each combination must be considered The length of the tuple is determined by its degree Combinations may be recursive Cardinality of polymorphisms of a relationship cannot be less constrained than its parent (it may be more constrained) Cardinality = Nil is the same as the exclusion constraint
9 ©Amit Mitra & Amar Gupta Mutually inclusive and exclusive relationships Mutual Exclusion If one relationship exists, the other(s) cannot Mutual Inclusion If any one relationship exists, the other(s) also must Subsetting If one relationship exists, the other must, but not vice-versa A subtype must stay within the lawful state space of its parent
10 ©Amit Mitra & Amar Gupta Some additional information on cardinality constraints Instance level constraints –Eg: upper bound on cardinality ratio of Person lives in House –Each house might have a different capacity Upper bound constraints on cardinality of relationships creates the concept of Capacity Instance of is a subtype of the subtyping relationship constrained to a single member Instance level cardinality (or capacity) constraints cannot violate corresponding class level constraints The lower bound of the Cardinality (and enumeration) domain is nil –Cardinality ratios map to the domain of cardinality quotients (obviously!) Lower bound = nil = Optional relationship Lower bound = 1 = Mandatory relationship Often upper bound may be many –Many is a finite value: Open bound, delimited by infinity (example of a finite, bounded/delimited pattern, in which the delimiter is infinite) –These constraints are inherited by all counts Person Home Each person may own only 1 home own 0..1 Each person must own 1 home and no more 1..1 Each person must own 1, and may own more, homes 1..M 0..M [Each home may be owned by 1 or more persons]
11 ©Amit Mitra & Amar Gupta Relationships may be compositions of objects An object class may glue relationships end-to-end Together, two relationships imply the third Live in Explicitly asserting all three would denormalize and replicate information Structure also adds information to a collection: the entire composition considered together is a polymorphism of Live in Could have been a complex network of objects and relationships (remember the metamodel of Pattern) Which objects join which? In a network of associations how do we distinguish objects from relationships? The truth is that it does not matter; they are all objects and only the overall structure of association matters This is the essence of the pattern
12 ©Amit Mitra & Amar Gupta Polymorphisms of Relationships
13 ©Amit Mitra & Amar Gupta Polymorphisms of Relationships OBJECT RELATIONSHIP OBJECT PROCESS RECURSIVE
14 ©Amit Mitra & Amar Gupta Polymorphisms of Relationships
15 ©Amit Mitra & Amar Gupta RELATIONSHIP RECURSIVE Polymorphisms of Relationships OBJECT
16 ©Amit Mitra & Amar Gupta RELATIONSHIP RECURSIVE Polymorphisms of Relationships OBJECT
17 ©Amit Mitra & Amar Gupta Cardinality ratios of compositions 1.If any relationship in a chain of relationships in a composition is optional, the composite relationship will be optional 2.1 to 1 relationships in tandem result in a composite 1 to 1 relationship 3.A 1 to 1 relationship in tandem with a 1 to many relationship results in a composite 1 to many relationship 4.A Many to 1 relationship in tandem with a 1 to 1 relationship results in a composite many to 1 relationship 5.A 1 to 1 relationship in tandem with a many to 1 relationship results in a composite many to 1 relationship 6.A Many to 1 relationship in tandem with a Many to 1 relationship results in a composite many to 1 relationship 7.A 1 to Many relationship in tandem with a 1 to Many relationship may result in a composite many to many relationship 8.A Many to 1 relationship in tandem with a 1 to Many relationship results in a composite many to many relationship
18 ©Amit Mitra & Amar Gupta Mutability The Principle of Parsimony (of information) –Specify only what you must Basis for innovation!! –Liskovs principle A subtype may always substitute its parent in a rule, but not necessarily vice-versa (It must be possible to substitute any object instance of a subclass for any object instance of a superclass without affecting the semantics of a program written in terms of the superclass) MODIFICATION: It is possible to substitute any Pattern with its subclass without affecting the semantics of the pattern Apartment Living Space ApartmentHouse Subtype of object The concept of the essence of a pattern and the meaning of Essential emerge thus Eg: Is a check a paper document or a payment? What are the essential parts of a composition? What may we remove/change without changing the meaning of the composition? A car without its radio is still a car, but is a car without wheels still a car? What about a car without its chassis? What is the essence of the meaning of house: A house with a roof only, a roof and outside walls, or also inside walls, all of these? Larger scope and complexity require more abstraction The Universal Perspective must be abstract The goal of a process is its product A network like the Universal Perspective provides many paths to a goal Changing the essential meaning of a goal is a paradigm shift Apply the Principle of Parsimony with the Universal Perspective to help innovate or to automate innovation (subtypes of universal meanings may substitute each other as resources and products of processes
19 ©Amit Mitra & Amar Gupta TRANSITIVITY PERSONHOUSE WALL Owns 0 or more [owned by 0 or more] Consists of 1 or more [part of 0 or 1] TRANSITIVE Owns 0 or more [owned by 0 or more] (automatically implied) Transitive relationship Transitivity, or the lack of it has several flavors
20 ©Amit Mitra & Amar Gupta 2 nd Degree intransitivity Transitivity Transitive: Together, a set of relationships imply another One relationship must be eliminated to normalize knowledge The degree of transitivity is the max. number of relationships in a transitive chain If the set of relationships is a set of processes, the last process should be eliminated Live in Transitive triad Intransitive: A relationship is barred if a set of relationships exists Atransitive:No inclusion or exclusion constraints between relationships Is friend of transitive, atransitive or intransitive? Person Parent of Person Parent of DISSALLOWED (Degree can be infinite) (Eg: The transitivity of Ancestor of)
21 ©Amit Mitra & Amar Gupta COMPOSITION x Subtype of Transitive Composition Intransitive Composition Subtype of Tansitivity (2) Transitivity is about compositions A Transitive relationship may be symmetrical or not –Eg: Relative of (symmetrical) vs. Ancestor of (asymmetrical) An intransitive relationship has more information than a transitive relationship –It will always be asymmetrical Eg: Parent of May be symmetrical (eg: relative of) Or Asymmetrical (eg: ancestor of) May only be asymmetrical (eg: parent of) Increasinf information
22 ©Amit Mitra & Amar Gupta Quantitative (arithmetic) Rule Expression Nominal Rule Expression Ordinal Rule Expression Subtype of Inherit Classification information; Add ranking information Inherit classification and ranking information; Add quantitative information Quantitative (arithmetic) Rule Expression Nominal Rule Expression Ordinal Rule Expression Subtype of Ranking operations Quantitative operations (includes arithmetic operations, ranges, inequalities, equalities formulae etc) Boolean operations (including existence constraints like cardinality constraints) OCCURRENCE AND EXISTENCE TO ARITHMETIC AND EQUATIONS
23 ©Amit Mitra & Amar Gupta PRODUCT SALE PRODUCT constituent of relationship CUSTOMER constituent of relationship = Relationship PLACE constituent of relationship 3 rd ORDER RELATIONSHIP sell Sell to Sell at STATE SPACE OF A RELATIONSHIP
24 ©Amit Mitra & Amar Gupta AN INSTANCE OF A 3 RD ORDER MANIFOLD SHOWN IN THREE SPACE products places customers a particular product sold to a particular customer at a particular place An instance of an ordinary binary relationship would be a point in two-space Each item, product, place and customer may normalize different properties (like product feature, geographical footprint and customer age respectively) –Each axis may unfold into a state space, each axis of which could in turn summarize a state space and so on
25 ©Amit Mitra & Amar Gupta products places customers a particular product sold to a particular customer at a particular place A category is a region with various points inside it Ovelapping categories Mutually Exclusive, or Non- overlapping categories Two dimensional region CATEGORIES IN THREE SPACE
26 ©Amit Mitra & Amar Gupta BOREL SET Sale price products places = INSTANCES OF BOREL SETS ANOTHER INSTANCE OF A BOREL SET A BOREL SET is the set of all possible regions in that space –In nominal state space it will be the set of all possible subsets –If we consider the All value, the Borel object will include all intervals in state spaces of supertypes and subtypes
27 ©Amit Mitra & Amar Gupta EXAMPLES OF 3 RD ORDER MARKET SEGMENT BOREL SET IN THREE SPACE products places customers a particular product sold to a particular customer at a particular place A category is a region with various points inside it Ovelapping categories Mutually Exclusive, or Non- overlapping categories category id productplacecustomer seg 1ALLNYCGE seg 1ALLNYCGM seg 2ALLNYCGM seg 2ALLNYCToyota More categories The origin may represent shared values like All For spaces composed of axes that have a Nil value, such as ratio scaled spaces, the origin might represent the shared Nil value
28 ©Amit Mitra & Amar Gupta BOREL OBJECT EXAMPLE Note: At least one relationship, (or combination of relationships), with constituent objects -- product,customer,sales channel -- must exist at each moment in time PRODUCT SALE PRODUCT constituent of relationship CUSTOMER constituent of relationship SALES CHANNEL constituent of relationship MARKET SEGMENT many to manymany to many PRODUCT SALE MARKET SEGMENT PRODUCT SALE IN MARKET SEGMENT 1 to many 0 to many many to many resolution = Relationship = Borel Object = Resolution Object
29 ©Amit Mitra & Amar Gupta (At least 1 relationship to a constituent entity must exist at any given time) RELATIONSHIP (ASSOCIATIVE OBJECT) OBJECT constituent of Borel Object OBJECT constituent of manifold OBJECT constituent of manifold BOREL OBJECT OF RELATIONSHIP many to many RELATIONSHIP BOREL OBJECT RESOLUTION OBJECT 1 to many 0 to many = Relationship Degree of combination = 1 or more Eg.: Product Transfer/usage agreement Eg.: Market segment resolution object name IN BOREL OBJECT RULES Every relationship implies a corresponding Borel Object
30 ©Amit Mitra & Amar Gupta Quantitative (arithmetic) Rule Expression Nominal Rule Expression Ordinal Rule Expression Subtype of Ranking operations Quantitative operations (includes arithmetic operations) Boolean operations (including existence constraints)
31 ©Amit Mitra & Amar Gupta EXCLUSION CONSTRAINT ON RELATIONSHIPS INSURANCE COVERAGE ASSET PERSON cover MUTUALLY EXCLUSIVE RELATIONSHIPS X
32 ©Amit Mitra & Amar Gupta EQUALITY CONSTRAINT ON RELATIONSHIPS PERSON CAR INSURANCE own MUTUALLY INCLUSIVE RELATIONSHIPS
33 ©Amit Mitra & Amar Gupta SUBSETTING CONSTRAINT ON RELATIONSHIPS PERSON CAR WHEEL owns SUBSET OF owns ONE RELATIONSHIP IMPLIES THE OTHER, BUT NOT VICE-VERSA
34 ©Amit Mitra & Amar Gupta Cardinality = 0 or more bind.. Insurance Agreement Owner Insurer Own.. Person Wheel Car Cardinality Cannot exceed cover.. Degree = 1 Person Asset Insurance Coverage cover.. Insurance Coverage Person Asset m..n
35 ©Amit Mitra & Amar Gupta Cardinality = 0 or more own.. Person car Car Insurance Own.. Person Wheel Car Cardinality Cannot exceed cover.. Degree = 1 Person Asset Insurance Coverage Degree = 2
36 ©Amit Mitra & Amar Gupta cover Person Asset Degree = 1 cover Insurance Coverage bind Cardinality = 0 or more bind Insurance Agreement Owner Insurer owns Cardinality cannot exceed cardinality of Person owns Wheel owns Person Car Wheel Degree = 2
37 ©Amit Mitra & Amar Gupta cover Person Asset Degree = 1 cover Insurance Coverage own Cardinality = 0 or more own Person Car Insurance owns Cardinality cannot exceed cardinality of Person owns Wheel owns Person Car Wheel Degree = 2
38 ©Amit Mitra & Amar Gupta
1 ©Amit Mitra & Amar Gupta AGGREGATION Reading Assignment Supplementary module 5 Object Aggregation.
Fundamentals, Design, and Implementation, 9/e Chapter 2 Entity-Relationship Data Modeling: Tools and Techniques.
PSSA Preparation. Question 1(no calculator) D Question 2 (no calculator)
Model and Relationships 6 M 1 M M M M M M M M M M M M M M M M
1 © Amit Mitra & Amar Gupta Constraints Constraints shape the Lawful State Space of an object –Create polymorphisms Constraints on value –Homework: Read.
Enhanced/Extended Relationship-Diagram Indra Budi
Chapter 11 Membrane Structure Essential Cell Biology Third Edition Copyright © Garland Science 2010.
Jane Reid, BSc/IT DB, QMUL, 7/1/02 1 Lecture plan Outline of DB design process Entity-relationship model –Entities and attributes –Relationships.
Copyright © 2013, 2009, 2005 Pearson Education, Inc. 1 1 Equations and Inequalities Copyright © 2013, 2009, 2005 Pearson Education, Inc.
1 Prof. Valter Bezerra Dantas
3 Entity Relationship (E-R) Modeling. 3 2 In this lecture, you will learn: What a conceptual model is and what its purpose is The difference between internal.
Time for a BREAK! You have 45 Minutes. Time Left 44.
Growth of function : 1 Chapter 3. Growth of function.
Chapter 10 Analyzing Genes and Genomes Essential Cell Biology Third Edition Copyright © Garland Science 2010.
1 © Amit Mitra & Amar Gupta FORMATS, SYMBOLS & UNITS OF MEASURE Continuation of our discussion of Pattern and its semantics.
©Brooks/Cole, 2001 Chapter 12 Derived Types-- Enumerated, Structure and Union.
Basel-ICU-Journal Challenge18/20/ Basel-ICU-Journal Challenge8/20/2014.
UNITED NATIONS Shipment Details Report – January 2006.
by D. Fisher (2 + 1) + 4 = 2 + (1 + 4) Associative Property of Addition 1.
Thursday, February 28 Sensitivity Analysis 2 – More on pricing out – Effects on final tableaus Handouts: Lecture Notes.
Cognitive Radio Communications and Networks: Principles and Practice By A. M. Wyglinski, M. Nekovee, Y. T. Hou (Elsevier, December 2009) 1 Chapter 12 Cross-Layer.
Chapter 15 Intracellular Compartments and Transport Essential Cell Biology Third Edition Copyright © Garland Science 2010.
Chapter 1: Expressions, Equations, & Inequalities Sections 1.3 –
C Copyright © 2005, Oracle. All rights reserved. Practice Solutions.
1 Complex Numbers Chapter Previously, when we encountered an equation like x = 0, we said that there was no solution since solving for x yielded.
1 Mathematical Preliminaries. 2 Sets Functions Relations Graphs Proof Techniques.
1 3.6 Support Vector Machines K. M. Koo. 2 Goal of SVM Find Maximum Margin goal find a separating hyperplane with maximum margin margin minimum distance.
and 5. and and
Copyright © 2011, Elsevier Inc. All rights reserved. Chapter 2 Author: Julia Richards and R. Scott Hawley.
Chapter 14 Energy Generation in Mitochondria and Chlorplasts Essential Cell Biology Third Edition Copyright © Garland Science 2010.
Chapter 12 Membrane Transport Essential Cell Biology Third Edition Copyright © Garland Science 2010.
Splines I – Curves and Properties based on: Michael Gleicher Curves, chapter 15 in Fundamentals of Computer Graphics, 3 rd ed. (Shirley & Marschner) Slides.
Copyright © Cengage Learning. All rights reserved. 1.3 Graphs of Functions.
Copyright © 2003 Pearson Education, Inc. Slide 1 Computer Systems Organization & Architecture Chapters 8-12 John D. Carpinelli.
Adding Up In Chunks. Category 1 Adding multiples of ten to any number.
+ Database Design: Conceptual Model to Logical Model (ER diagrams to tables)
Properties of Real Numbers CommutativeAssociativeDistributive Identity + × Inverse + ×
1 6.4 Best Approximation; Least Squares. 2 Theorem Best Approximation Theorem If W is a finite-dimensional subspace of an inner product space V,
REVIEW: Arthropod ID. 1. Name the subphylum. 2. Name the subphylum. 3. Name the order.
Chapter 8: Recurrence Relations Discrete Mathematical Structures: Theory and Applications.
Petersons Practice AP Exam Cengage Learning Infotrack Database.
Copyright © 2001 by Houghton Mifflin Company. All rights reserved. 1 Economics THIRD EDITION By John B. Taylor Stanford University.
STATISTICS Random Variables and Distribution Functions Professor Ke-Sheng Cheng Department of Bioenvironmental Systems Engineering National Taiwan University.
1 © Prentice Hall, 2002 Chapter 4: The Enhanced E-R Model and Business Rules Modern Database Management 6 th Edition Jeffrey A. Hoffer, Mary B. Prescott,
1 Programming Language Concepts Chapter 3 Describing Syntax and Semantics.
© 2005 by Prentice Hall Chapter 9 Structuring System Data Requirements Modern Systems Analysis and Design Fourth Edition Jeffrey A. Hoffer Joey F. George.
Copyright © 2011, Elsevier Inc. All rights reserved. Chapter 6 Author: Julia Richards and R. Scott Hawley.
Copyright © 2009 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Solving Systems of Linear Equations Graphically and Numerically Basic Concepts.
1 McGill University Department of Civil Engineering and Applied Mechanics Montreal, Quebec, Canada.
A Guide to MySQL 4. 2 Objectives Retrieve data from a database using SQL commands Use compound conditions in queries Use computed columns in queries Use.
© 2017 SlidePlayer.com Inc. All rights reserved.