SlideShare a Scribd company logo
1 of 25
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

What's hot (20)

Normalization case
Normalization caseNormalization case
Normalization case
 
Data Manipulation Language
Data Manipulation LanguageData Manipulation Language
Data Manipulation Language
 
Sql DML
Sql DMLSql DML
Sql DML
 
Denormalization
DenormalizationDenormalization
Denormalization
 
Rdbms
RdbmsRdbms
Rdbms
 
SQL
SQLSQL
SQL
 
Ch 12 O O D B Dvlpt
Ch 12  O O  D B  DvlptCh 12  O O  D B  Dvlpt
Ch 12 O O D B Dvlpt
 
When & Why\'s of Denormalization
When & Why\'s of DenormalizationWhen & Why\'s of Denormalization
When & Why\'s of Denormalization
 
Sql commands
Sql commandsSql commands
Sql commands
 
10.1.1.118.8129
10.1.1.118.812910.1.1.118.8129
10.1.1.118.8129
 
Data integrity
Data integrityData integrity
Data integrity
 
Sql server ___________session 3(sql 2008)
Sql server  ___________session 3(sql 2008)Sql server  ___________session 3(sql 2008)
Sql server ___________session 3(sql 2008)
 
An Overview on Data Quality Issues at Data Staging ETL
An Overview on Data Quality Issues at Data Staging ETLAn Overview on Data Quality Issues at Data Staging ETL
An Overview on Data Quality Issues at Data Staging ETL
 
Normalization of database_tables_chapter_4
Normalization of database_tables_chapter_4Normalization of database_tables_chapter_4
Normalization of database_tables_chapter_4
 
Dbms relational model
Dbms relational modelDbms relational model
Dbms relational model
 
Database Systems - SQL - DCL Statements (Chapter 3/4)
Database Systems - SQL - DCL Statements (Chapter 3/4)Database Systems - SQL - DCL Statements (Chapter 3/4)
Database Systems - SQL - DCL Statements (Chapter 3/4)
 
DML, DDL, DCL ,DRL/DQL and TCL Statements in SQL with Examples
DML, DDL, DCL ,DRL/DQL and TCL Statements in SQL with ExamplesDML, DDL, DCL ,DRL/DQL and TCL Statements in SQL with Examples
DML, DDL, DCL ,DRL/DQL and TCL Statements in SQL with Examples
 
SQL DDL
SQL DDLSQL DDL
SQL DDL
 
Dbms ii mca-ch8-db design-2013
Dbms ii mca-ch8-db design-2013Dbms ii mca-ch8-db design-2013
Dbms ii mca-ch8-db design-2013
 
Sql ch 9 - data integrity
Sql ch 9 - data integritySql ch 9 - data integrity
Sql ch 9 - data integrity
 

Similar to The Database Environment Chapter 15

Dbms ii mca-ch4-relational model-2013
Dbms ii mca-ch4-relational model-2013Dbms ii mca-ch4-relational model-2013
Dbms ii mca-ch4-relational model-2013Prosanta Ghosh
 
4_RelationalDataModelAndRelationalMapping.pdf
4_RelationalDataModelAndRelationalMapping.pdf4_RelationalDataModelAndRelationalMapping.pdf
4_RelationalDataModelAndRelationalMapping.pdfLPhct2
 
Oracle - Program with PL/SQL - Lession 02
Oracle - Program with PL/SQL - Lession 02Oracle - Program with PL/SQL - Lession 02
Oracle - Program with PL/SQL - Lession 02Thuan Nguyen
 
Presentation on c structures
Presentation on c   structures Presentation on c   structures
Presentation on c structures topu93
 
Presentation on c programing satcture
Presentation on c programing satcture Presentation on c programing satcture
Presentation on c programing satcture topu93
 
Software engg. pressman_ch-11
Software engg. pressman_ch-11Software engg. pressman_ch-11
Software engg. pressman_ch-11Dhairya Joshi
 
MIS5101 WK10 Outcome Measures
MIS5101 WK10 Outcome MeasuresMIS5101 WK10 Outcome Measures
MIS5101 WK10 Outcome MeasuresSteven Johnson
 
RDB-fundamentals-1-intro.ppt
RDB-fundamentals-1-intro.pptRDB-fundamentals-1-intro.ppt
RDB-fundamentals-1-intro.pptTHEFPS
 
Chapter 7 relation database language
Chapter 7 relation database languageChapter 7 relation database language
Chapter 7 relation database languageJafar Nesargi
 
Relational database language
Relational database languageRelational database language
Relational database languageJafar Nesargi
 
Assignment # 2PreliminariesImportant Points· Evidence of acad.docx
Assignment  # 2PreliminariesImportant Points· Evidence of acad.docxAssignment  # 2PreliminariesImportant Points· Evidence of acad.docx
Assignment # 2PreliminariesImportant Points· Evidence of acad.docxjane3dyson92312
 
Chapter 7 relation database language
Chapter 7 relation database languageChapter 7 relation database language
Chapter 7 relation database languageJafar Nesargi
 
Fundamentals of database system - Relational data model and relational datab...
Fundamentals of database system  - Relational data model and relational datab...Fundamentals of database system  - Relational data model and relational datab...
Fundamentals of database system - Relational data model and relational datab...Mustafa Kamel Mohammadi
 
COQUEL: A CONCEPTUAL QUERY LANGUAGE BASED ON THE ENTITYRELATIONSHIP MODEL
COQUEL: A CONCEPTUAL QUERY LANGUAGE BASED ON THE ENTITYRELATIONSHIP MODELCOQUEL: A CONCEPTUAL QUERY LANGUAGE BASED ON THE ENTITYRELATIONSHIP MODEL
COQUEL: A CONCEPTUAL QUERY LANGUAGE BASED ON THE ENTITYRELATIONSHIP MODELcsandit
 
COQUEL: A CONCEPTUAL QUERY LANGUAGE BASED ON THE ENTITYRELATIONSHIP MODEL
COQUEL: A CONCEPTUAL QUERY LANGUAGE BASED ON THE ENTITYRELATIONSHIP MODELCOQUEL: A CONCEPTUAL QUERY LANGUAGE BASED ON THE ENTITYRELATIONSHIP MODEL
COQUEL: A CONCEPTUAL QUERY LANGUAGE BASED ON THE ENTITYRELATIONSHIP MODELcscpconf
 
Analysing Performance of Algorithmic SQL and PLSQL.pptx
Analysing Performance of Algorithmic SQL and PLSQL.pptxAnalysing Performance of Algorithmic SQL and PLSQL.pptx
Analysing Performance of Algorithmic SQL and PLSQL.pptxBrendan Furey
 

Similar to The Database Environment Chapter 15 (20)

Dbms ii mca-ch4-relational model-2013
Dbms ii mca-ch4-relational model-2013Dbms ii mca-ch4-relational model-2013
Dbms ii mca-ch4-relational model-2013
 
2 rel-algebra
2 rel-algebra2 rel-algebra
2 rel-algebra
 
DBMS Unit-2.pdf
DBMS Unit-2.pdfDBMS Unit-2.pdf
DBMS Unit-2.pdf
 
21792 relational database managementsystem
21792 relational database managementsystem21792 relational database managementsystem
21792 relational database managementsystem
 
4_RelationalDataModelAndRelationalMapping.pdf
4_RelationalDataModelAndRelationalMapping.pdf4_RelationalDataModelAndRelationalMapping.pdf
4_RelationalDataModelAndRelationalMapping.pdf
 
Oracle - Program with PL/SQL - Lession 02
Oracle - Program with PL/SQL - Lession 02Oracle - Program with PL/SQL - Lession 02
Oracle - Program with PL/SQL - Lession 02
 
Presentation on c structures
Presentation on c   structures Presentation on c   structures
Presentation on c structures
 
Presentation on c programing satcture
Presentation on c programing satcture Presentation on c programing satcture
Presentation on c programing satcture
 
ch3.ppt
ch3.pptch3.ppt
ch3.ppt
 
Software engg. pressman_ch-11
Software engg. pressman_ch-11Software engg. pressman_ch-11
Software engg. pressman_ch-11
 
MIS5101 WK10 Outcome Measures
MIS5101 WK10 Outcome MeasuresMIS5101 WK10 Outcome Measures
MIS5101 WK10 Outcome Measures
 
RDB-fundamentals-1-intro.ppt
RDB-fundamentals-1-intro.pptRDB-fundamentals-1-intro.ppt
RDB-fundamentals-1-intro.ppt
 
Chapter 7 relation database language
Chapter 7 relation database languageChapter 7 relation database language
Chapter 7 relation database language
 
Relational database language
Relational database languageRelational database language
Relational database language
 
Assignment # 2PreliminariesImportant Points· Evidence of acad.docx
Assignment  # 2PreliminariesImportant Points· Evidence of acad.docxAssignment  # 2PreliminariesImportant Points· Evidence of acad.docx
Assignment # 2PreliminariesImportant Points· Evidence of acad.docx
 
Chapter 7 relation database language
Chapter 7 relation database languageChapter 7 relation database language
Chapter 7 relation database language
 
Fundamentals of database system - Relational data model and relational datab...
Fundamentals of database system  - Relational data model and relational datab...Fundamentals of database system  - Relational data model and relational datab...
Fundamentals of database system - Relational data model and relational datab...
 
COQUEL: A CONCEPTUAL QUERY LANGUAGE BASED ON THE ENTITYRELATIONSHIP MODEL
COQUEL: A CONCEPTUAL QUERY LANGUAGE BASED ON THE ENTITYRELATIONSHIP MODELCOQUEL: A CONCEPTUAL QUERY LANGUAGE BASED ON THE ENTITYRELATIONSHIP MODEL
COQUEL: A CONCEPTUAL QUERY LANGUAGE BASED ON THE ENTITYRELATIONSHIP MODEL
 
COQUEL: A CONCEPTUAL QUERY LANGUAGE BASED ON THE ENTITYRELATIONSHIP MODEL
COQUEL: A CONCEPTUAL QUERY LANGUAGE BASED ON THE ENTITYRELATIONSHIP MODELCOQUEL: A CONCEPTUAL QUERY LANGUAGE BASED ON THE ENTITYRELATIONSHIP MODEL
COQUEL: A CONCEPTUAL QUERY LANGUAGE BASED ON THE ENTITYRELATIONSHIP MODEL
 
Analysing Performance of Algorithmic SQL and PLSQL.pptx
Analysing Performance of Algorithmic SQL and PLSQL.pptxAnalysing Performance of Algorithmic SQL and PLSQL.pptx
Analysing Performance of Algorithmic SQL and PLSQL.pptx
 

More from Jeanie Arnoco

The Database Environment Chapter 13
The Database Environment Chapter 13The Database Environment Chapter 13
The Database Environment Chapter 13Jeanie Arnoco
 
The Database Environment Chapter 12
The Database Environment Chapter 12The Database Environment Chapter 12
The Database Environment Chapter 12Jeanie Arnoco
 
The Database Environment Chapter 9
The Database Environment Chapter 9The Database Environment Chapter 9
The Database Environment Chapter 9Jeanie Arnoco
 
The Database Environment Chapter 7
The Database Environment Chapter 7The Database Environment Chapter 7
The Database Environment Chapter 7Jeanie Arnoco
 
The Database Environment Chapter 5
The Database Environment Chapter 5The Database Environment Chapter 5
The Database Environment Chapter 5Jeanie Arnoco
 
The Database Environment Chapter 4
The Database Environment Chapter 4The Database Environment Chapter 4
The Database Environment Chapter 4Jeanie Arnoco
 
The Database Environment Chapter 3
The Database Environment Chapter 3The Database Environment Chapter 3
The Database Environment Chapter 3Jeanie Arnoco
 
The Database Environment Chapter 2
The Database Environment Chapter 2The Database Environment Chapter 2
The Database Environment Chapter 2Jeanie Arnoco
 
The Database Environment Chapter 1
The Database Environment Chapter 1The Database Environment Chapter 1
The Database Environment Chapter 1Jeanie Arnoco
 
Introduction to BOOTSTRAP
Introduction to BOOTSTRAPIntroduction to BOOTSTRAP
Introduction to BOOTSTRAPJeanie Arnoco
 
Introduction to programming using Visual Basic 6
Introduction to programming using Visual Basic 6Introduction to programming using Visual Basic 6
Introduction to programming using Visual Basic 6Jeanie Arnoco
 
Hacking and Online Security
Hacking and Online SecurityHacking and Online Security
Hacking and Online SecurityJeanie Arnoco
 
(CAR)Cordillera Administrative Region
(CAR)Cordillera Administrative Region (CAR)Cordillera Administrative Region
(CAR)Cordillera Administrative Region Jeanie Arnoco
 
Quick sort-Data Structure
Quick sort-Data StructureQuick sort-Data Structure
Quick sort-Data StructureJeanie Arnoco
 
Quality Gurus Student
Quality Gurus StudentQuality Gurus Student
Quality Gurus StudentJeanie Arnoco
 
Partnering for Competition: External Partnership
Partnering for Competition: External PartnershipPartnering for Competition: External Partnership
Partnering for Competition: External PartnershipJeanie Arnoco
 
Partnering for Competition:Internal Partnership
Partnering for Competition:Internal PartnershipPartnering for Competition:Internal Partnership
Partnering for Competition:Internal PartnershipJeanie Arnoco
 
CROSBY’S PHILOSOPHY
CROSBY’S PHILOSOPHYCROSBY’S PHILOSOPHY
CROSBY’S PHILOSOPHYJeanie Arnoco
 

More from Jeanie Arnoco (20)

The Database Environment Chapter 13
The Database Environment Chapter 13The Database Environment Chapter 13
The Database Environment Chapter 13
 
The Database Environment Chapter 12
The Database Environment Chapter 12The Database Environment Chapter 12
The Database Environment Chapter 12
 
The Database Environment Chapter 9
The Database Environment Chapter 9The Database Environment Chapter 9
The Database Environment Chapter 9
 
The Database Environment Chapter 7
The Database Environment Chapter 7The Database Environment Chapter 7
The Database Environment Chapter 7
 
The Database Environment Chapter 5
The Database Environment Chapter 5The Database Environment Chapter 5
The Database Environment Chapter 5
 
The Database Environment Chapter 4
The Database Environment Chapter 4The Database Environment Chapter 4
The Database Environment Chapter 4
 
The Database Environment Chapter 3
The Database Environment Chapter 3The Database Environment Chapter 3
The Database Environment Chapter 3
 
The Database Environment Chapter 2
The Database Environment Chapter 2The Database Environment Chapter 2
The Database Environment Chapter 2
 
The Database Environment Chapter 1
The Database Environment Chapter 1The Database Environment Chapter 1
The Database Environment Chapter 1
 
Introduction to BOOTSTRAP
Introduction to BOOTSTRAPIntroduction to BOOTSTRAP
Introduction to BOOTSTRAP
 
Introduction to programming using Visual Basic 6
Introduction to programming using Visual Basic 6Introduction to programming using Visual Basic 6
Introduction to programming using Visual Basic 6
 
Hacking and Online Security
Hacking and Online SecurityHacking and Online Security
Hacking and Online Security
 
(CAR)Cordillera Administrative Region
(CAR)Cordillera Administrative Region (CAR)Cordillera Administrative Region
(CAR)Cordillera Administrative Region
 
Quick sort-Data Structure
Quick sort-Data StructureQuick sort-Data Structure
Quick sort-Data Structure
 
Quality Gurus Student
Quality Gurus StudentQuality Gurus Student
Quality Gurus Student
 
QUALITY STANDARDS
QUALITY STANDARDSQUALITY STANDARDS
QUALITY STANDARDS
 
Partnering for Competition: External Partnership
Partnering for Competition: External PartnershipPartnering for Competition: External Partnership
Partnering for Competition: External Partnership
 
Partnering for Competition:Internal Partnership
Partnering for Competition:Internal PartnershipPartnering for Competition:Internal Partnership
Partnering for Competition:Internal Partnership
 
CROSBY’S PHILOSOPHY
CROSBY’S PHILOSOPHYCROSBY’S PHILOSOPHY
CROSBY’S PHILOSOPHY
 
Juran’s Trilogy
Juran’s TrilogyJuran’s Trilogy
Juran’s Trilogy
 

Recently uploaded

ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTiammrhaywood
 
How to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPHow to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPCeline George
 
Full Stack Web Development Course for Beginners
Full Stack Web Development Course  for BeginnersFull Stack Web Development Course  for Beginners
Full Stack Web Development Course for BeginnersSabitha Banu
 
Hierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of managementHierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of managementmkooblal
 
DATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersDATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersSabitha Banu
 
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatYousafMalik24
 
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...JhezDiaz1
 
Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Celine George
 
How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17Celine George
 
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdfAMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdfphamnguyenenglishnb
 
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxEPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxRaymartEstabillo3
 
Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Celine George
 
Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Celine George
 
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxMULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxAnupkumar Sharma
 

Recently uploaded (20)

ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
 
How to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPHow to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERP
 
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
 
Full Stack Web Development Course for Beginners
Full Stack Web Development Course  for BeginnersFull Stack Web Development Course  for Beginners
Full Stack Web Development Course for Beginners
 
Rapple "Scholarly Communications and the Sustainable Development Goals"
Rapple "Scholarly Communications and the Sustainable Development Goals"Rapple "Scholarly Communications and the Sustainable Development Goals"
Rapple "Scholarly Communications and the Sustainable Development Goals"
 
Hierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of managementHierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of management
 
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdfTataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
 
DATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersDATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginners
 
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice great
 
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
 
Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17
 
How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17
 
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdfAMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
 
OS-operating systems- ch04 (Threads) ...
OS-operating systems- ch04 (Threads) ...OS-operating systems- ch04 (Threads) ...
OS-operating systems- ch04 (Threads) ...
 
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxEPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
 
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
 
Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17
 
Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17
 
9953330565 Low Rate Call Girls In Rohini Delhi NCR
9953330565 Low Rate Call Girls In Rohini  Delhi NCR9953330565 Low Rate Call Girls In Rohini  Delhi NCR
9953330565 Low Rate Call Girls In Rohini Delhi NCR
 
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxMULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
 

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