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

Post on 12-Jan-2016

222 Views

Category:

Documents

0 Downloads

Preview:

Click to see full reader

TRANSCRIPT

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

Data models as lenses

Defining Semantic Objects

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

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

SO class vs. instance

Distinct?Distinct?Physical?Physical?

Attributes

Types Simple Group Object

CardinalityDomains

Physical 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?

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?

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?

Domain specifications

Object specifications

Domain specifications

(a)

Paired attributes

Object links are always pairedNo 1-way object relationships

Semantic Object Views

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!

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

Semantic Object Types

SimpleCompositeCompoundHybridAssociationParent/SubtypeArchetype/Version

Simple Objects

Only single-valued, non-object attributes

Composite Objects

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

Composite Objects

Multi-valued groups can be nested

Is this correct?

Compound Objects

Have at least one object attribute

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

Compound Objects

Designer must find out about cardinalities of paired object properties

4 types of compound objects (max card.)

1 example of each?

Hybrid Objects

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

containing an object link

Hybrid vs. Compound Objects

What’s wrong with this?

Hybrid Object Max Cardinality

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

SALES-ORDER?

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

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

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

Nested Subtypes

Archetype/Version Objects

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

Version object ID contains archetype object link

E-R vs. SO Models

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

E-R vs. SO Models

which makes better sense to you?

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

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

top related