semantic object model zdefine semantic objects zuse semantic object diagrams to build data models...

32
Semantic Object Model Define semantic objects Use semantic object diagrams to build data models Define and illustrate the 7 basic types of semantic objects Compare semantic object and entity-relationship models

Upload: ruth-price

Post on 12-Jan-2016

222 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Semantic Object Model zDefine semantic objects zUse semantic object diagrams to build data models zDefine and illustrate the 7 basic types of semantic

Semantic Object Model

Define semantic objectsUse semantic object diagrams to build

data modelsDefine and illustrate the 7 basic types

of semantic objectsCompare semantic object and entity-

relationship models

Page 2: Semantic Object Model zDefine semantic objects zUse semantic object diagrams to build data models zDefine and illustrate the 7 basic types of semantic

Data models as lenses

Page 3: Semantic Object Model zDefine semantic objects zUse semantic object diagrams to build data models zDefine and illustrate the 7 basic types of semantic

Defining Semantic Objects

SOM <> OO DB processing!Objects: things to be representedSemantic: carry some meaningAttributesIdentifiers

Page 4: Semantic Object Model zDefine semantic objects zUse semantic object diagrams to build data models zDefine and illustrate the 7 basic types of semantic

Semantic Object

“A named collection of attributes that sufficiently describes a distinct identity” sufficient description means that the attributes

represent all of the characteristics that users need

distinct identity is something that users recognize as independent and separate

Need not be physical

Page 5: Semantic Object Model zDefine semantic objects zUse semantic object diagrams to build data models zDefine and illustrate the 7 basic types of semantic

SO class vs. instance

Distinct?Distinct?Physical?Physical?

Page 6: Semantic Object Model zDefine semantic objects zUse semantic object diagrams to build data models zDefine and illustrate the 7 basic types of semantic

Attributes

Types Simple Group Object

CardinalityDomains

Physical Semantic

Page 7: Semantic Object Model zDefine semantic objects zUse semantic object diagrams to build data models zDefine and illustrate the 7 basic types of semantic

Attribute Domains

Description of an attribute’s possible values Physical Description

type and length of data, constraints can be enumerated list example: RoomNumber in dept. catalog? (How

about the campus catalog?)

Semantic Description (logical) function or purpose of the attribute example: RoomNumber?

Page 8: Semantic Object Model zDefine semantic objects zUse semantic object diagrams to build data models zDefine and illustrate the 7 basic types of semantic

Let’s build an object

E.g., SOCCER-PLAYER?Properties?Instance?Name of semantic object?Name of semantic object instance?Some property domains...

Physical? Semantic?

Page 9: Semantic Object Model zDefine semantic objects zUse semantic object diagrams to build data models zDefine and illustrate the 7 basic types of semantic

Semantic Object Diagram

Object Name

Group Attribute

Simple Attribute

Cardinality(min.max)

UniqueIdentifier

STUDENT

StudentIDStudentName

FirstNameInitialLastName

PhoneNumber

DEPARTMENT

0.1

1.1

1.N

1.1

1.1

ID

ID

Object Attribute(or Object Link)

Non-uniqueGroup Identifier

1.1

1.1

What is the cardinality of an identifier?What is the cardinality of an identifier?

Page 10: Semantic Object Model zDefine semantic objects zUse semantic object diagrams to build data models zDefine and illustrate the 7 basic types of semantic

Domain specifications

Object specifications

Domain specifications

(a)

Page 11: Semantic Object Model zDefine semantic objects zUse semantic object diagrams to build data models zDefine and illustrate the 7 basic types of semantic

Paired attributes

Object links are always pairedNo 1-way object relationships

Page 12: Semantic Object Model zDefine semantic objects zUse semantic object diagrams to build data models zDefine and illustrate the 7 basic types of semantic

Semantic Object Views

Page 13: Semantic Object Model zDefine semantic objects zUse semantic object diagrams to build data models zDefine and illustrate the 7 basic types of semantic

Roundtable Exercise

Form groups of 3 or 4; introduce yourselfLabel yourselves: 1,2,3...One sheet of paper and pencil per groupIn turn:

one person describes an object from the following report

another person draws its diagram on the sheet (1 or 2 attributes)

rotate!

Page 14: Semantic Object Model zDefine semantic objects zUse semantic object diagrams to build data models zDefine and illustrate the 7 basic types of semantic

Invoice Date: 08/15/98 FILIPPO MENCZER MCI Dumb Foreigner plan______________________________________________________________________________Fees $6.05Long Distance Calls $15.50International 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:44A S TO SWTZRLAND 41274812900 7 9.73Aug 02 10:39A S TO ITALY 39336850757 4 6.08

03 12:52P S TO ITALY 39068073418 19 28.8808 01:07P X TO ITALY 39336850757 19 28.8814 12:48P S TO SWTZRLAND 41274812900 12 16.68

______________________________________________________________________________Total International Long Distance $105.45

Form reverse-engineering

Page 15: Semantic Object Model zDefine semantic objects zUse semantic object diagrams to build data models zDefine and illustrate the 7 basic types of semantic

Semantic Object Types

SimpleCompositeCompoundHybridAssociationParent/SubtypeArchetype/Version

Page 16: Semantic Object Model zDefine semantic objects zUse semantic object diagrams to build data models zDefine and illustrate the 7 basic types of semantic

Simple Objects

Only single-valued, non-object attributes

Page 17: Semantic Object Model zDefine semantic objects zUse semantic object diagrams to build data models zDefine and illustrate the 7 basic types of semantic

Composite Objects

One or more multi-valued, non-object (simple or group) attributes

Page 18: Semantic Object Model zDefine semantic objects zUse semantic object diagrams to build data models zDefine and illustrate the 7 basic types of semantic

Composite Objects

Multi-valued groups can be nested

Is this correct?

Page 19: Semantic Object Model zDefine semantic objects zUse semantic object diagrams to build data models zDefine and illustrate the 7 basic types of semantic

Compound Objects

Have at least one object attribute

Object attributes are always in pairs (here 1:1)

Page 20: Semantic Object Model zDefine semantic objects zUse semantic object diagrams to build data models zDefine and illustrate the 7 basic types of semantic

Compound Objects

Designer must find out about cardinalities of paired object properties

4 types of compound objects (max card.)

1 example of each?

Page 21: Semantic Object Model zDefine semantic objects zUse semantic object diagrams to build data models zDefine and illustrate the 7 basic types of semantic

Hybrid Objects

Combination of objects of two typesAt least one multi-valued group attribute

containing an object link

Page 22: Semantic Object Model zDefine semantic objects zUse semantic object diagrams to build data models zDefine and illustrate the 7 basic types of semantic

Hybrid vs. Compound Objects

What’s wrong with this?

Page 23: Semantic Object Model zDefine semantic objects zUse semantic object diagrams to build data models zDefine and illustrate the 7 basic types of semantic

Hybrid Object Max Cardinality

ITEM in one or more SALES-ORDERS?ITEM in one or more LineItems within one

SALES-ORDER?

Page 24: Semantic Object Model zDefine semantic objects zUse semantic object diagrams to build data models zDefine and illustrate the 7 basic types of semantic

Association Objects

Relates two or more objects and stores data that pertains to the relationship

Typical in resource assignments

May or may not have its own ID

Page 25: Semantic Object Model zDefine semantic objects zUse semantic object diagrams to build data models zDefine and illustrate the 7 basic types of semantic

Parent/Subtype Objects Generalized object that

logically contains one or more subcategories

Avoid duplication & NULLsSubtype object attribute =

IS-A attributeInheritance

Subtype object inherits parent attributes

Parent acquires all attributes of its subtypes

Page 26: Semantic Object Model zDefine semantic objects zUse semantic object diagrams to build data models zDefine and illustrate the 7 basic types of semantic

Multiple Subtypes

A parent may have more than one subtype

For exclusivity, place subtype object attributes into a subtype group

X.Y.Z X=min group cardinality Y=min attribute count Z=max attribute count

Page 27: Semantic Object Model zDefine semantic objects zUse semantic object diagrams to build data models zDefine and illustrate the 7 basic types of semantic

Nested Subtypes

Page 28: Semantic Object Model zDefine semantic objects zUse semantic object diagrams to build data models zDefine and illustrate the 7 basic types of semantic

Archetype/Version Objects

Archetype object produces other objects that represent versions, releases, or editions of the archetype

Version object ID contains archetype object link

Page 29: Semantic Object Model zDefine semantic objects zUse semantic object diagrams to build data models zDefine and illustrate the 7 basic types of semantic

E-R vs. SO Models

Objects show context (boundaries)Objects contain multi-varied attributesObjects contain other objectsEasier documentation (metadata)

Page 30: Semantic Object Model zDefine semantic objects zUse semantic object diagrams to build data models zDefine and illustrate the 7 basic types of semantic

E-R vs. SO Models

which makes better sense to you?

Page 31: Semantic Object Model zDefine semantic objects zUse semantic object diagrams to build data models zDefine and illustrate the 7 basic types of semantic

Invoice Date: 08/15/98 FILIPPO/COLLEEN MENCZER Service Summary ______________________________________________________________________________MCI One Advantage plan fee (07/25/98 to 08/14/98) $3.03Long Distance $15.50International Long Distance $105.45Other 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:44A S TO SWTZRLAND 41274812900 7 9.73Aug 02 10:39A S TO ITALY 39336850757 4 6.08

03 12:52P S TO ITALY 39068073418 19 28.8808 01:07P X TO ITALY 39336850757 19 28.8814 12:48P S TO SWTZRLAND 41274812900 12 16.68

______________________________________________________________________________Total International Long Distance $105.45

Form reverse-engineering

Page 32: Semantic Object Model zDefine semantic objects zUse semantic object diagrams to build data models zDefine and illustrate the 7 basic types of semantic

INTERNATIONAL Country

RateINVOICE P

CUSTOMERID NameID PhoneNumber

PlanINVOICE 1.N

A data model from this form

LONG-DISTANCE Rate

INVOICE P

0.N

1.1

1.1.1

INVOICEID InvoiceID

DateCUSTOMER

Fee 0.N

CallDateTimeNumberLONG-DISTANCE 0.ST

INTERNATIONAL 0.ST

MinutesAmount