1 ©Amit Mitra & Amar Gupta RELATIONSHIPS Reading Assignment Supplementary module 5.

Slides:



Advertisements
Similar presentations
Solving Systems of Linear Equations Graphically and Numerically
Advertisements

Mathematical Preliminaries
3.6 Support Vector Machines
Chapter 6: Entity-Relationship Model
한양대학교 정보보호 및 알고리즘 연구실 이재준 담당교수님 : 박희진 교수님
Entity Relationship (E-R) Modeling
Chapter 9 Structuring System Data Requirements
© 2008 Pearson Addison Wesley. All rights reserved Chapter Seven Costs.
Copyright © 2003 Pearson Education, Inc. Slide 1 Computer Systems Organization & Architecture Chapters 8-12 John D. Carpinelli.
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.
Copyright © 2011, Elsevier Inc. All rights reserved. Chapter 6 Author: Julia Richards and R. Scott Hawley.
Author: Julia Richards and R. Scott Hawley
STATISTICS Random Variables and Distribution Functions
Properties Use, share, or modify this drill on mathematic properties. There is too much material for a single class, so you’ll have to select for your.
Copyright: SIPC From Ontology to Data Model: Choices and Design Decisions Matthew West Reference Data Architecture and Standards Manager Shell International.
UNITED NATIONS Shipment Details Report – January 2006.
1 RA I Sub-Regional Training Seminar on CLIMAT&CLIMAT TEMP Reporting Casablanca, Morocco, 20 – 22 December 2005 Status of observing programmes in RA I.
DRDP Measure Slides by Domain
Properties of Real Numbers CommutativeAssociativeDistributive Identity + × Inverse + ×
Exit a Customer Chapter 8. Exit a Customer 8-2 Objectives Perform exit summary process consisting of the following steps: Review service records Close.
Conceptual / semantic modelling
Lecture 2 ANALYSIS OF VARIANCE: AN INTRODUCTION
Points, Vectors, Lines, Spheres and Matrices
Programming Language Concepts
1 Investments Sid Glandon, DBA, CPA Associate Professor of Accounting The University of Texas at El Paso.
REVIEW: Arthropod ID. 1. Name the subphylum. 2. Name the subphylum. 3. Name the order.
Mathematics for Economics Beatrice Venturi 1 Economics Faculty CONTINUOUS TIME: LINEAR DIFFERENTIAL EQUATIONS Economic Applications LESSON 2 prof. Beatrice.
Chair of Software Engineering Einführung in die Programmierung Introduction to Programming Prof. Dr. Bertrand Meyer Exercise Session 5.
Copyright © 2001 by Houghton Mifflin Company. All rights reserved. 1 Economics THIRD EDITION By John B. Taylor Stanford University.
EU market situation for eggs and poultry Management Committee 20 October 2011.
Database Design Process
Copyright © 2013, 2009, 2005 Pearson Education, Inc.
MAT 205 F08 Chapter 12 Complex Numbers.
LIAL HORNSBY SCHNEIDER
Outline Minimum Spanning Tree Maximal Flow Algorithm LP formulation 1.
M. Jamshed Khan, Dept of Economics, Edwardes College Peshawar 1.
Name Convolutional codes Tomashevich Victor. Name- 2 - Introduction Convolutional codes map information to code bits sequentially by convolving a sequence.
Functions, Graphs, and Limits
Basel-ICU-Journal Challenge18/20/ Basel-ICU-Journal Challenge8/20/2014.
Chapter 1: Expressions, Equations, & Inequalities
1..
the Entity-Relationship (ER) Model
CONTROL VISION Set-up. Step 1 Step 2 Step 3 Step 5 Step 4.
Adding Up In Chunks.
Lecture plan Outline of DB design process Entity-relationship model
Chapter 6: ER – Entity Relationship Diagram
1 Motion and Manipulation Configuration Space. Outline Motion Planning Configuration Space and Free Space Free Space Structure and Complexity.
Splines I – Curves and Properties
6.4 Best Approximation; Least Squares
Functional Dependencies and Normalization for Relational Databases
Model and Relationships 6 M 1 M M M M M M M M M M M M M M M M
Copyright © Cengage Learning. All rights reserved.
Chapter 2 Entity-Relationship Data Modeling: Tools and Techniques
Analyzing Genes and Genomes
1 Let’s Recapitulate. 2 Regular Languages DFAs NFAs Regular Expressions Regular Grammars.
©Brooks/Cole, 2001 Chapter 12 Derived Types-- Enumerated, Structure and Union.
McGraw-Hill/Irwin Copyright © 2007 by The McGraw-Hill Companies, Inc. All rights reserved. Chapter 12 View Design and Integration.
Essential Cell Biology
Intracellular Compartments and Transport
PSSA Preparation.
Essential Cell Biology
Multiple Regression and Model Building
Energy Generation in Mitochondria and Chlorplasts
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 McGill University Department of Civil Engineering and Applied Mechanics Montreal, Quebec, Canada.
Enhanced/Extended Relationship-Diagram
1 © Amit Mitra & Amar Gupta FORMATS, SYMBOLS & UNITS OF MEASURE Continuation of our discussion of Pattern and its semantics.
1 © Amit Mitra & Amar Gupta DOMAINS OF MEANING. 2 © Amit Mitra & Amar Gupta Parameter/ Feature Directional?SubtypesValid in (Space) AssociationYPatterns.
1 © Amit Mitra & Amar Gupta Constraints Constraints shape the Lawful State Space of an object –Create polymorphisms Constraints on value –Homework: Read.
1 ©Amit Mitra & Amar Gupta AGGREGATION Reading Assignment Supplementary module 5 Object Aggregation.
Presentation transcript:

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