data and process modelling
play

Data and Process Modelling 3. Object-Role Modeling - CSDP Step 3 - PowerPoint PPT Presentation

Data and Process Modelling 3. Object-Role Modeling - CSDP Step 3 Marco Montali KRDB Research Centre for Knowledge and Data Faculty of Computer Science Free University of Bozen-Bolzano A.Y. 2014/2015 Marco Montali (unibz) DPM - 3.CDSP-3 A.Y.


  1. Data and Process Modelling 3. Object-Role Modeling - CSDP Step 3 Marco Montali KRDB Research Centre for Knowledge and Data Faculty of Computer Science Free University of Bozen-Bolzano A.Y. 2014/2015 Marco Montali (unibz) DPM - 3.CDSP-3 A.Y. 2014/2015 1 / 10

  2. Trimming and Finding Derivations CSDP Step 3 Check for entity types that should be combined; note any arithmetic derivations. Refine the conceptual schema diagram answering to: 1. Can the same entity belong to two entity types? 2. Can entries of two different types be meaningfully compared? Do they have the same unit/dimension? 3. Is the same kind of information recorded for different entity types, and will you ever need to list the entities together for this information? 4. Is a fact type arithmetically derivable from others? Two possible actions: • Combination of entities type in a unique type; • Derivation rule to connect different (related) fact types. Marco Montali (unibz) DPM - 3.CDSP-3 A.Y. 2014/2015 2 / 10

  3. Partitioning of the UoD • UoD is partitioned into exclusive and exhaustive slices: ◮ Values; ◮ Entities. • Entities are again partitioned into primitive entity types: top-level entities never overlap. • Top-level entity: not subtype of another entity. • Subtyping: classification of objects into a more specific type. ◮ Will be discussed later on in the course. ◮ If object type A is subtype of object type B , then every instance of A is also instance of B (set inclusion). ◮ Represented by a solid arrow in ORM notation. ◮ Subtypes could overlap! • Top-level values could overlap. ◮ ‘Indiana’ is the name of a US state and the first name of a fictional character. • Subtyping of values is rarely used. Marco Montali (unibz) DPM - 3.CDSP-3 A.Y. 2014/2015 3 / 10

  4. Analysis of Separate Entities: Overlapping Instances starred MovieStar (.name) Movie MovieTitle (.nr) has Director (.name) was directed by Can the same entity belong to two entity types? • MovieStar and Director: top-level object types → non-overlapping → no Director can be a MovieStar. • Is this reasonable? Marco Montali (unibz) DPM - 3.CDSP-3 A.Y. 2014/2015 4 / 10

  5. Analysis of Separate Entities: Overlapping Instances starred MovieStar (.name) Movie MovieTitle (.nr) has Director (.name) was directed by Can the same entity belong to two entity types? • MovieStar and Director: top-level object types → non-overlapping → no Director can be a MovieStar. • Is this reasonable? • Consider now the case of Alfred Hitchcock Marco Montali (unibz) DPM - 3.CDSP-3 A.Y. 2014/2015 4 / 10

  6. Analysis of Separate Entities: Overlapping Instances starred MovieStar (.name) Movie MovieTitle (.nr) has Director (.name) was directed by Can the same entity belong to two entity types? • MovieStar and Director: top-level object types → non-overlapping → no Director can be a MovieStar. • Is this reasonable? • Consider now the case of Alfred Hitchcock → there is an overlap → combination of the object type. starred [movieStar] Movie MovieStar MovieTitle (.nr) (.name) has [director] was directed by Marco Montali (unibz) DPM - 3.CDSP-3 A.Y. 2014/2015 4 / 10

  7. Analysis of Separate Entities: Queries • Is the same kind of information recorded for different entity types? • Do we need to list the entities together for this information? is located in Corporation (VAT) is located in Cooperative Place (VAT) (.address) is located in Sole Trader (VAT) List all companies and their location. List all companies located in ‘. . . ’. Marco Montali (unibz) DPM - 3.CDSP-3 A.Y. 2014/2015 5 / 10

  8. Analysis of Separate Entities: Queries • Is the same kind of information recorded for different entity types? • Do we need to list the entities together for this information? is located in Corporation (VAT) is located in Cooperative Place CompanyStatus Company Place (VAT) (.address) (.name) (VAT) (.address) is located in has the form of is located in Sole Trader (VAT) List all companies and their location. List all companies located in ‘. . . ’. Marco Montali (unibz) DPM - 3.CDSP-3 A.Y. 2014/2015 5 / 10

  9. Analysis of Separate Entities: Units • Can entries of two different types be meaningfully compared? Do they have the same unit/dimension? • Entities with same unit-based reference mode can be meaningfully compared and combined. has WholesalePrice (EUR: Money) has Article RetailPrice (.code) (EUR: Money) has Markup (EUR: Money) Marco Montali (unibz) DPM - 3.CDSP-3 A.Y. 2014/2015 6 / 10

  10. Analysis of Separate Entities: Units • Can entries of two different types be meaningfully compared? Do they have the same unit/dimension? • Entities with same unit-based reference mode can be meaningfully compared and combined. has wholesales for WholesalePrice [wholesalePrice] (EUR: Money) retails for has Article RetailPrice Article MoneyAmount (.code) (EUR: Money) (.code) (EUR:) [retailPrice] has Markup [markup] (EUR: Money) has markup of Marco Montali (unibz) DPM - 3.CDSP-3 A.Y. 2014/2015 6 / 10

  11. Discovering Arithmetic Constraints Is a fact type arithmetically derivable from others? (making arithmetic constraints explicit) wholesales for [wholesalePrice] retails for Article MoneyAmount (.code) (EUR:) [retailPrice] [markup] has markup of Marco Montali (unibz) DPM - 3.CDSP-3 A.Y. 2014/2015 7 / 10

  12. Discovering Arithmetic Constraints Is a fact type arithmetically derivable from others? (making arithmetic constraints explicit) wholesales for [wholesalePrice] retails for Article MoneyAmount (.code) (EUR:) [retailPrice] [markup] has markup of markup = retailPrice − wholesalePrice Marco Montali (unibz) DPM - 3.CDSP-3 A.Y. 2014/2015 7 / 10

  13. Discovering Arithmetic Constraints Is a fact type arithmetically derivable from others? (making arithmetic constraints explicit) wholesales for [wholesalePrice] retails for Article MoneyAmount (.code) (EUR:) [retailPrice] [markup] has markup of markup = retailPrice − wholesalePrice • Derived type: type completely determined by other types. They must obey to a constraint . • May be conceptually relevant to keep derived types in the conceptual diagram. • Two decoration symbols for derived fact types: 1. derived ( ∗ ) vs semi-derived ( + ); 2. derived-on-query vs derived-on-update ( ∗ ). • Controlled textual annotation to represent the derivation constraint. Marco Montali (unibz) DPM - 3.CDSP-3 A.Y. 2014/2015 7 / 10

  14. Derivation vs Semi-Derivation wholesales for • Derivation: a commitment is taken on [wholesalePrice] how to interpret the constraint. retails for Article MoneyAmount ◮ Fixed inputs. (.code) (EUR:) [retailPrice] ◮ Fixed output (derived type). ◮ Typical case. [markup] ∗ has markup of Marco Montali (unibz) DPM - 3.CDSP-3 A.Y. 2014/2015 8 / 10

  15. Derivation vs Semi-Derivation wholesales for • Derivation: a commitment is taken on [wholesalePrice] how to interpret the constraint. retails for Article MoneyAmount ◮ Fixed inputs. (.code) (EUR:) [retailPrice] ◮ Fixed output (derived type). ◮ Typical case. [markup] ∗ has markup of • Constraints can be interpreted in different ways. markup = retailPrice − wholesalePrice wholesales for + [wholesalePrice] retailPrice = markup + wholesalePrice retails for + wholesalePrice = retailPrice − markup Article MoneyAmount (.code) (EUR:) [retailPrice] • What about keeping different possible derivation policies? [markup] has markup of + ◮ Semi-derivation: many uses of the same constraint to derive multiple types from each other. Marco Montali (unibz) DPM - 3.CDSP-3 A.Y. 2014/2015 8 / 10

  16. Derivation Rule Constraint telling how a fact type is derived from other fact types. • Context of the constraint. ◮ Globally identified in the constraint (e.g., Article ). ◮ Locally identified: dot notation (e.g., Article.markup ) vs of-notation (e.g., markup of Article ). • Attribute style: uses role names. • Relational style: uses predicate readings. Marco Montali (unibz) DPM - 3.CDSP-3 A.Y. 2014/2015 9 / 10

  17. Derivation Rule Constraint telling how a fact type is derived from other fact types. • Context of the constraint. ◮ Globally identified in the constraint (e.g., Article ). ◮ Locally identified: dot notation (e.g., Article.markup ) vs of-notation (e.g., markup of Article ). • Attribute style: uses role names. Example (attribute style) for each Article, markup = retailPrice - wholesalePrice • Relational style: uses predicate readings. Marco Montali (unibz) DPM - 3.CDSP-3 A.Y. 2014/2015 9 / 10

  18. Derivation Rule Constraint telling how a fact type is derived from other fact types. • Context of the constraint. ◮ Globally identified in the constraint (e.g., Article ). ◮ Locally identified: dot notation (e.g., Article.markup ) vs of-notation (e.g., markup of Article ). • Attribute style: uses role names. Example (attribute style) for each Article, markup = retailPrice - wholesalePrice • Relational style: uses predicate readings. Example (relational style) Article has markup of MoneyAmount iff Article retails for MoneyAmount 1 and Article wholesales for MoneyAmount 2 and MoneyAmount = MoneyAmount 1 - MoneyAmount 2 Marco Montali (unibz) DPM - 3.CDSP-3 A.Y. 2014/2015 9 / 10

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend