1 pertemuan 8 the object definition language (lanjutan) matakuliah: m0174/object oriented database...

13
1 Pertemuan 8 The Object Definition Language (Lanjutan) Matakuliah : M0174/OBJECT ORIENTED DATABASE Tahun : 2005 Versi : 1/0

Post on 22-Dec-2015

228 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: 1 Pertemuan 8 The Object Definition Language (Lanjutan) Matakuliah: M0174/OBJECT ORIENTED DATABASE Tahun: 2005 Versi: 1/0

1

Pertemuan 8The Object Definition Language (Lanjutan)

Matakuliah : M0174/OBJECT ORIENTED DATABASE

Tahun : 2005

Versi : 1/0

Page 2: 1 Pertemuan 8 The Object Definition Language (Lanjutan) Matakuliah: M0174/OBJECT ORIENTED DATABASE Tahun: 2005 Versi: 1/0

2

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)

Page 3: 1 Pertemuan 8 The Object Definition Language (Lanjutan) Matakuliah: M0174/OBJECT ORIENTED DATABASE Tahun: 2005 Versi: 1/0

3

Outline Materi

• A class or interface body • Attributes • Relationships • Operations • Constants• Type declarations • Exceptions• Modules • ODL in a distributed environment

Page 4: 1 Pertemuan 8 The Object Definition Language (Lanjutan) Matakuliah: M0174/OBJECT ORIENTED DATABASE Tahun: 2005 Versi: 1/0

4

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

Page 5: 1 Pertemuan 8 The Object Definition Language (Lanjutan) Matakuliah: M0174/OBJECT ORIENTED DATABASE Tahun: 2005 Versi: 1/0

5

Attributes

• Attributes can be thought of as the values that an object contains

• Examples

Page 6: 1 Pertemuan 8 The Object Definition Language (Lanjutan) Matakuliah: M0174/OBJECT ORIENTED DATABASE Tahun: 2005 Versi: 1/0

6

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

Page 7: 1 Pertemuan 8 The Object Definition Language (Lanjutan) Matakuliah: M0174/OBJECT ORIENTED DATABASE Tahun: 2005 Versi: 1/0

7

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

Page 8: 1 Pertemuan 8 The Object Definition Language (Lanjutan) Matakuliah: M0174/OBJECT ORIENTED DATABASE Tahun: 2005 Versi: 1/0

8

Constants

• As in programming language, it is often useful to give constants meaningful names which they can be reffered to.

• Examples

Page 9: 1 Pertemuan 8 The Object Definition Language (Lanjutan) Matakuliah: M0174/OBJECT ORIENTED DATABASE Tahun: 2005 Versi: 1/0

9

Type declarations

• Type generators can be used to create new types

• Examples

Page 10: 1 Pertemuan 8 The Object Definition Language (Lanjutan) Matakuliah: M0174/OBJECT ORIENTED DATABASE Tahun: 2005 Versi: 1/0

10

Exceptions

• Exceptions are objects which represent exceptional events

• Examples

Page 11: 1 Pertemuan 8 The Object Definition Language (Lanjutan) Matakuliah: M0174/OBJECT ORIENTED DATABASE Tahun: 2005 Versi: 1/0

11

Modules

• Parts of a schema can be packaged together to form named modules

• Examples

Page 12: 1 Pertemuan 8 The Object Definition Language (Lanjutan) Matakuliah: M0174/OBJECT ORIENTED DATABASE Tahun: 2005 Versi: 1/0

12

ODL in a distributed environment

• In a distributed environment objects may be implemented on different computers using different languages

• Examples

Page 13: 1 Pertemuan 8 The Object Definition Language (Lanjutan) Matakuliah: M0174/OBJECT ORIENTED DATABASE Tahun: 2005 Versi: 1/0

13

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