The ODMG Standard 2.0 Focusing On The ODMG Object Model

advertisement

The ODMG Standard 2.0

Focusing On The ODMG Object Model

Group Members: Christopher Parrott, Christopher Sinclair,

David Tucker & Andrew Wan

Presentation Presenters: Christopher Parrott & Christopher Sinclair

Introduction

• ODMG (Object Data Management Group) formed in

1991.

• Independent organisation to standardise Object

Oriented Database Management Systems.

• Corporate members includes Sun, Poet & Computer

Associates.

• ODMG covers following key areas:

 Object Model (OM)

 Object Definition Language (ODL)

 Object Query Language (OQL)

 C++, Java & Smalltalk Bindings.

The Object Model

• About ODMG Object Model

• Database Types

 Specifications & Implementations

Object type definition consists of two components, they are

Interface & one or more Implementations.

U se r

Interface

U se r visible to the users of the type

not visible to the users of the type

Implementation

Class

Us er

U se r

Type Specification

• Object Identifiers

• Object Lifetime

• Collections

• Collection Objects

• Set Objects

• Bag Objects

• List Objects

• Array Objects

• Dictionary Objects

Objects

• Literal Values.

 ODMG model supports several literal types:

• Atomic

• Collection

• Structured

• Object Hierarchy

Objects

Modelling State

• Introduction

 Provides description of data structure & relates interfaces to a set of object types in a type hierarchy.

• Object Type Interfaces

 Describes how data can be stored & relations to other types of data.

Employee Extends

Person

-Class Properties

Employee_number

Employee_dob

Employee_salary

-Class Operations

+getName()

+getDOB()

+iSalary(aAmount)

Person

-Class Properties

Person_name

Person_bloodtype

-Class Operations

+returnName()

+getBloodtype()

Work_For

Company

-Class Properties

Company_Name

Company_Address theEmployees

-Class Operations

+getName()

+printEmployees()

+employ(aEmploye e)

Type diagram of object type definition

Modelling State

• Attributes &

Relationships

 One To One

 One To Many

 Many To Many

Employee

WorksFor

One To One Relationship

Company theEmployees

N

One To Many Relationship

Company

Employee

Departments theManagers

N

Many To Many Relationship

N theDepartments

Manager

Examples Of Relationships

• Names

Employee

Representation of how object names can be used to represent entities with shared components jeff

Name = jeff

Dept_employ=

It_support

It_support

Employee bob

Name = bob

Dept_employ=

It_support

Department

Name = It_support

Employees = jeff, bob….

Modelling State

• Metadata

 Descriptive information about persistent objects that defines the ‘schema’.

 Used by ODBMS to define structure .

 Metadata is stored in an ‘ODL Schema Repository’.

 Considered important for object oriented database systems.

• Example of a operation that returns the class of an object.

EmployeeMetaData = William->getClass( )

• Above operation will store description of employee class.

EmployeeName = EmployeeMetaData ->getName( )

• EmployeeMetaData is used to print the employee’s name as the getName function is part of the employee class.

Modelling Behaviour

• Introduction

 Object’s behaviour is defined by its set of operations.

 Operation has its specific type defined.

• Operations

 Described as a piece of code fragment.

 Manipulates the properties and data of object.

• Exceptions

Employee

Void

+salaryIncrease(aAmount)

Company

Void

+employ(aEmployee)

Employee

Date

+dateOfBirth()

-Operation salaryIncrease defined in Employee class increases the salary property with the specified amount entered as a parameter. The operation does that return anything.

Employee theEmployees

-Operation employ defined in Company class sets a employee instance into theEmployees.

Thus adding a employee to the company. The employee instance is passed as a parameter to the operation. The operation does not return anything.

-Operation dateOfBirth returns the employee’s date of birth after calculation. The operation accepts no parameters and returns a date type.

Concurrency & Transaction Control

• ODMG view on locking & Concurrency Control

• Locking Control

• Types of locks

 Read Locks

 Write Locks

 Upgrade Locks

• Prevention against form of deadlock when two processes both obtain read locks on object then attempt to obtain a write lock on the same object.

Deadlock avoided initially by obtaining upgrade lock instead of read locks for all objects user intends to modify.

• Avoids potential conflicts when write lock is later obtained.

Concurrency & Transaction Control

• Lock Duration

• Concurrency Control

• Transactions

 All programs that implements persistent objects must be organised into transactions.

 Once transaction commits, ODBMS guarantees changes made by transaction are never lost.

 ODMG data supports traditional ACID (Atomicity, Consistency,

Integrity & Durability).

 Transactions are started with begin command, similar to new command when creating objects.

 Transactions can be initiated & started explicitly.

Concurrency & Transaction Control

• Event Management

• Managing Logical Databases

 ODBMS can manage one or more logical databases. All of these logical databases are instances of type database .

 Instances of type database created using DatabaseFactory interface.

 Query identifies part of data explicitly by naming or by specifying conditions.

 Database type also supports operations designed to aid the administration of the whole system. Such operations include:

• Delete

• Move

• Copy

• Backup

• Restore all of which to keep database in ‘Good Order’

Object Specification Languages

• About Object Specification Languages

 Used in representation of ODMG compliant object database management systems.

 Composed of independent languages used in the definition of schemas.

 Objectives of these independent languages are:

• Provide portability of databases across ODMG compliant implementations.

• Interoperability of OODMS from different & multiple vendors.

 One of main OSL languages is ODL (Object Definition

Language), there is also OIF (Object Interchange Format).

Object Query Language

• About Object Query Languages

 Developed by ODMG for use with ODMG databases.

 Language Provides mechanism by which user can request a subset of data from a database, such requests referred to as ad hoc.

 Object Query Language (OQL) is part of the SQL family of languages.

 Contains query syntax from SQL such as:

• ‘Select… From… Where…’

Bindings

• The idea of Bindings

 Binding creates association between run-time system of programming language & the persistent store of database system.

 Usually takes the form of library functions which access the

DBMS functionality.

 ODMG standard implements bindings based on one fundamental principle:

• “The programmer should perceive the binding as a single language for expressing both database & programming operations, not two separate languages with arbitrary boundaries between them”. ODMG 2.0, 1997

Literature Review

• Alagic, Suad

1996/1997

The ODMG Object Model: Does it Make Sense?

OOPSLA ( ACM Conference on Object-Oriented Programming,

Systems, Languages, and Applications) USA

• Chaudhri, Akmal B.

1997

Experiences Using Object Data Management In the Real

World

OOPSLA 1997 Workshop

The New ODMG 3.0 Standard

• What's new in the ODMG 3.0 Standard

• Object Model

Conclusions

• The ODMG standard & Its Real World Application.

• Conclusions & Criticisms of the ODMG Object Model.

 ODMG model requires careful examination before it is accepted.

 Not yet industry standard.

 Type checking system in ODMG model is not perfect.

• Dynamic type checking used, but will always be in situations where it fails.

• Means that run-time checks will have to be used.

• Reduces Efficiency & Reliability of overall system.

 Parametric types not supported in current issue of the object model.

• Except in C++ Bindings

Conclusions

 Lack of “self” type.

 Complaints towards ODMG model relate to the fact that it is not a formal, mathematical model.

 ODGM model does have problems, but the model itself is still work in progress.

 Most likely to be adjusted to solve some of the major weaknesses in current version.

End Of Presentation

The ODMG Standard 2.0

Focusing On The ODMG Object Model

Group Members: Christopher Parrott, Christopher Sinclair,

David Tucker & Andrew Wan

Presentation Presented By: Christopher Parrott & Christopher Sinclair

• Any Questions?

Download