The Semantic Object Model Semantic Objects Creating Data Models with Semantic Objects Types of Objects Object-Oriented Programming and Semantic Objects Comparing the Semantic Object and.

Download Report

Transcript The Semantic Object Model Semantic Objects Creating Data Models with Semantic Objects Types of Objects Object-Oriented Programming and Semantic Objects Comparing the Semantic Object and.

The Semantic Object Model
Semantic Objects
Creating Data Models with Semantic Objects
Types of Objects
Object-Oriented Programming and Semantic Objects
Comparing the Semantic Object and the E-R Model
Semantic Objects
• A semantic object is a named collection of
attributes that sufficiently describes a
distinct identity. (Fig. 4-2 pg. 81)
• Object attributes can be:
Simple attributes with a single value
e.g. InvoiceNumber
Group attributes being composites of
other attributes
e.g. Address{Street, City, State, Zip}
•
•
•
•
•
Semantic object attributes that
establish a relationship between one
semantic object and another.
Paired attributes always exist in pairs.
Maximum and minimum cardinality of
attributes
Object instances
Object identifier
Attribute domains
Semantic object view
Creating Data Models with Semantic Objects
An Example: The Highline University Administration
Database (Fig. 4-13 pg. 93)
Object specifications (Fig. 4-14 pg. 94,95)
Types of Objects
Simple objects only contain single-valued, nonobject
attributes e.g. EQUIPMENT pg. 96
Composite objects contain one or more multivalued,
nonobject attributes e.g. HOTEL-BILL pg. 97
Compound objects contain at least one object attribute e.g.
EMPLOYEE pg. 100
Hybrid objects contain at least one multivalued group attribute
(composite) that includes a semantic object attribute
(compound) e.g. DORMITORY pg. 104 Fig. 4-25 pg. 106,
107
Association objects relate two or more objects and store data
that is peculiar to that specific to that relationship e.g. FLIGHT
pg. 109
Parent/Subtype objects and inheritance e.g. EMPLOYEE and
MANAGER, PROGRAMMER
pg. 112
Object-Oriented Programming and Semantic Objects
Object-oriented programming (OOP) is a way of designing
and coding programs.
An OOP object is an encapsulated (complete) structure
having both attributes and methods. Methods are programs
that OOP objects use to process themselves e.g. a method to
display itself, one to create itself, etc.
Polymorphism means that several versions of a method exist
and the compiler determines which one is appropriate each
time the method is called.
Object-Oriented DBMS and object persistence, i.e., the
structure of the object is written out to some permanent storage
like the disk.
Comparing the Semantic Object
and the E-R Model
• Both are tools for modeling the database.
• Difference in orientation: entities Vs.
semantic objects.
• Semantic objects contain more metadata
than entities.
• Is it just a matter of preference? (Fig. 433,34, pg. 118)