SlideShare a Scribd company logo
1 of 24
TOPIC
Object Oriented Database
Present By:
Md. Hasan Imam Bijoy
Student of C.S.E
Email: hasan15-11743@diu.edu.bd
Daffodil International University, Dhaka, Bangladesh.
Presentation Outline:
 Object Definitions
 Object Structures
 Object-Oriented Concepts
 Object-Oriented Databases
 Object Query Language(OQL) with Example
 Object-Oriented SQL
 Advantage of OODBS etc.
Definition of an Object
 Object – User defined complex data types
• An object has structure of state (variable) and methods
(behavior/operation)
 An Object is described by four characteristics:
• Identifier : a system-wide unique id for an object
• Name : an object may also have a unique name in DB
(optional)
• Lifetime: determines if the object is persistent or transient
• Structure: Construction of objects using type constructor
Object Structure
The State (current value) of a complex object may be constructed
from other objects (or other vales) by suing certain type
constructor
Can be represent by (I,C,V)
 I is an unique id
 C is a type constructor
 V is the object state
Basic types : Atom, tuple and set
Collection type : list, bag and array
Object Oriented Concept
Abstract Data Types
 Class definition, provide extension to complex attribute types
Encapsulation
 Implementation of operation and object structure hidden
 Inheritance
 Sharing of data withing hierarchy scope, support code
reusability
Polymorphism
 Operator overloading
Object Oriented Database
Abstract Data Types
 A database system that incorporates all the important
object-oriented concepts
 Some additional feature
 Unique Object identifiers
 Persistent object handling
Object Query Language (OQL)
Declarative Query Language
 Not Computationally Complete
 Syntax based on SQL(Select, from where)
 Additional flexibility (queries with user defined operators and types)
Example of OQL
The following is a sample query
“what ate the name of the black product?”
Select distinct p.name
From Products p
Where p.color = “Black”
 Valid in both SQL and OQL, but result are different .
Result of the Query (SQL)
Product No Name Color
P1 Ford Mustang Black
P2 Toyota Celica Green
P3 Mercedes SLK Black
Result:
Name
Ford Mustang
Mercedes SLK
 The statement queries a relational
database
 Returns a table with rows
Original Table:
Result of the Query (OQL)
Product No Name Color
P1 Ford Mustang Black
P2 Toyota Celica Green
P3 Mercedes SLK Black
Original Table:
Result:
String String
Ford Mustang Mercedes SLK
 The statement queries a object
oriented database
 Returns a collection of object
Comparison
Queries look very similar in SQL and OQL, sometimes they are the
same
In fact , the result they give are very different
Query returns:
OQL SQL
Object Tuple
Collection of Objects Table
Object Oriented SQL – SQL3
Foundation for OO database management systems –
ORACLE8, DB2, etc.
New features – “relation” & “Object oriented”
Relational Feature – new data types, new predicts,
enhanced semantics, additional security and an active
database
Object Oriented Features – support for functions and
procedures
User Define Datatypes
 Creating a “row type”
Example:
Create row type AddressType(
street char(50)
city char(20));
Create row type StarType(
Name char(30)
Address AddressType)
Creating Data types
 Creating “Table”
• Create table Address of type AddressType;
• Create table MovieStar of type StarType;
• Instances of Row types are tuples in table;
Sample Query
 Find the name and street addresses of those
MovieStars who stay in the city “Columbus”;
• Select MovieStar.name,
MovieStar.address.street
From MovieStar
Where MovieStar.address.city = “Columbus”;
Complex Data & Queries:
A Water Resource Management example
 A Database of state wide water projects
 Includes a library of picture sliders
 Indexing according to predefined concepts –
prohibitively expensive
 Type of Queries
 Geographic locations
 Reservoir levels during droughts
 Recent flood condition, etc.
Complex Data & Queries:
Addressing these queries
 Linking this database to landmarks on a topographic
map
 Examining the captions for each slide
 Implementing image-understanding programs
 Inspecting images and ascertaining attributes
These type of queries necessitate dedicated “methods”
Creating Function
 Create function one() returns int as “select 1 as RESULT”
language “SQL”
Select one() as answer:
Result
Answer
1
Creating “Table” & “Methods”
 Implementation:
Create tables slides(
id int,
date date,
Caption document,
pictureCD_Image,
method containsName
(name varchar)
return boolean
as external name “matching”
language ‘C’ );
Implementation
 Sample Query
Find a picture of a reservoir with lower level which
is in “Sacramento”
Select slides P, landmark L
Where isLowWaterLevel (P.picture) and
P.containsName (L.name) and L. name=“Sacramento”;
Object-Relational Mapping
 Object-Relational Mapping (ORM) systems built on top of traditional relational databases
 Implementor provides a mapping from objects to relations
 Objects are purely transient, no permanent object identity
 Objects can be retried from database
 System uses mapping to fetch relevant data from relations and construct objects
 Updated objects are stored back in database by generating corresponding update/insert/delete statements
 The Hibernate ORM system is widely used
 described in Section 9.4.2
 Provides API to start/end transactions, fetch objects, etc.
 Provides query language operating directly on object model
 queries translated to SQL
 Limitations: overheads, especially for bulk updates
Advantage of OODBMS
 Designer can specify the structure of objects and
their behavior (methods)
 Better interaction with object-oriented language
such as Java and C++
 Definition of complex and user-defined types
 Encapsulation of operations and user-defined
methods
A Water Resource Management example
 A Database of state wide water projects
 Includes a library of picture sliders
 Indexing according to predefined concepts –
prohibitively expensive
 Type of Queries
 Geographic locations
 Reservoir levels during droughts
 Recent flood condition, etc.
Thank you

More Related Content

What's hot

Entity Relationship Model
Entity Relationship ModelEntity Relationship Model
Entity Relationship ModelNeil Neelesh
 
The Object Oriented Database System Manifesto
The Object Oriented Database System ManifestoThe Object Oriented Database System Manifesto
The Object Oriented Database System ManifestoBeat Signer
 
Object Oriented Dbms
Object Oriented DbmsObject Oriented Dbms
Object Oriented Dbmsmaryeem
 
Advance Database Management Systems -Object Oriented Principles In Database
Advance Database Management Systems -Object Oriented Principles In DatabaseAdvance Database Management Systems -Object Oriented Principles In Database
Advance Database Management Systems -Object Oriented Principles In DatabaseSonali Parab
 
Introduction to Oracle Database
Introduction to Oracle DatabaseIntroduction to Oracle Database
Introduction to Oracle Databasepuja_dhar
 
Oracle Database Overview
Oracle Database OverviewOracle Database Overview
Oracle Database Overviewhonglee71
 
ADBMS Object and Object Relational Databases
ADBMS  Object  and Object Relational Databases ADBMS  Object  and Object Relational Databases
ADBMS Object and Object Relational Databases Jayanthi Kannan MK
 
OODM-object oriented data model
OODM-object oriented data modelOODM-object oriented data model
OODM-object oriented data modelAnilPokhrel7
 
Object Relational Database Management System(ORDBMS)
Object Relational Database Management System(ORDBMS)Object Relational Database Management System(ORDBMS)
Object Relational Database Management System(ORDBMS)Rabin BK
 
Object oriented programming
Object oriented programmingObject oriented programming
Object oriented programmingAmit Soni (CTFL)
 
Basic Concept Of Database Management System (DBMS) [Presentation Slide]
Basic Concept Of Database Management System (DBMS) [Presentation Slide]Basic Concept Of Database Management System (DBMS) [Presentation Slide]
Basic Concept Of Database Management System (DBMS) [Presentation Slide]Atik Israk
 
1. Introduction to DBMS
1. Introduction to DBMS1. Introduction to DBMS
1. Introduction to DBMSkoolkampus
 

What's hot (20)

Databases: Normalisation
Databases: NormalisationDatabases: Normalisation
Databases: Normalisation
 
Entity Relationship Model
Entity Relationship ModelEntity Relationship Model
Entity Relationship Model
 
Data models
Data modelsData models
Data models
 
The Object Oriented Database System Manifesto
The Object Oriented Database System ManifestoThe Object Oriented Database System Manifesto
The Object Oriented Database System Manifesto
 
File organization
File organizationFile organization
File organization
 
Object Oriented Dbms
Object Oriented DbmsObject Oriented Dbms
Object Oriented Dbms
 
Advance Database Management Systems -Object Oriented Principles In Database
Advance Database Management Systems -Object Oriented Principles In DatabaseAdvance Database Management Systems -Object Oriented Principles In Database
Advance Database Management Systems -Object Oriented Principles In Database
 
Entity relationship modelling
Entity relationship modellingEntity relationship modelling
Entity relationship modelling
 
Introduction to Oracle Database
Introduction to Oracle DatabaseIntroduction to Oracle Database
Introduction to Oracle Database
 
Oracle Database Overview
Oracle Database OverviewOracle Database Overview
Oracle Database Overview
 
ADBMS Object and Object Relational Databases
ADBMS  Object  and Object Relational Databases ADBMS  Object  and Object Relational Databases
ADBMS Object and Object Relational Databases
 
OODM-object oriented data model
OODM-object oriented data modelOODM-object oriented data model
OODM-object oriented data model
 
Object Relational Database Management System(ORDBMS)
Object Relational Database Management System(ORDBMS)Object Relational Database Management System(ORDBMS)
Object Relational Database Management System(ORDBMS)
 
Object oriented programming
Object oriented programmingObject oriented programming
Object oriented programming
 
Basic Concept Of Database Management System (DBMS) [Presentation Slide]
Basic Concept Of Database Management System (DBMS) [Presentation Slide]Basic Concept Of Database Management System (DBMS) [Presentation Slide]
Basic Concept Of Database Management System (DBMS) [Presentation Slide]
 
DBMS Part-4.pdf
DBMS Part-4.pdfDBMS Part-4.pdf
DBMS Part-4.pdf
 
Ordbms
OrdbmsOrdbms
Ordbms
 
Ado.Net Tutorial
Ado.Net TutorialAdo.Net Tutorial
Ado.Net Tutorial
 
Lecture2 oracle ppt
Lecture2 oracle pptLecture2 oracle ppt
Lecture2 oracle ppt
 
1. Introduction to DBMS
1. Introduction to DBMS1. Introduction to DBMS
1. Introduction to DBMS
 

Similar to Object oriented database

MIT302 Lesson 2_Advanced Database Systems.pptx
MIT302 Lesson 2_Advanced Database Systems.pptxMIT302 Lesson 2_Advanced Database Systems.pptx
MIT302 Lesson 2_Advanced Database Systems.pptxelsagalgao
 
Chapter 1 - Concepts for Object Databases.ppt
Chapter 1 - Concepts for Object Databases.pptChapter 1 - Concepts for Object Databases.ppt
Chapter 1 - Concepts for Object Databases.pptShemse Shukre
 
05 entity framework
05 entity framework05 entity framework
05 entity frameworkglubox
 
Adv DB - Full Handout.pdf
Adv DB - Full Handout.pdfAdv DB - Full Handout.pdf
Adv DB - Full Handout.pdf3BRBoruMedia
 
Alternatives of JPA/Hibernate
Alternatives of JPA/HibernateAlternatives of JPA/Hibernate
Alternatives of JPA/HibernateSunghyouk Bae
 
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 Dvlptguest8fdbdd
 
CS124-L1-OOP.ppt
CS124-L1-OOP.pptCS124-L1-OOP.ppt
CS124-L1-OOP.pptMonishaAb1
 
Adbms 17 object query language
Adbms 17 object query languageAdbms 17 object query language
Adbms 17 object query languageVaibhav Khanna
 
Java is an Object-Oriented Language
Java is an Object-Oriented LanguageJava is an Object-Oriented Language
Java is an Object-Oriented Languageale8819
 
From relational data to object spaces
From relational data to object spacesFrom relational data to object spaces
From relational data to object spacesAndrea Saltarello
 
Entity framework 4.0
Entity framework 4.0Entity framework 4.0
Entity framework 4.0Abhishek Sur
 
Multi-Model Data Query Languages and Processing Paradigms
Multi-Model Data Query Languages and Processing ParadigmsMulti-Model Data Query Languages and Processing Paradigms
Multi-Model Data Query Languages and Processing ParadigmsJiaheng Lu
 

Similar to Object oriented database (20)

215 oodb
215 oodb215 oodb
215 oodb
 
Oodb
OodbOodb
Oodb
 
Oodb
OodbOodb
Oodb
 
OODB
OODBOODB
OODB
 
MIT302 Lesson 2_Advanced Database Systems.pptx
MIT302 Lesson 2_Advanced Database Systems.pptxMIT302 Lesson 2_Advanced Database Systems.pptx
MIT302 Lesson 2_Advanced Database Systems.pptx
 
Chapter 1 - Concepts for Object Databases.ppt
Chapter 1 - Concepts for Object Databases.pptChapter 1 - Concepts for Object Databases.ppt
Chapter 1 - Concepts for Object Databases.ppt
 
05 entity framework
05 entity framework05 entity framework
05 entity framework
 
Adv DB - Full Handout.pdf
Adv DB - Full Handout.pdfAdv DB - Full Handout.pdf
Adv DB - Full Handout.pdf
 
Alternatives of JPA/Hibernate
Alternatives of JPA/HibernateAlternatives of JPA/Hibernate
Alternatives of JPA/Hibernate
 
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
 
CS124-L1-OOP.ppt
CS124-L1-OOP.pptCS124-L1-OOP.ppt
CS124-L1-OOP.ppt
 
Adbms 17 object query language
Adbms 17 object query languageAdbms 17 object query language
Adbms 17 object query language
 
java
javajava
java
 
Java is an Object-Oriented Language
Java is an Object-Oriented LanguageJava is an Object-Oriented Language
Java is an Object-Oriented Language
 
oodb.ppt
oodb.pptoodb.ppt
oodb.ppt
 
From relational data to object spaces
From relational data to object spacesFrom relational data to object spaces
From relational data to object spaces
 
Entity framework 4.0
Entity framework 4.0Entity framework 4.0
Entity framework 4.0
 
2 rel-algebra
2 rel-algebra2 rel-algebra
2 rel-algebra
 
Multi-Model Data Query Languages and Processing Paradigms
Multi-Model Data Query Languages and Processing ParadigmsMulti-Model Data Query Languages and Processing Paradigms
Multi-Model Data Query Languages and Processing Paradigms
 
Entity Framework 4
Entity Framework 4Entity Framework 4
Entity Framework 4
 

More from Md. Hasan Imam Bijoy

More from Md. Hasan Imam Bijoy (12)

Introduction to System, Simulation and Model
Introduction to System, Simulation and ModelIntroduction to System, Simulation and Model
Introduction to System, Simulation and Model
 
Introduction to Web Engineering by H.I. Bijoy
Introduction to Web Engineering by H.I. BijoyIntroduction to Web Engineering by H.I. Bijoy
Introduction to Web Engineering by H.I. Bijoy
 
Basic Accounting by Md. Hasan Imam Bijoy
Basic Accounting by Md. Hasan Imam BijoyBasic Accounting by Md. Hasan Imam Bijoy
Basic Accounting by Md. Hasan Imam Bijoy
 
Software Process and Model by Md. Hasan Imam Bijoy
Software Process and  Model by Md. Hasan Imam BijoySoftware Process and  Model by Md. Hasan Imam Bijoy
Software Process and Model by Md. Hasan Imam Bijoy
 
Introduction to Compiler by Md. Hasan Imam Bijoy
Introduction to Compiler by Md. Hasan Imam BijoyIntroduction to Compiler by Md. Hasan Imam Bijoy
Introduction to Compiler by Md. Hasan Imam Bijoy
 
Encoder
EncoderEncoder
Encoder
 
Time Division Multiplexing
Time Division MultiplexingTime Division Multiplexing
Time Division Multiplexing
 
Time management
Time management Time management
Time management
 
Impression management
Impression managementImpression management
Impression management
 
Covid 19
Covid 19Covid 19
Covid 19
 
Routing
RoutingRouting
Routing
 
Time and Financial Management
Time and Financial ManagementTime and Financial Management
Time and Financial Management
 

Recently uploaded

General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...Poonam Aher Patil
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxDenish Jangid
 
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...Pooja Bhuva
 
How to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptxHow to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptxCeline George
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...ZurliaSoop
 
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdfUnit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdfDr Vijay Vishwakarma
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17Celine George
 
Graduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - EnglishGraduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - Englishneillewis46
 
How to Add New Custom Addons Path in Odoo 17
How to Add New Custom Addons Path in Odoo 17How to Add New Custom Addons Path in Odoo 17
How to Add New Custom Addons Path in Odoo 17Celine George
 
Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsKarakKing
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and ModificationsMJDuyan
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxheathfieldcps1
 
Interdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptxInterdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptxPooja Bhuva
 
FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024Elizabeth Walsh
 
Wellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptxWellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptxJisc
 
Tatlong Kwento ni Lola basyang-1.pdf arts
Tatlong Kwento ni Lola basyang-1.pdf artsTatlong Kwento ni Lola basyang-1.pdf arts
Tatlong Kwento ni Lola basyang-1.pdf artsNbelano25
 
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptxExploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptxPooja Bhuva
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.MaryamAhmad92
 
OSCM Unit 2_Operations Processes & Systems
OSCM Unit 2_Operations Processes & SystemsOSCM Unit 2_Operations Processes & Systems
OSCM Unit 2_Operations Processes & SystemsSandeep D Chaudhary
 
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptxOn_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptxPooja Bhuva
 

Recently uploaded (20)

General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
 
How to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptxHow to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptx
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
 
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdfUnit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdf
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17
 
Graduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - EnglishGraduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - English
 
How to Add New Custom Addons Path in Odoo 17
How to Add New Custom Addons Path in Odoo 17How to Add New Custom Addons Path in Odoo 17
How to Add New Custom Addons Path in Odoo 17
 
Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functions
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and Modifications
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
 
Interdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptxInterdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptx
 
FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024
 
Wellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptxWellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptx
 
Tatlong Kwento ni Lola basyang-1.pdf arts
Tatlong Kwento ni Lola basyang-1.pdf artsTatlong Kwento ni Lola basyang-1.pdf arts
Tatlong Kwento ni Lola basyang-1.pdf arts
 
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptxExploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.
 
OSCM Unit 2_Operations Processes & Systems
OSCM Unit 2_Operations Processes & SystemsOSCM Unit 2_Operations Processes & Systems
OSCM Unit 2_Operations Processes & Systems
 
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptxOn_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
 

Object oriented database

  • 1. TOPIC Object Oriented Database Present By: Md. Hasan Imam Bijoy Student of C.S.E Email: hasan15-11743@diu.edu.bd Daffodil International University, Dhaka, Bangladesh.
  • 2. Presentation Outline:  Object Definitions  Object Structures  Object-Oriented Concepts  Object-Oriented Databases  Object Query Language(OQL) with Example  Object-Oriented SQL  Advantage of OODBS etc.
  • 3. Definition of an Object  Object – User defined complex data types • An object has structure of state (variable) and methods (behavior/operation)  An Object is described by four characteristics: • Identifier : a system-wide unique id for an object • Name : an object may also have a unique name in DB (optional) • Lifetime: determines if the object is persistent or transient • Structure: Construction of objects using type constructor
  • 4. Object Structure The State (current value) of a complex object may be constructed from other objects (or other vales) by suing certain type constructor Can be represent by (I,C,V)  I is an unique id  C is a type constructor  V is the object state Basic types : Atom, tuple and set Collection type : list, bag and array
  • 5. Object Oriented Concept Abstract Data Types  Class definition, provide extension to complex attribute types Encapsulation  Implementation of operation and object structure hidden  Inheritance  Sharing of data withing hierarchy scope, support code reusability Polymorphism  Operator overloading
  • 6. Object Oriented Database Abstract Data Types  A database system that incorporates all the important object-oriented concepts  Some additional feature  Unique Object identifiers  Persistent object handling
  • 7. Object Query Language (OQL) Declarative Query Language  Not Computationally Complete  Syntax based on SQL(Select, from where)  Additional flexibility (queries with user defined operators and types)
  • 8. Example of OQL The following is a sample query “what ate the name of the black product?” Select distinct p.name From Products p Where p.color = “Black”  Valid in both SQL and OQL, but result are different .
  • 9. Result of the Query (SQL) Product No Name Color P1 Ford Mustang Black P2 Toyota Celica Green P3 Mercedes SLK Black Result: Name Ford Mustang Mercedes SLK  The statement queries a relational database  Returns a table with rows Original Table:
  • 10. Result of the Query (OQL) Product No Name Color P1 Ford Mustang Black P2 Toyota Celica Green P3 Mercedes SLK Black Original Table: Result: String String Ford Mustang Mercedes SLK  The statement queries a object oriented database  Returns a collection of object
  • 11. Comparison Queries look very similar in SQL and OQL, sometimes they are the same In fact , the result they give are very different Query returns: OQL SQL Object Tuple Collection of Objects Table
  • 12. Object Oriented SQL – SQL3 Foundation for OO database management systems – ORACLE8, DB2, etc. New features – “relation” & “Object oriented” Relational Feature – new data types, new predicts, enhanced semantics, additional security and an active database Object Oriented Features – support for functions and procedures
  • 13. User Define Datatypes  Creating a “row type” Example: Create row type AddressType( street char(50) city char(20)); Create row type StarType( Name char(30) Address AddressType)
  • 14. Creating Data types  Creating “Table” • Create table Address of type AddressType; • Create table MovieStar of type StarType; • Instances of Row types are tuples in table;
  • 15. Sample Query  Find the name and street addresses of those MovieStars who stay in the city “Columbus”; • Select MovieStar.name, MovieStar.address.street From MovieStar Where MovieStar.address.city = “Columbus”;
  • 16. Complex Data & Queries: A Water Resource Management example  A Database of state wide water projects  Includes a library of picture sliders  Indexing according to predefined concepts – prohibitively expensive  Type of Queries  Geographic locations  Reservoir levels during droughts  Recent flood condition, etc.
  • 17. Complex Data & Queries: Addressing these queries  Linking this database to landmarks on a topographic map  Examining the captions for each slide  Implementing image-understanding programs  Inspecting images and ascertaining attributes These type of queries necessitate dedicated “methods”
  • 18. Creating Function  Create function one() returns int as “select 1 as RESULT” language “SQL” Select one() as answer: Result Answer 1
  • 19. Creating “Table” & “Methods”  Implementation: Create tables slides( id int, date date, Caption document, pictureCD_Image, method containsName (name varchar) return boolean as external name “matching” language ‘C’ );
  • 20. Implementation  Sample Query Find a picture of a reservoir with lower level which is in “Sacramento” Select slides P, landmark L Where isLowWaterLevel (P.picture) and P.containsName (L.name) and L. name=“Sacramento”;
  • 21. Object-Relational Mapping  Object-Relational Mapping (ORM) systems built on top of traditional relational databases  Implementor provides a mapping from objects to relations  Objects are purely transient, no permanent object identity  Objects can be retried from database  System uses mapping to fetch relevant data from relations and construct objects  Updated objects are stored back in database by generating corresponding update/insert/delete statements  The Hibernate ORM system is widely used  described in Section 9.4.2  Provides API to start/end transactions, fetch objects, etc.  Provides query language operating directly on object model  queries translated to SQL  Limitations: overheads, especially for bulk updates
  • 22. Advantage of OODBMS  Designer can specify the structure of objects and their behavior (methods)  Better interaction with object-oriented language such as Java and C++  Definition of complex and user-defined types  Encapsulation of operations and user-defined methods
  • 23. A Water Resource Management example  A Database of state wide water projects  Includes a library of picture sliders  Indexing according to predefined concepts – prohibitively expensive  Type of Queries  Geographic locations  Reservoir levels during droughts  Recent flood condition, etc.

Editor's Notes

  1. NOTE: To change the image on this slide, select the picture and delete it. Then click the Pictures icon in the placeholder to insert your own image.