SlideShare a Scribd company logo
1
© Prentice Hall, 2002
Chapter 15:Chapter 15:
Object-Oriented DatabaseObject-Oriented Database
DevelopmentDevelopment
Modern Database Management
6th
Edition
Jeffrey A. Hoffer, Mary B. Prescott, Fred R.
McFadden
2Chapter 15 © Prentice Hall,
Object Definition LanguageObject Definition Language
(ODL)(ODL)
Corresponds to SQL’s DDL (Data
Definition Language)
Specify the logical schema for an object-
oriented database
Based on the specifications of Object
Database Management Group (ODMG)
3Chapter 15 © Prentice Hall,
Defining a ClassDefining a Class
classclass – keyword for defining classes
attributeattribute – keyword for attributes
operationsoperations – return type, name, parameters
in parentheses
relationshiprelationship – keyword for establishing
relationship
4Chapter 15 © Prentice Hall,
Defining an AttributeDefining an Attribute
 Value can be either:
– Object identifier OR Literal
 Types of literals
– Atomic – a constant that cannot be decomposed into components
– Collection – multiple literals or object types
– Structure – a fixed number of named elements, each of which could be a
literal or object type
 Attribute ranges
– Allowable values for an attribute
– enum – for enumerating the allowable values
5Chapter 15 © Prentice Hall,
Kinds of CollectionsKinds of Collections
 Set – unordered collection without duplicates
 Bag – unordered collection that may contain
duplicates
 List – ordered collection, all the same type
 Array – dynamically sized ordered collection,
locatable by position
 Dictionary – unordered sequence of key-value
pairs without duplicates
6Chapter 15 © Prentice Hall,
Defining StructuresDefining Structures
Structure = user-defined type with components
structstruct keyword
Example:
struct Address {struct Address {
String street_addressString street_address
String city;String city;
String state;String state;
String zip;String zip;
};};
7Chapter 15 © Prentice Hall,
Defining OperationsDefining Operations
Return type
Name
Parentheses following the name
Arguments within the
parentheses
8Chapter 15 © Prentice Hall,
Defining RelationshipsDefining Relationships
 Only unary and binary relationships allowed
 Relationships are bi-directional
– implemented through use of inverse keyword
 ODL relationships are specified:
– relationship indicates that class is on many-side
– relationship set indicates that class is on one-side and
other class (many) instances unordered
– relationship list indicates that class is on one-side and
other class (many) instances ordered
9Chapter 15 © Prentice Hall,
Figure 15-1 –UML class diagram for a university database
The following slides illustrate the
ODL implementation of this
UML diagram
10Chapter 15 © Prentice Hall,
Figure 15-2 –ODL Schema for university database
11Chapter 15 © Prentice Hall,
Figure 15-2 –ODL Schema for university database
class keyword begins
the class
definition.Class
components enclosed
between { and }
12Chapter 15 © Prentice Hall,
Figure 15-2 – ODL Schema for university database
attribute has a data type and a name
specify allowable values
using enum
13Chapter 15 © Prentice Hall,
Figure 15-2 –ODL Schema for university database
extent = the set of all instances of the class
14Chapter 15 © Prentice Hall,
Figure 15-2 –ODL Schema for university database
Operation definition:
return type, name, and
argument list.
Arguments include
data types and names
15Chapter 15 © Prentice Hall,
Figure 15-2 –ODL Schema for university database
relationship sets indicate 1:N relationship to an
unordered collection of instances of the other class
inverse establishes the bidirectionality of the relationship
16Chapter 15 © Prentice Hall,
Figure 15-2 –ODL Schema for university database
relationship list indicates 1:N relationship to an
ordered collection of instances of the other class
17Chapter 15 © Prentice Hall,
Figure 15-2 –ODL Schema for university database
relationship indicates N:1 relationship to an
instance of the other class
18Chapter 15 © Prentice Hall,
Figure 15-3 – UML class diagram for an employee project database
(a) Many-to-many relationship with an association class
Note:
In order to
capture special
features of
assignment, this
should be
converted into
two 1:N
relationships
19Chapter 15 © Prentice Hall,
Figure 15-3 – UML class diagram for an employee project database
(b) Many-to many relationship broken into two one-to-many relationships
class Employee {
(extent employees
key emp_id)
………….
attribute set (string) skills_required;
};
Note:
key indicates indentifier
(candidate key)
Note: attribute set indicates a
multivalued attribute
20Chapter 15 © Prentice Hall,
Figure 15-4
UML class diagram showing employee generalization
class Employee
extends Employee{
( ………….
………….
} Note:
extends
denotes
subclassing
21Chapter 15 © Prentice Hall,
Figure 15-5 –UML class diagram showing student generalization
abstract class Student
extends Employee{
( ………….
abstract float calc_tuition();
}
Note: abstract operation denotes no
method (no implementation) of
calc_tuition at the Student level
Note: abstract class denotes non-
instantiable (complete constraint)
22Chapter 15 © Prentice Hall,
Creating Object InstancesCreating Object Instances
 Specify a tag that will be the object identifier
– MBA699 course ();
 Initializing attributes:
– Cheryl student (name: “Cheryl Davis”, dateOfBirth:4/5/77);
 Initializing multivalued attributes:
– Dan employee (emp_id: 3678, name: “Dan Bellon”,
skills {“Database design”, “OO
Modeling”});
 Establishing links for relationship
– Cheryl student (takes: {OOAD99F, Telecom99F, Java99F});
23Chapter 15 © Prentice Hall,
Querying Objects in the OODBQuerying Objects in the OODB
 Object Query Language (OQL)
 ODMG standard language
 Similar to SQL-92
 Some differences:
– Joins use class’s relationship name:
 Select x.enrollment from courseofferings x, x.belongs_to y
where y.crse_course = “MBA 664” and x.section = 1;
– Using a set in a query
 Select emp_id, name from employees where “Database
Design” in skills;
24Chapter 15 © Prentice Hall,
Current ODBMS ProductsCurrent ODBMS Products
 Rising popularity due to:
– CAD/CAM applications
– Geographic information systems
– Multimedia
– Web-based applications
– Increasingly complex data types
 Applications of ODBMS
– Bill-of-material
– Telecommunications navigation
– Health care
– Engineering design
– Finance and trading
25Chapter 15 © Prentice Hall,
Table15-1 – ODBMS Products

More Related Content

What's hot (20)

PPT
Normalization case
Prosanta Ghosh
 
PPTX
Data Manipulation Language
Jas Singh Bhasin
 
PPT
Sql DML
Vikas Gupta
 
PPTX
Denormalization
Amna Magzoub
 
PPSX
Rdbms
argusacademy
 
PPTX
SQL
Vineeta Garg
 
PPT
Ch 12 O O D B Dvlpt
guest8fdbdd
 
PPT
When & Why\'s of Denormalization
Aliya Saldanha
 
ODP
Sql commands
Balakumaran Arunachalam
 
PDF
10.1.1.118.8129
Julius Francisco
 
PPT
Data integrity
Rahul Gupta
 
PPT
Sql server ___________session 3(sql 2008)
Ehtisham Ali
 
PDF
An Overview on Data Quality Issues at Data Staging ETL
idescitation
 
PPT
Normalization of database_tables_chapter_4
Farhan Chishti
 
PPT
Dbms relational model
Chirag vasava
 
PPTX
Database Systems - SQL - DCL Statements (Chapter 3/4)
Vidyasagar Mundroy
 
PPTX
DML, DDL, DCL ,DRL/DQL and TCL Statements in SQL with Examples
LGS, GBHS&IC, University Of South-Asia, TARA-Technologies
 
PPT
SQL DDL
Vikas Gupta
 
PPT
Dbms ii mca-ch8-db design-2013
Prosanta Ghosh
 
PDF
Sql ch 9 - data integrity
Mukesh Tekwani
 
Normalization case
Prosanta Ghosh
 
Data Manipulation Language
Jas Singh Bhasin
 
Sql DML
Vikas Gupta
 
Denormalization
Amna Magzoub
 
Ch 12 O O D B Dvlpt
guest8fdbdd
 
When & Why\'s of Denormalization
Aliya Saldanha
 
10.1.1.118.8129
Julius Francisco
 
Data integrity
Rahul Gupta
 
Sql server ___________session 3(sql 2008)
Ehtisham Ali
 
An Overview on Data Quality Issues at Data Staging ETL
idescitation
 
Normalization of database_tables_chapter_4
Farhan Chishti
 
Dbms relational model
Chirag vasava
 
Database Systems - SQL - DCL Statements (Chapter 3/4)
Vidyasagar Mundroy
 
DML, DDL, DCL ,DRL/DQL and TCL Statements in SQL with Examples
LGS, GBHS&IC, University Of South-Asia, TARA-Technologies
 
SQL DDL
Vikas Gupta
 
Dbms ii mca-ch8-db design-2013
Prosanta Ghosh
 
Sql ch 9 - data integrity
Mukesh Tekwani
 

Similar to The Database Environment Chapter 15 (20)

PPTX
SQL.pptx
raghuKatagall1
 
PPTX
Day 1 SQL.pptx
raghuKatagall1
 
PPT
The Database Environment Chapter 3
Jeanie Arnoco
 
PPTX
Database Systems (3+1)_Entity Relationship Models (2).pptx
warkadngg
 
PPTX
Adbms 16 object definition language
Vaibhav Khanna
 
PPTX
Database management systems 3 - Data Modelling
Nickkisha Farrell
 
PPT
Database design
FLYMAN TECHNOLOGY LIMITED
 
PPTX
Introduction of Database Design and Development
Er. Nawaraj Bhandari
 
PPT
chap03Corrected.ppt
MutiaSari53
 
PPTX
5e7ry754.pptx
qwert001
 
PPTX
Data modeling
Tala Alnaber
 
PPT
Data base management system Chapter21 (1).ppt
Vijayaraghavan Aravamuthan
 
PPT
entity-relationship-diagram-chen-&-crow -model.ppt
IRWANBINISMAILKPMGur1
 
PPT
Database Management System
FellowBuddy.com
 
PPT
databases2
c.west
 
ODP
ER Model in DBMS
Kabindra Koirala
 
PPT
ermodelN in database management system.ppt
urvashipundir04
 
PPTX
Unit2-ER-Diagram-28-jfjkfkjddghjdghjg11-2022-11am.pptx
kalyankcs21
 
PPT
Er diagrams
VisnuDharsini
 
PPTX
E_R-Diagram (2).pptx
sandeep54552
 
SQL.pptx
raghuKatagall1
 
Day 1 SQL.pptx
raghuKatagall1
 
The Database Environment Chapter 3
Jeanie Arnoco
 
Database Systems (3+1)_Entity Relationship Models (2).pptx
warkadngg
 
Adbms 16 object definition language
Vaibhav Khanna
 
Database management systems 3 - Data Modelling
Nickkisha Farrell
 
Database design
FLYMAN TECHNOLOGY LIMITED
 
Introduction of Database Design and Development
Er. Nawaraj Bhandari
 
chap03Corrected.ppt
MutiaSari53
 
5e7ry754.pptx
qwert001
 
Data modeling
Tala Alnaber
 
Data base management system Chapter21 (1).ppt
Vijayaraghavan Aravamuthan
 
entity-relationship-diagram-chen-&-crow -model.ppt
IRWANBINISMAILKPMGur1
 
Database Management System
FellowBuddy.com
 
databases2
c.west
 
ER Model in DBMS
Kabindra Koirala
 
ermodelN in database management system.ppt
urvashipundir04
 
Unit2-ER-Diagram-28-jfjkfkjddghjdghjg11-2022-11am.pptx
kalyankcs21
 
Er diagrams
VisnuDharsini
 
E_R-Diagram (2).pptx
sandeep54552
 
Ad

More from Jeanie Arnoco (20)

PPT
The Database Environment Chapter 13
Jeanie Arnoco
 
PPT
The Database Environment Chapter 12
Jeanie Arnoco
 
PPT
The Database Environment Chapter 9
Jeanie Arnoco
 
PPT
The Database Environment Chapter 7
Jeanie Arnoco
 
PPT
The Database Environment Chapter 5
Jeanie Arnoco
 
PPT
The Database Environment Chapter 4
Jeanie Arnoco
 
PPT
The Database Environment Chapter 2
Jeanie Arnoco
 
PPT
The Database Environment Chapter 1
Jeanie Arnoco
 
PPT
Introduction to BOOTSTRAP
Jeanie Arnoco
 
PPT
Introduction to programming using Visual Basic 6
Jeanie Arnoco
 
PPTX
Hacking and Online Security
Jeanie Arnoco
 
PPTX
(CAR)Cordillera Administrative Region
Jeanie Arnoco
 
PPTX
Quick sort-Data Structure
Jeanie Arnoco
 
PPTX
Quality Gurus Student
Jeanie Arnoco
 
PPT
QUALITY STANDARDS
Jeanie Arnoco
 
PPTX
Partnering for Competition: External Partnership
Jeanie Arnoco
 
PPTX
Partnering for Competition:Internal Partnership
Jeanie Arnoco
 
PPTX
CROSBY’S PHILOSOPHY
Jeanie Arnoco
 
PPTX
Juran’s Trilogy
Jeanie Arnoco
 
PPTX
Deming’s 14 Points for Management
Jeanie Arnoco
 
The Database Environment Chapter 13
Jeanie Arnoco
 
The Database Environment Chapter 12
Jeanie Arnoco
 
The Database Environment Chapter 9
Jeanie Arnoco
 
The Database Environment Chapter 7
Jeanie Arnoco
 
The Database Environment Chapter 5
Jeanie Arnoco
 
The Database Environment Chapter 4
Jeanie Arnoco
 
The Database Environment Chapter 2
Jeanie Arnoco
 
The Database Environment Chapter 1
Jeanie Arnoco
 
Introduction to BOOTSTRAP
Jeanie Arnoco
 
Introduction to programming using Visual Basic 6
Jeanie Arnoco
 
Hacking and Online Security
Jeanie Arnoco
 
(CAR)Cordillera Administrative Region
Jeanie Arnoco
 
Quick sort-Data Structure
Jeanie Arnoco
 
Quality Gurus Student
Jeanie Arnoco
 
QUALITY STANDARDS
Jeanie Arnoco
 
Partnering for Competition: External Partnership
Jeanie Arnoco
 
Partnering for Competition:Internal Partnership
Jeanie Arnoco
 
CROSBY’S PHILOSOPHY
Jeanie Arnoco
 
Juran’s Trilogy
Jeanie Arnoco
 
Deming’s 14 Points for Management
Jeanie Arnoco
 
Ad

Recently uploaded (20)

PDF
ARAL-Orientation_Morning-Session_Day-11.pdf
JoelVilloso1
 
PPTX
HYDROCEPHALUS: NURSING MANAGEMENT .pptx
PRADEEP ABOTHU
 
PDF
Generative AI: it's STILL not a robot (CIJ Summer 2025)
Paul Bradshaw
 
PPTX
How to Convert an Opportunity into a Quotation in Odoo 18 CRM
Celine George
 
PPT
Talk on Critical Theory, Part II, Philosophy of Social Sciences
Soraj Hongladarom
 
PPTX
Views on Education of Indian Thinkers J.Krishnamurthy..pptx
ShrutiMahanta1
 
PPTX
Unit 2 COMMERCIAL BANKING, Corporate banking.pptx
AnubalaSuresh1
 
PDF
CEREBRAL PALSY: NURSING MANAGEMENT .pdf
PRADEEP ABOTHU
 
PPTX
Views on Education of Indian Thinkers Mahatma Gandhi.pptx
ShrutiMahanta1
 
PPTX
SPINA BIFIDA: NURSING MANAGEMENT .pptx
PRADEEP ABOTHU
 
PDF
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 - GLOBAL SUCCESS - CẢ NĂM - NĂM 2024 (VOCABULARY, ...
Nguyen Thanh Tu Collection
 
PDF
community health nursing question paper 2.pdf
Prince kumar
 
PDF
IMP NAAC REFORMS 2024 - 10 Attributes.pdf
BHARTIWADEKAR
 
PPTX
2025 Winter SWAYAM NPTEL & A Student.pptx
Utsav Yagnik
 
PDF
SSHS-2025-PKLP_Quarter-1-Dr.-Kerby-Alvarez.pdf
AishahSangcopan1
 
PDF
Zoology (Animal Physiology) practical Manual
raviralanaresh2
 
PPTX
Stereochemistry-Optical Isomerism in organic compoundsptx
Tarannum Nadaf-Mansuri
 
PPTX
Growth and development and milestones, factors
BHUVANESHWARI BADIGER
 
PPTX
Mathematics 5 - Time Measurement: Time Zone
menchreo
 
PPTX
A PPT on Alfred Lord Tennyson's Ulysses.
Beena E S
 
ARAL-Orientation_Morning-Session_Day-11.pdf
JoelVilloso1
 
HYDROCEPHALUS: NURSING MANAGEMENT .pptx
PRADEEP ABOTHU
 
Generative AI: it's STILL not a robot (CIJ Summer 2025)
Paul Bradshaw
 
How to Convert an Opportunity into a Quotation in Odoo 18 CRM
Celine George
 
Talk on Critical Theory, Part II, Philosophy of Social Sciences
Soraj Hongladarom
 
Views on Education of Indian Thinkers J.Krishnamurthy..pptx
ShrutiMahanta1
 
Unit 2 COMMERCIAL BANKING, Corporate banking.pptx
AnubalaSuresh1
 
CEREBRAL PALSY: NURSING MANAGEMENT .pdf
PRADEEP ABOTHU
 
Views on Education of Indian Thinkers Mahatma Gandhi.pptx
ShrutiMahanta1
 
SPINA BIFIDA: NURSING MANAGEMENT .pptx
PRADEEP ABOTHU
 
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 - GLOBAL SUCCESS - CẢ NĂM - NĂM 2024 (VOCABULARY, ...
Nguyen Thanh Tu Collection
 
community health nursing question paper 2.pdf
Prince kumar
 
IMP NAAC REFORMS 2024 - 10 Attributes.pdf
BHARTIWADEKAR
 
2025 Winter SWAYAM NPTEL & A Student.pptx
Utsav Yagnik
 
SSHS-2025-PKLP_Quarter-1-Dr.-Kerby-Alvarez.pdf
AishahSangcopan1
 
Zoology (Animal Physiology) practical Manual
raviralanaresh2
 
Stereochemistry-Optical Isomerism in organic compoundsptx
Tarannum Nadaf-Mansuri
 
Growth and development and milestones, factors
BHUVANESHWARI BADIGER
 
Mathematics 5 - Time Measurement: Time Zone
menchreo
 
A PPT on Alfred Lord Tennyson's Ulysses.
Beena E S
 

The Database Environment Chapter 15

  • 1. 1 © Prentice Hall, 2002 Chapter 15:Chapter 15: Object-Oriented DatabaseObject-Oriented Database DevelopmentDevelopment Modern Database Management 6th Edition Jeffrey A. Hoffer, Mary B. Prescott, Fred R. McFadden
  • 2. 2Chapter 15 © Prentice Hall, Object Definition LanguageObject Definition Language (ODL)(ODL) Corresponds to SQL’s DDL (Data Definition Language) Specify the logical schema for an object- oriented database Based on the specifications of Object Database Management Group (ODMG)
  • 3. 3Chapter 15 © Prentice Hall, Defining a ClassDefining a Class classclass – keyword for defining classes attributeattribute – keyword for attributes operationsoperations – return type, name, parameters in parentheses relationshiprelationship – keyword for establishing relationship
  • 4. 4Chapter 15 © Prentice Hall, Defining an AttributeDefining an Attribute  Value can be either: – Object identifier OR Literal  Types of literals – Atomic – a constant that cannot be decomposed into components – Collection – multiple literals or object types – Structure – a fixed number of named elements, each of which could be a literal or object type  Attribute ranges – Allowable values for an attribute – enum – for enumerating the allowable values
  • 5. 5Chapter 15 © Prentice Hall, Kinds of CollectionsKinds of Collections  Set – unordered collection without duplicates  Bag – unordered collection that may contain duplicates  List – ordered collection, all the same type  Array – dynamically sized ordered collection, locatable by position  Dictionary – unordered sequence of key-value pairs without duplicates
  • 6. 6Chapter 15 © Prentice Hall, Defining StructuresDefining Structures Structure = user-defined type with components structstruct keyword Example: struct Address {struct Address { String street_addressString street_address String city;String city; String state;String state; String zip;String zip; };};
  • 7. 7Chapter 15 © Prentice Hall, Defining OperationsDefining Operations Return type Name Parentheses following the name Arguments within the parentheses
  • 8. 8Chapter 15 © Prentice Hall, Defining RelationshipsDefining Relationships  Only unary and binary relationships allowed  Relationships are bi-directional – implemented through use of inverse keyword  ODL relationships are specified: – relationship indicates that class is on many-side – relationship set indicates that class is on one-side and other class (many) instances unordered – relationship list indicates that class is on one-side and other class (many) instances ordered
  • 9. 9Chapter 15 © Prentice Hall, Figure 15-1 –UML class diagram for a university database The following slides illustrate the ODL implementation of this UML diagram
  • 10. 10Chapter 15 © Prentice Hall, Figure 15-2 –ODL Schema for university database
  • 11. 11Chapter 15 © Prentice Hall, Figure 15-2 –ODL Schema for university database class keyword begins the class definition.Class components enclosed between { and }
  • 12. 12Chapter 15 © Prentice Hall, Figure 15-2 – ODL Schema for university database attribute has a data type and a name specify allowable values using enum
  • 13. 13Chapter 15 © Prentice Hall, Figure 15-2 –ODL Schema for university database extent = the set of all instances of the class
  • 14. 14Chapter 15 © Prentice Hall, Figure 15-2 –ODL Schema for university database Operation definition: return type, name, and argument list. Arguments include data types and names
  • 15. 15Chapter 15 © Prentice Hall, Figure 15-2 –ODL Schema for university database relationship sets indicate 1:N relationship to an unordered collection of instances of the other class inverse establishes the bidirectionality of the relationship
  • 16. 16Chapter 15 © Prentice Hall, Figure 15-2 –ODL Schema for university database relationship list indicates 1:N relationship to an ordered collection of instances of the other class
  • 17. 17Chapter 15 © Prentice Hall, Figure 15-2 –ODL Schema for university database relationship indicates N:1 relationship to an instance of the other class
  • 18. 18Chapter 15 © Prentice Hall, Figure 15-3 – UML class diagram for an employee project database (a) Many-to-many relationship with an association class Note: In order to capture special features of assignment, this should be converted into two 1:N relationships
  • 19. 19Chapter 15 © Prentice Hall, Figure 15-3 – UML class diagram for an employee project database (b) Many-to many relationship broken into two one-to-many relationships class Employee { (extent employees key emp_id) …………. attribute set (string) skills_required; }; Note: key indicates indentifier (candidate key) Note: attribute set indicates a multivalued attribute
  • 20. 20Chapter 15 © Prentice Hall, Figure 15-4 UML class diagram showing employee generalization class Employee extends Employee{ ( …………. …………. } Note: extends denotes subclassing
  • 21. 21Chapter 15 © Prentice Hall, Figure 15-5 –UML class diagram showing student generalization abstract class Student extends Employee{ ( …………. abstract float calc_tuition(); } Note: abstract operation denotes no method (no implementation) of calc_tuition at the Student level Note: abstract class denotes non- instantiable (complete constraint)
  • 22. 22Chapter 15 © Prentice Hall, Creating Object InstancesCreating Object Instances  Specify a tag that will be the object identifier – MBA699 course ();  Initializing attributes: – Cheryl student (name: “Cheryl Davis”, dateOfBirth:4/5/77);  Initializing multivalued attributes: – Dan employee (emp_id: 3678, name: “Dan Bellon”, skills {“Database design”, “OO Modeling”});  Establishing links for relationship – Cheryl student (takes: {OOAD99F, Telecom99F, Java99F});
  • 23. 23Chapter 15 © Prentice Hall, Querying Objects in the OODBQuerying Objects in the OODB  Object Query Language (OQL)  ODMG standard language  Similar to SQL-92  Some differences: – Joins use class’s relationship name:  Select x.enrollment from courseofferings x, x.belongs_to y where y.crse_course = “MBA 664” and x.section = 1; – Using a set in a query  Select emp_id, name from employees where “Database Design” in skills;
  • 24. 24Chapter 15 © Prentice Hall, Current ODBMS ProductsCurrent ODBMS Products  Rising popularity due to: – CAD/CAM applications – Geographic information systems – Multimedia – Web-based applications – Increasingly complex data types  Applications of ODBMS – Bill-of-material – Telecommunications navigation – Health care – Engineering design – Finance and trading
  • 25. 25Chapter 15 © Prentice Hall, Table15-1 – ODBMS Products