PART IV
Chapter 28 Object-Oriented DBMSs Standards and Systems
28.1 Discuss the Object Model proposed by the Object Data Management Group.
See Section 28.2.2.
Case Study 1 Cornucopia Ltd
Cornucopia Ltd is a large, multinational oil company that uses contractors for systems analysis
whenever possible. The following data is held about the contracts:
(a) Each contract consists of a contract name and contract number, the name of the main
(b) Each contract consists of a number of tasks, each with an activity name, a start and
scheduled end date, a task leader, a work group and a set of deliverables.
(c) A work group consists of a group code and a list of staff. A group leader is identified for
each group.
(d) Deliverables take the form of documents, consisting of a document code, a document
(e) Company data consists of the name of the company, the technical head of staff, the
administrative head of
postcode), a telephone, and fax number.
28.2 Using the Object Definition Language (ODL) of the ODMG object model, define the interface of
ach type, define at least one method that you
consider appropriate. State any assumptions necessary to support your design.
See schema diagram on following page for possible solution. Specification for the Project class
PART IV
class Project {
(extent projects key projectName)
28.3 Write the following query in the Object Query Language (OQL) of the ODMG object model:
SELECT title:x.title
PART IV
Title
Division
address: struct STRING
Project
projectName: STRING
Company
tradingName: STRING
Task
Person
Group
Document
docCode: STRING
title: STRING
authors*
FuncSpec
Example Schema for Cornucopia Ltd
Case Study 2 Perilous Printing
Perilous Printing Ltd is a small printing company that does work for book publishers. Its jobs
consist of printing books or parts of books. The following data is held about the work:
(a) The company does work for many different publishing houses. The data on each publisher
consists of a name, an address (street, town, city, and postcode), a telephone, and fax number.
28.4 Using the Object Definition Language (ODL) of the ODMG object model, define the interface
each type, define at least one method that
you consider appropriate. State any assumptions necessary to support your design.
See figure below for a possible schema. Class specification for Publisher shown below.
class Publisher {
(extent publishers key pubName)
28.5 Write the following query in the Object Query Language (OQL) of the ODMG object model:
SELECT surname:s.lName
FROM p IN Publisher,
Example Schema for Perilous Printing
Publisher
pubName: STRING
Company
tradingName: STRING
Job
Staff
Material
type: STRING
PART IV
Case Study 3 Perfect Pets
A practice called Perfect Pets provides private health care for domestic pets throughout
America. This service is provided through various clinics located in the main cities of
America. The Director has provided the following description of the current system.
The details stored on each member of staff include the staff number, name (first and last),
address (street, city, state, and zipcode), telephone number, date of birth, sex, social security
number (SSN), position, and current annual salary. The staff number is unique throughout the
practice.
When a pet owner first contacts a clinic of Perfect Pets the details of the pet owner are
When a sick pet is brought to a clinic, the vet on duty examines the pet. The details of each
examination are recorded and include an examination number, the date and time of the
Perfect Pets provides various treatments for all types of pets. These treatments are provided at
a standard rate across all clinics. The details of each treatment include a treatment number, a
full description of the treatment, and the cost to the pet owner. For example, treatments
include:
28.6 Using the Object Definition Language (ODL) of the ODMG object model, define the interface
. For each type, define at least one method that
you consider appropriate. State any assumptions necessary to support your design.
See figure below for a possible schema. Class specification for Pet shown below.
class Pet {
(extent pets key petNo)
enum pStatus {Alive, Deceased};
PART IV
28.7 Write the following query in the Object Query Language (OQL) of the ODMG object model:
List the names of all pets that received the T123 treatment.
SELECT petName:p.petName
Clinic
IsContactedBy
PetOwner
Has
1..*
1..1
Staff
PART IV
Student Project
Assignment Persistence in a Programming Language
Introduction
The objective of the ODBMS project is to design and implement persistence in a programming language.
The work is to be undertaken in groups it is left to yourselves to split into groups of 2/3.
Specification of Requirements
The aim of this project is to develop a method that will allow persistent objects to be automatically stored
and read as required. The solution should cope with standard object concepts, such as inheritance, and
also provide for interobject relationships, thereby providing basic database functionality.
Marking Scheme
Design (including use of correct algorithms) 30
Basic persistence 10