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

PPT
The Database Environment Chapter 8
PPT
The Database Environment Chapter 11
PPT
The Database Environment Chapter 10
PPT
The Database Environment Chapter 14
PPT
The Database Environment Chapter 6
PPT
Dbms ii mca-ch7-sql-2013
PPT
Sql intro & ddl 1
PPT
Dwh lecture-07-denormalization
The Database Environment Chapter 8
The Database Environment Chapter 11
The Database Environment Chapter 10
The Database Environment Chapter 14
The Database Environment Chapter 6
Dbms ii mca-ch7-sql-2013
Sql intro & ddl 1
Dwh lecture-07-denormalization

What's hot (20)

PPT
Normalization case
PPTX
Data Manipulation Language
PPT
Sql DML
PPTX
Denormalization
PPSX
PPTX
PPT
Ch 12 O O D B Dvlpt
PPT
When & Why\'s of Denormalization
ODP
PDF
10.1.1.118.8129
PPT
Data integrity
PPT
Sql server ___________session 3(sql 2008)
PDF
An Overview on Data Quality Issues at Data Staging ETL
PPT
Normalization of database_tables_chapter_4
PPT
Dbms relational model
PPTX
Database Systems - SQL - DCL Statements (Chapter 3/4)
PPTX
DML, DDL, DCL ,DRL/DQL and TCL Statements in SQL with Examples
PPT
SQL DDL
PPT
Dbms ii mca-ch8-db design-2013
PDF
Sql ch 9 - data integrity
Normalization case
Data Manipulation Language
Sql DML
Denormalization
Ch 12 O O D B Dvlpt
When & Why\'s of Denormalization
10.1.1.118.8129
Data integrity
Sql server ___________session 3(sql 2008)
An Overview on Data Quality Issues at Data Staging ETL
Normalization of database_tables_chapter_4
Dbms relational model
Database Systems - SQL - DCL Statements (Chapter 3/4)
DML, DDL, DCL ,DRL/DQL and TCL Statements in SQL with Examples
SQL DDL
Dbms ii mca-ch8-db design-2013
Sql ch 9 - data integrity
Ad

Similar to The Database Environment Chapter 15 (20)

PPTX
Day 1 SQL.pptx
PPTX
SQL.pptx
PPT
The Database Environment Chapter 3
PPTX
Database Systems (3+1)_Entity Relationship Models (2).pptx
PPTX
Adbms 16 object definition language
PPTX
Database management systems 3 - Data Modelling
PPT
Database design
PPTX
Introduction of Database Design and Development
PPT
chap03Corrected.ppt
PPTX
5e7ry754.pptx
PPTX
Data modeling
PPT
Data base management system Chapter21 (1).ppt
PPT
entity-relationship-diagram-chen-&-crow -model.ppt
PPT
Database Management System
PPT
databases2
ODP
ER Model in DBMS
PPT
ermodelN in database management system.ppt
PPTX
Unit2-ER-Diagram-28-jfjkfkjddghjdghjg11-2022-11am.pptx
PPT
Er diagrams
PPTX
E_R-Diagram (2).pptx
Day 1 SQL.pptx
SQL.pptx
The Database Environment Chapter 3
Database Systems (3+1)_Entity Relationship Models (2).pptx
Adbms 16 object definition language
Database management systems 3 - Data Modelling
Database design
Introduction of Database Design and Development
chap03Corrected.ppt
5e7ry754.pptx
Data modeling
Data base management system Chapter21 (1).ppt
entity-relationship-diagram-chen-&-crow -model.ppt
Database Management System
databases2
ER Model in DBMS
ermodelN in database management system.ppt
Unit2-ER-Diagram-28-jfjkfkjddghjdghjg11-2022-11am.pptx
Er diagrams
E_R-Diagram (2).pptx
Ad

More from Jeanie Arnoco (20)

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

Recently uploaded (20)

PPTX
human mycosis Human fungal infections are called human mycosis..pptx
PPTX
Pharma ospi slides which help in ospi learning
PDF
Physiotherapy_for_Respiratory_and_Cardiac_Problems WEBBER.pdf
PPTX
Final Presentation General Medicine 03-08-2024.pptx
PDF
Computing-Curriculum for Schools in Ghana
PDF
Sports Quiz easy sports quiz sports quiz
PDF
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
PPTX
IMMUNITY IMMUNITY refers to protection against infection, and the immune syst...
PDF
3rd Neelam Sanjeevareddy Memorial Lecture.pdf
PDF
BÀI TẬP BỔ TRỢ 4 KỸ NĂNG TIẾNG ANH 9 GLOBAL SUCCESS - CẢ NĂM - BÁM SÁT FORM Đ...
PPTX
master seminar digital applications in india
PDF
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
PDF
Microbial disease of the cardiovascular and lymphatic systems
PDF
Saundersa Comprehensive Review for the NCLEX-RN Examination.pdf
PDF
Basic Mud Logging Guide for educational purpose
PDF
FourierSeries-QuestionsWithAnswers(Part-A).pdf
PDF
Module 4: Burden of Disease Tutorial Slides S2 2025
PDF
Abdominal Access Techniques with Prof. Dr. R K Mishra
PPTX
Cell Types and Its function , kingdom of life
PDF
Classroom Observation Tools for Teachers
human mycosis Human fungal infections are called human mycosis..pptx
Pharma ospi slides which help in ospi learning
Physiotherapy_for_Respiratory_and_Cardiac_Problems WEBBER.pdf
Final Presentation General Medicine 03-08-2024.pptx
Computing-Curriculum for Schools in Ghana
Sports Quiz easy sports quiz sports quiz
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
IMMUNITY IMMUNITY refers to protection against infection, and the immune syst...
3rd Neelam Sanjeevareddy Memorial Lecture.pdf
BÀI TẬP BỔ TRỢ 4 KỸ NĂNG TIẾNG ANH 9 GLOBAL SUCCESS - CẢ NĂM - BÁM SÁT FORM Đ...
master seminar digital applications in india
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
Microbial disease of the cardiovascular and lymphatic systems
Saundersa Comprehensive Review for the NCLEX-RN Examination.pdf
Basic Mud Logging Guide for educational purpose
FourierSeries-QuestionsWithAnswers(Part-A).pdf
Module 4: Burden of Disease Tutorial Slides S2 2025
Abdominal Access Techniques with Prof. Dr. R K Mishra
Cell Types and Its function , kingdom of life
Classroom Observation Tools for Teachers

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