1 / 27

RELATIONSHIPS

RELATIONSHIPS. Reading Assignment Supplementary module 5. is sold to. buys thru. product 1. product 1. product 2. product 1. product 1. customer 1. customer 2. customer 1. customer 2. customer 1. retailer 2. retailer 1. retailer 1. retailer 2. retailer 1.

palani
Download Presentation

RELATIONSHIPS

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. RELATIONSHIPS Reading Assignment Supplementary module 5

  2. is sold to.. buys thru... product 1 product 1 product 2 product 1 product 1 customer 1 customer 2 customer 1 customer 2 customer 1 retailer 2 retailer 1 retailer 1 retailer 2 retailer 1 A RELATIONSHIP IS AN INTERACTION BETWEEN OBJECTS Order of relationship = No. of classes involved Degree of relationship = No. Of object instances involved product customer retailer EXAMPLE OF A RELATIONSHIPS BETWEEN OBJECTS Relationship Class (3rd order, 3rd degree relationship) CARTESIAN PRODUCT product X customer X retailer Relationship Instances …...

  3. OBJECT CLASS A OBJECT CLASS B CAREFULL!!! (2nd order, 2nd degree relationship) BIJECTIVE RELATIONSHIP (1 to 1) object Instance of relationship object 2 object 1 inverse of relationship OBJECT CLASS B OBJECT CLASS A INJECTIVE RELATIONSHIP (1 to many) Instance of inverse of relationship object 3 MANY to MANY Instances of relationship object 2 object 1 Instance of inverse of relationship • Cardinality or Cardinality Ratios may be constrained • Usually cardinality ratios in both directions are specified OBJECT CLASS A OBJECT CLASS B SURJECTIVE RELATIONSHIP (many to 1) Instance of inverse of relationship object 2 Instances of relationship object 4 object 1 Instance of inverse of relationship

  4. PERSON 0 to many Person employed In Organization Employ 0 to many ORGANIZATION MANY-TO-MANY RESOLUTION PERSON many to many may be employed by 0 or more [employ 0 or more] many to many resolution ORGANIZATION

  5. (1st order relationships, degree unknown) RECURSIVE RELATIONSHIPS (homogenous facts) OBJECT CLASS Instance of reflexive relationship Instance of irreflexive relationship Object instance 2 • 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 object instance 1 (1st order, 2nd degree relationship) Idempotent relationship must loop back to the same object instance (1st order, 1st degree relationship) SYMMETRY Subtype of

  6. Polymorphisms of Relationships Class Instance OBJECT OBJECT OBJECT INFORMATION Class Class Instance Instance RECURSIVE IRREFLEXIVE NON-RECURSIVE RELATIONSHIP

  7. Polymorphisms of Relationships (2) Polymorphism of Polymorphism of Non-recursive Relationship Irreflexive Relationship Subtype of (inherited from recursive relationship) Eg: Distinct Parts of the nation at war with itself Recursive Relationship • Eg: • involve • Locate • relative of Where relationships begin Symmetrical Relationship Subtype of Reflexive Relationship Eg: Civil War Idempotent relationship will always be symmetrical • Eg: • Part of • parent of Subtype of Subtype of Subtype of Eg: “Help” in Person help Person Eg: “Self Help” Asymmetrical Relationship Symmetrical Subset of subset of Idempotent Relationship Antisymmetrical Relationship Exhaustive partition

  8. HIGHER ORDER RELATIONSHIP retailer product customer retailer product customer m..n m..n is sold to.. buys thru... is sold to.. buys thru... m..n Instances of this combination must be unique, otherwise it will not be an object class m..n possible ways in which minimum and maximum occurrence (cardinality) constraints may be defined for a three-way relationship The length of the tuple is determined by its degree The symmetry of each combination must be considered 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. 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. 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 Each person may own only 1 home Home Person own 0..1 1..1 1..M 0..M Each person must own 1, and may own more, homes Each person must own 1 home and no more [Each home may be owned by 1 or more persons]

  11. 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 Relationships may be compositions of objects An object class may glue relationships end-to-end Could have been a complex network of objects and relationships (remember the metamodel of Pattern) Explicitly asserting all three would denormalize and replicate information Live in Together, two relationships imply the third • Structure also adds information to a collection: the entire composition considered together is a polymorphism of “Live in”

  12. Polymorphisms of Relationships

  13. Polymorphisms of Relationships RECURSIVE PROCESS RELATIONSHIP OBJECT OBJECT

  14. Polymorphisms of Relationships

  15. Cardinality ratios of compositions • If any relationship in a chain of relationships in a composition is optional, the composite relationship will be optional • 1 to 1 relationships in tandem result in a composite 1 to 1 relationship • A 1 to 1 relationship in tandem with a 1 to many relationship results in a composite 1 to many relationship • A Many to 1 relationship in tandem with a 1 to 1 relationship results in a composite many to 1 relationship • A 1 to 1 relationship in tandem with a many to 1 relationship results in a composite many to 1 relationship • A Many to 1 relationship in tandem with a Many to 1 relationship results in a composite many to 1 relationship • A 1 to Many relationship in tandem with a 1 to Many relationship may result in a composite many to many relationship • A Many to 1 relationship in tandem with a 1 to Many relationship results in a composite many to many relationship

  16. Subtype of Apartment House Mutability Living Space Apartment • The Principle of Parsimony (of information) • Specify only what you must • Basis for innovation!! • Liskov’s 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” • 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 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?

  17. HOUSE PERSON WALL TRANSITIVITY Owns 0 or more [owned by 0 or more] TRANSITIVE Consists of 1 or more [part of 0 or 1] Transitive relationship Owns 0 or more [owned by 0 or more] (automatically implied) Transitivity, or the lack of it has several flavors

  18. Person Person Person Live in Transitive triad 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 • Intransitive: A relationship is barred if a set of relationships exists 2nd Degree intransitivity DISSALLOWED Parent of (Degree can be infinite) (Eg: The transitivity of Ancestor of) Parent of Parent of • Atransitive:No inclusion or exclusion constraints between relationships • Is “friend of” transitive, atransitive or intransitive?

  19. 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 Subtype of Subtype of Transitive Composition Increasinf information x COMPOSITION Intransitive Composition May be symmetrical (eg: relative of) Or Asymmetrical (eg: ancestor of) Increasinf information May only be asymmetrical (eg: parent of)

  20. Nominal Rule Expression • Boolean operations • (including existence constraints like cardinality constraints) Subtype of Ordinal Rule Expression • Ranking operations Subtype of Quantitative (arithmetic) Rule Expression • Quantitative operations • (includes arithmetic operations, ranges, inequalities, equalities formulae etc) OCCURRENCE AND EXISTENCE TO ARITHMETIC AND EQUATIONS Nominal Rule Expression Inherit Classification information; Add ranking information Subtype of Ordinal Rule Expression Inherit classification and ranking information; Add quantitative information Subtype of Quantitative (arithmetic) Rule Expression

  21. STATE SPACE OF A RELATIONSHIP “constituent” of relationship PRODUCT PRODUCT SALE “constituent” of relationship PLACE = Relationship “constituent” of relationship sell 3rd ORDER RELATIONSHIP Sell to CUSTOMER Sell at

  22. AN INSTANCE OF A 3RD ORDER MANIFOLD SHOWN IN THREE SPACE • 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 a particular product sold to a particular customer at a particular place products customers places

  23. CATEGORIES IN THREE SPACE A category is a region with various points inside it products a particular product sold to a particular customer at a particular place customers Two dimensional region Mutually Exclusive, or Non- overlapping categories places Ovelapping categories

  24. 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 BOREL SET = INSTANCES OF BOREL SETS ANOTHER INSTANCE OF A BOREL SET products Sale price places

  25. category id product place customer seg 1 ALL NYC GE seg 1 ALL NYC GM seg 2 ALL NYC GM seg 2 ALL NYC Toyota EXAMPLES OF 3RD ORDER “MARKET SEGMENT” BOREL SET IN THREE SPACE A category is a region with various points inside it More categories products a particular product sold to a particular customer at a particular place customers 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 places Mutually Exclusive, or Non- overlapping categories Ovelapping categories

  26. “constituent” of relationship PRODUCT “constituent” of relationship SALES CHANNEL PRODUCT SALE = Relationship BOREL OBJECT EXAMPLE = Borel Object = Resolution Object “constituent” of relationship CUSTOMER many to many PRODUCT SALE 1 to many many to many resolution PRODUCT SALE IN MARKET SEGMENT 0 to many 0 to many MARKET SEGMENT MARKET SEGMENT 0 to many 0 to many Note: At least one relationship, (or combination of relationships), with constituent objects -- product,customer ,sales channel -- must exist at each moment in time

  27. “constituent” of Borel Object OBJECT “constituent” of manifold “constituent” of manifold OBJECT OBJECT = Relationship BOREL OBJECT RULES Eg.: Product Transfer/usage agreement RELATIONSHIP (ASSOCIATIVE OBJECT) many to many RELATIONSHIP 1 to many resolution object name <relationship name> IN <borel object name> RESOLUTION OBJECT Eg.: Market segment 0 to many 0 to many BOREL OBJECT OF RELATIONSHIP BOREL OBJECT 0 to many 0 to many Every relationship implies a corresponding Borel Object Degree of combination = 1 or more (At least 1 relationship to a constituent entity must exist at any given time)

More Related