pertemuan 7 the object definition language

16
1 Pertemuan 7 The Object Definition Language Matakuliah : M0174/OBJECT ORIENTED DATABASE Tahun : 2005 Versi : 1/0

Upload: colby

Post on 05-Jan-2016

72 views

Category:

Documents


0 download

DESCRIPTION

Pertemuan 7 The Object Definition Language. Matakuliah: M0 1 74 /OBJECT ORIENTED DATABASE Tahun: 2005 Versi: 1 / 0. Learning Outcomes. Pada akhir pertemuan ini, diharapkan mahasiswa akan mampu : Mahasiswa dapat Menjelaskan object definition language (C2) - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Pertemuan 7 The Object Definition Language

1

Pertemuan 7The Object Definition Language

Matakuliah : M0174/OBJECT ORIENTED DATABASE

Tahun : 2005

Versi : 1/0

Page 2: Pertemuan 7 The Object Definition Language

2

Learning Outcomes

Pada akhir pertemuan ini, diharapkan mahasiswa

akan mampu :

• Mahasiswa dapat Menjelaskan object definition language (C2)

• Mahasiswa dapat Menjelaskan hubungan antara ODL dengan bahasa program dan database schema (C2)

Page 3: Pertemuan 7 The Object Definition Language

3

Outline Materi

• What is ODL ?

• The structure of an ODL Schema

• Class definition

• Class header

• Supertypes and extender classes

• Type properties

• Interface definition

Page 4: Pertemuan 7 The Object Definition Language

4

What is ODL ?

• ODL is one of a collection of language which are used together to implement object database system.

• The purpose of ODL is to define object types which conform to the object data model

Page 5: Pertemuan 7 The Object Definition Language

5

What is ODL ?

• Relationship between ODL and Other Programming Language

Object databse application program written in a programminglanguage such as C++, Java

ODL definition of the interface between the applications and theobject database

Implementation of the object database types written in aprogramming language such as C++, Java

Page 6: Pertemuan 7 The Object Definition Language

6

What is ODL ?

• Relationship of ODL to an Object Database Schema & Application

ODL Object DatabaseSchema Type

Declaration andInterface

Object DatabaseSchema Preprocessor

Object Database

Object DatabaseApplication Program

Written in an ExtendedProgramming Language

Programming LanguageCompiler/Linker

Application

Object DatabaseManagement System

Runtime Library

Page 7: Pertemuan 7 The Object Definition Language

7

What is ODL ?

• Two further advantages of the independence of ODL from specific programming language:– First the ability to port object database system

from one programming environment to other.– Second the ability to operate many object

database system together, even when different language have been used to implement them.

Page 8: Pertemuan 7 The Object Definition Language

8

What is ODL ?

• The ability to define interface to object in a way which is independent of the language that are used to implement or utilize them has a general use in distributed object oriented environment.

• This ability makes it possible for many application to share and utilize objects which provide general service.

Page 9: Pertemuan 7 The Object Definition Language

9

What is ODL ?

• The rules for forming statements is ODL, are given using a notation called extended BNF (Backus-Naur Form) in which:– The symbol “ ::= “ can read as ‘is defined as’– The Part of an ODL statement are described in

angular brackets (e.g <type definition>), or as they appear in the statement it self.

– Square brackets are used to denote optional parts of an expression. An asterisk after the closing square bracket “]* ” indicates the optional part can occur many time.

– A vertical line is used to separate alternative parts of an expression.

Page 10: Pertemuan 7 The Object Definition Language

10

The structure of an ODL Schema

• The purpose of an ODL Schema is to enable application programs and tools to create, access, and manipulate the contents of an object database

• Examples

Page 11: Pertemuan 7 The Object Definition Language

11

Class definition

• A class definition defines the behaviour and state of an object type

• Examples

Page 12: Pertemuan 7 The Object Definition Language

12

Class header

• Object types are themselves represented as objects and therefore have properties

• The properties of an object type include its supertypes, extender class, extent, and keys

Page 13: Pertemuan 7 The Object Definition Language

13

Supertypes and extender classes

• A class may inherit from other object types in two ways :– A class may have zero or one extender class– An object type (a class or interface) may also

have zero, one, or more interface which are its supertypes from which it inherits behaviour

Page 14: Pertemuan 7 The Object Definition Language

14

Type properties

• The extent name

• The instance properties that are used as keys

Page 15: Pertemuan 7 The Object Definition Language

15

Interface definition

• An interface definition has two main parts – The interface header– The interface body

Page 16: Pertemuan 7 The Object Definition Language

16

SUMMARY

• The ODL is the ddl for object database

• The approach contrasts with that of persistent object oriented programming languages