190 likes | 476 Views
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)
E N D
Pertemuan 7The Object Definition Language Matakuliah : M0174/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) • Mahasiswa dapat Menjelaskan hubungan antara ODL dengan bahasa program dan database schema (C2)
Outline Materi • What is ODL ? • The structure of an ODL Schema • Class definition • Class header • Supertypes and extender classes • Type properties • Interface definition
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
What is ODL ? • Relationship between ODL and Other Programming Language
What is ODL ? • Relationship of ODL to an Object Database Schema & Application
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.
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.
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.
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
Class definition • A class definition defines the behaviour and state of an object type • Examples
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
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
Type properties • The extent name • The instance properties that are used as keys
Interface definition • An interface definition has two main parts • The interface header • The interface body
SUMMARY • The ODL is the ddl for object database • The approach contrasts with that of persistent object oriented programming languages