Semantic Object Model z Define semantic objects z
Semantic Object Model z. Define semantic objects z. Use semantic object diagrams to build data models z. Define and illustrate the 7 basic types of semantic objects z. Compare semantic object and entity -relationship models
Data models as lenses
Defining Semantic Objects z. SOM <> OO DB processing! z. Objects: things to be represented z. Semantic: carry some meaning z. Attributes z. Identifiers
Semantic Object z“A named collection of attributes that sufficiently describes a distinct identity” ysufficient description means that the attributes represent all of the characteristics that users need ydistinct identity is something that users recognize as independent and separate z. Need not be physical
SO class vs. instance Physical? Distinct?
Attributes z. Types y. Simple y. Group y. Object z. Cardinality z. Domains y. Physical y. Semantic
Attribute Domains z. Description of an attribute’s possible values z. Physical Description ytype and length of data, constraints ycan be enumerated list yexample: Room. Number in dept. catalog? (How about the campus catalog? ) z. Semantic Description (logical) yfunction or purpose of the attribute yexample: Room. Number?
Let’s build an object z. E. g. , SOCCER-PLAYER? z. Properties? z. Instance? z. Name of semantic object instance? z. Some property domains. . . y. Physical? y. Semantic?
Semantic Object Diagram Object Name STUDENT Unique Identifier ID ID Non-unique Group Identifier Simple Attribute Object Attribute (or Object Link) Student. ID 1. 1 Student. Name First. Name 1. 1 Initial 0. 1 Last. Name 1. 1 Phone. Number 1. N DEPARTMENT Group Attribute 1. 1 What is the cardinality of an identifier? Cardinality (min. max)
Domain specifications z. Object specifications z. Domain specifications (a)
Paired attributes z. Object links are always paired z. No 1 -way object relationships
Semantic Object Views
Roundtable Exercise z. Form groups of 3 or 4; introduce yourself z. Label yourselves: 1, 2, 3. . . z. One sheet of paper and pencil per group z. In turn: yone person describes an object from the following report yanother person draws its diagram on the sheet (1 or 2 attributes) yrotate!
Form reverse-engineering Invoice Date: 08/15/98 FILIPPO MENCZER MCI Dumb Foreigner plan _______________________________________ Fees $6. 05 Long Distance Calls $15. 50 International Long Distance Calls $105. 45 _______________________________________ Total Current Charges $127. 00 International Long Distance _______________________________________ MCI Calling Plan Calls from 319 -555 -PROF: DATE TIME RATE TO/FROM NUMBER MIN AMOUNT ________________ _____ Jul 29 10: 44 A S TO SWTZRLAND 41274812900 7 9. 73 Aug 02 10: 39 A S TO ITALY 39336850757 4 6. 08 03 12: 52 P S TO ITALY 39068073418 19 28. 88 08 01: 07 P X TO ITALY 39336850757 19 28. 88 14 12: 48 P S TO SWTZRLAND 41274812900 12 16. 68 _______________________________________ Total International Long Distance $105. 45
Semantic Object Types z. Simple z. Composite z. Compound z. Hybrid z. Association z. Parent/Subtype z. Archetype/Version
Simple Objects z. Only single-valued, non-object attributes
Composite Objects z. One or more multi-valued, non-object (simple or group) attributes
Composite Objects Is this correct? z. Multi-valued groups can be nested
Compound Objects z. Have at least one object attribute z. Object attributes are always in pairs (here 1: 1)
Compound Objects z. Designer must find out about cardinalities of paired object properties z 4 types of compound objects (max card. ) 1 example of each?
Hybrid Objects z. Combination of objects of two types z. At least one multi-valued group attribute containing an object link
Hybrid vs. Compound Objects z. What’s wrong with this?
Hybrid Object Max Cardinality z. ITEM in one or more SALES-ORDERS? z. ITEM in one or more Line. Items within one SALES-ORDER?
Association Objects z. Relates two or more objects and stores data that pertains to the relationship z. Typical in resource assignments z. May or may not have its own ID
Parent/Subtype Objects z. Generalized object that logically contains one or more subcategories z. Avoid duplication & NULLs z. Subtype object attribute = IS-A attribute z. Inheritance y. Subtype object inherits parent attributes y. Parent acquires all attributes of its subtypes
Multiple Subtypes z. A parent may have more than one subtype z. For exclusivity, place subtype object attributes into a subtype group z. X. Y. Z y. X=min group cardinality y. Y=min attribute count y. Z=max attribute count
Nested Subtypes
Archetype/Version Objects z. Archetype object produces other objects that represent versions, releases, or editions of the archetype z. Version object ID contains archetype object link
E-R vs. SO Models z. Objects show context (boundaries) z. Objects contain multi-varied attributes z. Objects contain other objects z. Easier documentation (metadata)
E-R vs. SO Models zwhich makes better sense to you?
Form reverse-engineering Invoice Date: 08/15/98 FILIPPO/COLLEEN MENCZER Service Summary _______________________________________ MCI One Advantage plan fee (07/25/98 to 08/14/98) $3. 03 Long Distance $15. 50 International Long Distance $105. 45 Other Fees $6. 05 _______________________________________ Total Current Charges $130. 03 International Long Distance _______________________________________ MCI Calling Plan Calls from 319 -555 -PROF: DATE TIME RATE TO/FROM NUMBER MIN AMOUNT ________________ _____ Jul 29 10: 44 A S TO SWTZRLAND 41274812900 7 9. 73 Aug 02 10: 39 A S TO ITALY 39336850757 4 6. 08 03 12: 52 P S TO ITALY 39068073418 19 28. 88 08 01: 07 P X TO ITALY 39336850757 19 28. 88 14 12: 48 P S TO SWTZRLAND 41274812900 12 16. 68 _______________________________________ Total International Long Distance $105. 45
A data model from this form INVOICE ID Invoice. ID Date CUSTOMER 1. 1 Fee 0. N Call Date Time Number LONG-DISTANCE INTERNATIONAL Minutes Amount CUSTOMER ID Name ID Phone. Number Plan INVOICE 1. N INTERNATIONAL Country Rate INVOICE P 0. ST 1. 1. 1 0. N LONG-DISTANCE Rate INVOICE P
- Slides: 32