download

Matakuliah
Tahun
Versi
: M0174/OBJECT ORIENTED DATABASE
: 2005
: 1/0
Pertemuan 8
The Object Definition Language
(Lanjutan)
1
Learning Outcomes
Pada akhir pertemuan ini, diharapkan mahasiswa
akan mampu :
• Mahasiswa dapat Menjelaskan object
definition language lanjutan (C2)
• Mahasiswa dapat Menjelaskan hubungan
antara ODL dengan bahasa program dan
database schema (C2)
2
Outline Materi
•
•
•
•
•
•
•
•
•
A class or interface body
Attributes
Relationships
Operations
Constants
Type declarations
Exceptions
Modules
ODL in a distributed environment
3
A class or interface body
• Definition
• The general form of the body of an object
type definition
• In addition, characteristic declaration can
define the types, constants, and
exceptions used in the other characteristic
declarations
4
Attributes
• Attributes can be thought of as the values
that an object contains
• Examples
5
Relationships
• Definition
• Each relationship declaration must state :
– The name of the path from instances to
associated objects
– The type of the associated objects
– And optionally, the name of the inverse path,
from the associated objects back to the
instances
6
Operations
• Definition
• An operation declaration must specify :
– The operation name
– The type of the object it returns when
executed
– The type of each the objects that it accepts as
a parameter
– Exceptions that may be raised by the
operation
7
Constants
• As in programming language, it is often
useful to give constants meaningful names
which they can be reffered to.
• Examples
8
Type declarations
• Type generators can be used to create
new types
• Examples
9
Exceptions
• Exceptions are objects which represent
exceptional events
• Examples
10
Modules
• Parts of a schema can be packaged
together to form named modules
• Examples
11
ODL in a distributed environment
• In a distributed environment objects may
be implemented on different computers
using different languages
• Examples
12
SUMMARY
• A set of declarations defined in ODL is
schema
• An ODL schema contains a set of interface
and class definitions for object type in a
object database
• A schema may also include type, constant,
and exception declaration.
• Declaration can be combined to from
named modules
13