SlideShare uma empresa Scribd logo
1 de 22
Object Oriented Database
Group 4
Mathieu Metz
Palani Kumaresan
Napa Gavinlertvatana
Kristine Pei Keow Lee
Prabhu Ramachandran
Outline
 Object definitions
 Object Structures
 Object-oriented concepts
 OODBS
 OQL with an example
 SQL3 with examples
Definition of an object
Objects – User defined complex data types
An object has structure or state (variables) and methods
(behavior/operations)
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 constructors
Object Structure
 The state (current value) of a complex object may be
constructed from other objects (or other values) by
using certain type constructors

Can be represented by (i,c,v)
 i is an unique id
 c is a type constructor
 v is the object state
 Constructors
 Basic types: atom, tuple and set
 Collection type: list, bag and array
Object-Oriented Concepts
 Abstract Data Types
 Class definition, provides extension to complex
attribute types
 Encapsulation
 Implementation of operations and object structure
hidden
 Inheritance
 Sharing of data within hierarchy scope, supports
code reusability
 Polymorphism
• Operator overloading
What is Object Oriented
Database? (OODB)
 A database system that incorporates all
the important object-oriented concepts
 Some additional features
 Unique Object identifiers
 Persistent object handling
Advantages of OODBS
 Designer can specify the structure of
objects and their behavior (methods)
 Better interaction with object-oriented
languages such as Java and C++
 Definition of complex and user-defined
types
 Encapsulation of operations and user-
defined methods
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 query
The following is a sample query
“what are the names of the black product?”
Select distinct p.name
From products p
Where p.color = “black”
⇒ Valid in both SQL and OQL, but results are
different.
Result of the query (SQL)
Product no Name Color
P1 Ford Mustang Black
P2 Toyota Celica Green
P3 Mercedes SLK Black
- The statement queries a relational
database.
=> Returns a table with rows.
Name
Ford Mustang
Mercedes SLK
Result
Original table
Result of the query (OQL)
Product no Name Color
P1 Ford Mustang Black
P2 Toyota Celica Green
P3 Mercedes SLK Black
- The statement
queries a object-
oriented database
=> Returns a
collection of objects.
String
Ford Mustang
Result
Original table
String
Mercedes SLK
Comparison
 Queries look very similar in SQL and OQL,
sometimes they are the same
 In fact, the results they give are very
different
Query returns:
OQL SQL
Object
Collection of objects
Tuple
Table
SQL3 “Object-oriented SQL”
 Foundation for several OO database
management systems – ORACLE8, DB2, etc
 New features – “relational” & “Object oriented”
 Relational Features – new data types, new
predicates, enhanced semantics, additional
security and an active database
 Object Oriented Features – support for
functions and procedures
User defined Data Types
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 (contd.)
Creating “Table”
create table Address of type
AddressType;
create table MovieStar of type StarType;
Instances of Row types are tuples in tables
Sample Query
Find the names 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 and Queries
A Water Resource Management example
 A database of state wide water projects
 Includes a library of picture slides
 Indexing according to predefined concepts
– prohibitively expensive
 Type of queries
 Geographic locations
 Reservoir levels during droughts
 Recent flood conditions, etc
Complex Data and Queries
(contd.)
 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 Functions
create function one() returns int4
as ‘select 1 as RESULT'
language 'sql';
select one() as answer;
answer
1
Creating “tables” with
“methods”
Implementation
create table slides (
id int,
date date,
caption document,
picture CD_image,
method containsName
(name varchar)
returns boolean
as external name ‘matching’
language ‘C’
);
Creating Tables (Contd.)
create table landmarks(
name varchar (30),
location point);
Implementation (contd.)
Sample query – find a picture of a reservoir with
low water level which is in “Sacramento”
select P.id
from slides P, landmarks L
where IsLowWaterLevel (P.picture) and
P.containsName (L.name) and
L.name = “Sacramento”;

Mais conteúdo relacionado

Mais procurados

Session 16 - Collections - Sorting, Comparing Basics
Session 16 - Collections - Sorting, Comparing BasicsSession 16 - Collections - Sorting, Comparing Basics
Session 16 - Collections - Sorting, Comparing BasicsPawanMM
 
Tools for Integrating Heterogeneous Data Sources from a User Perspective
Tools for Integrating Heterogeneous Data Sources from a User PerspectiveTools for Integrating Heterogeneous Data Sources from a User Perspective
Tools for Integrating Heterogeneous Data Sources from a User PerspectiveJie Bao
 
Exploring Content with Wikipedia
Exploring Content with WikipediaExploring Content with Wikipedia
Exploring Content with WikipediaYegin Genc
 
Querying XML: XPath and XQuery
Querying XML: XPath and XQueryQuerying XML: XPath and XQuery
Querying XML: XPath and XQueryKatrien Verbert
 
XML on SQL Server
XML on SQL ServerXML on SQL Server
XML on SQL Servertorp42
 
Introduction to XPath
Introduction to XPathIntroduction to XPath
Introduction to XPathtorp42
 
Collections - Sorting, Comparing Basics
Collections - Sorting, Comparing BasicsCollections - Sorting, Comparing Basics
Collections - Sorting, Comparing BasicsRatnaJava
 
Prisma 2009 flow diagram
Prisma 2009 flow diagramPrisma 2009 flow diagram
Prisma 2009 flow diagramBrian ER
 
Managing model-to-model transformations at scale with YAMTL (lowcomote)
Managing model-to-model transformations at scale with YAMTL (lowcomote)Managing model-to-model transformations at scale with YAMTL (lowcomote)
Managing model-to-model transformations at scale with YAMTL (lowcomote)Artur Boronat
 
SQL/XML on Oracle
SQL/XML on OracleSQL/XML on Oracle
SQL/XML on Oracletorp42
 
Filtering Inaccurate Entity Co-references on the Linked Open Data
Filtering Inaccurate Entity Co-references on the Linked Open DataFiltering Inaccurate Entity Co-references on the Linked Open Data
Filtering Inaccurate Entity Co-references on the Linked Open Dataebrahim_bagheri
 
XQuery - a technical overview
XQuery -  a technical overviewXQuery -  a technical overview
XQuery - a technical overviewLoren Cahlander
 
Hierarchical Dirichlet Process
Hierarchical Dirichlet ProcessHierarchical Dirichlet Process
Hierarchical Dirichlet ProcessSangwoo Mo
 
Shape Expressions: An RDF validation and transformation language
Shape Expressions: An RDF validation and transformation languageShape Expressions: An RDF validation and transformation language
Shape Expressions: An RDF validation and transformation languageJose Emilio Labra Gayo
 
ModelDR - the tool that untangles complex information
ModelDR - the tool that untangles complex informationModelDR - the tool that untangles complex information
ModelDR - the tool that untangles complex informationSimon Roberts
 

Mais procurados (20)

Session 16 - Collections - Sorting, Comparing Basics
Session 16 - Collections - Sorting, Comparing BasicsSession 16 - Collections - Sorting, Comparing Basics
Session 16 - Collections - Sorting, Comparing Basics
 
Entity Linking
Entity LinkingEntity Linking
Entity Linking
 
Tools for Integrating Heterogeneous Data Sources from a User Perspective
Tools for Integrating Heterogeneous Data Sources from a User PerspectiveTools for Integrating Heterogeneous Data Sources from a User Perspective
Tools for Integrating Heterogeneous Data Sources from a User Perspective
 
R language, an introduction
R language, an introductionR language, an introduction
R language, an introduction
 
Exploring Content with Wikipedia
Exploring Content with WikipediaExploring Content with Wikipedia
Exploring Content with Wikipedia
 
Introduction to C++
Introduction to C++Introduction to C++
Introduction to C++
 
Querying XML: XPath and XQuery
Querying XML: XPath and XQueryQuerying XML: XPath and XQuery
Querying XML: XPath and XQuery
 
Type-Aware Entity Retrieval
Type-Aware Entity RetrievalType-Aware Entity Retrieval
Type-Aware Entity Retrieval
 
XML on SQL Server
XML on SQL ServerXML on SQL Server
XML on SQL Server
 
Introduction to XPath
Introduction to XPathIntroduction to XPath
Introduction to XPath
 
Collections - Sorting, Comparing Basics
Collections - Sorting, Comparing BasicsCollections - Sorting, Comparing Basics
Collections - Sorting, Comparing Basics
 
Prisma 2009 flow diagram
Prisma 2009 flow diagramPrisma 2009 flow diagram
Prisma 2009 flow diagram
 
Managing model-to-model transformations at scale with YAMTL (lowcomote)
Managing model-to-model transformations at scale with YAMTL (lowcomote)Managing model-to-model transformations at scale with YAMTL (lowcomote)
Managing model-to-model transformations at scale with YAMTL (lowcomote)
 
SQL/XML on Oracle
SQL/XML on OracleSQL/XML on Oracle
SQL/XML on Oracle
 
Xpath presentation
Xpath presentationXpath presentation
Xpath presentation
 
Filtering Inaccurate Entity Co-references on the Linked Open Data
Filtering Inaccurate Entity Co-references on the Linked Open DataFiltering Inaccurate Entity Co-references on the Linked Open Data
Filtering Inaccurate Entity Co-references on the Linked Open Data
 
XQuery - a technical overview
XQuery -  a technical overviewXQuery -  a technical overview
XQuery - a technical overview
 
Hierarchical Dirichlet Process
Hierarchical Dirichlet ProcessHierarchical Dirichlet Process
Hierarchical Dirichlet Process
 
Shape Expressions: An RDF validation and transformation language
Shape Expressions: An RDF validation and transformation languageShape Expressions: An RDF validation and transformation language
Shape Expressions: An RDF validation and transformation language
 
ModelDR - the tool that untangles complex information
ModelDR - the tool that untangles complex informationModelDR - the tool that untangles complex information
ModelDR - the tool that untangles complex information
 

Semelhante a 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.pptxelsagalgao
 
Unit 1 object-baseddatabases-160503160727
Unit 1 object-baseddatabases-160503160727Unit 1 object-baseddatabases-160503160727
Unit 1 object-baseddatabases-160503160727rameswara reddy venkat
 
Ontology-based Cooperation of Information Systems
Ontology-based Cooperation of Information SystemsOntology-based Cooperation of Information Systems
Ontology-based Cooperation of Information SystemsRaji Ghawi
 
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
 
Adv DB - Full Handout.pdf
Adv DB - Full Handout.pdfAdv DB - Full Handout.pdf
Adv DB - Full Handout.pdf3BRBoruMedia
 
Java is an Object-Oriented Language
Java is an Object-Oriented LanguageJava is an Object-Oriented Language
Java is an Object-Oriented Languageale8819
 
Accessing loosely structured data from F# and C#
Accessing loosely structured data from F# and C#Accessing loosely structured data from F# and C#
Accessing loosely structured data from F# and C#Tomas Petricek
 
Alternatives of JPA/Hibernate
Alternatives of JPA/HibernateAlternatives of JPA/Hibernate
Alternatives of JPA/HibernateSunghyouk Bae
 
The JISC DC Application Profiles: Some thoughts on requirements and scope
The JISC DC Application Profiles: Some thoughts on requirements and scopeThe JISC DC Application Profiles: Some thoughts on requirements and scope
The JISC DC Application Profiles: Some thoughts on requirements and scopeEduserv Foundation
 
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
 
C# Language Overview Part II
C# Language Overview Part IIC# Language Overview Part II
C# Language Overview Part IIDoncho Minkov
 

Semelhante a OODB (20)

Object oriented database
Object oriented databaseObject oriented database
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.pptx
 
semantic web & natural language
semantic web & natural languagesemantic web & natural language
semantic web & natural language
 
Object Based Databases
Object Based DatabasesObject Based Databases
Object Based Databases
 
Unit 1 object-baseddatabases-160503160727
Unit 1 object-baseddatabases-160503160727Unit 1 object-baseddatabases-160503160727
Unit 1 object-baseddatabases-160503160727
 
Ontology-based Cooperation of Information Systems
Ontology-based Cooperation of Information SystemsOntology-based Cooperation of Information Systems
Ontology-based Cooperation of Information Systems
 
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
 
Adv DB - Full Handout.pdf
Adv DB - Full Handout.pdfAdv DB - Full Handout.pdf
Adv DB - Full Handout.pdf
 
Ch03
Ch03Ch03
Ch03
 
Java is an Object-Oriented Language
Java is an Object-Oriented LanguageJava is an Object-Oriented Language
Java is an Object-Oriented Language
 
java
javajava
java
 
Accessing loosely structured data from F# and C#
Accessing loosely structured data from F# and C#Accessing loosely structured data from F# and C#
Accessing loosely structured data from F# and C#
 
Alternatives of JPA/Hibernate
Alternatives of JPA/HibernateAlternatives of JPA/Hibernate
Alternatives of JPA/Hibernate
 
The JISC DC Application Profiles: Some thoughts on requirements and scope
The JISC DC Application Profiles: Some thoughts on requirements and scopeThe JISC DC Application Profiles: Some thoughts on requirements and scope
The JISC DC Application Profiles: Some thoughts on requirements and scope
 
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
 
Jhu Week 6
Jhu Week 6Jhu Week 6
Jhu Week 6
 
Adbms 17 object query language
Adbms 17 object query languageAdbms 17 object query language
Adbms 17 object query language
 
OWLED'12 Quest
OWLED'12 QuestOWLED'12 Quest
OWLED'12 Quest
 
C# Language Overview Part II
C# Language Overview Part IIC# Language Overview Part II
C# Language Overview Part II
 

Último

Jual Obat Aborsi Surabaya ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Surabaya ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Surabaya ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Surabaya ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...ZurliaSoop
 
Junnasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...
Junnasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...Junnasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...
Junnasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...amitlee9823
 
Edukaciniai dropshipping via API with DroFx
Edukaciniai dropshipping via API with DroFxEdukaciniai dropshipping via API with DroFx
Edukaciniai dropshipping via API with DroFxolyaivanovalion
 
Escorts Service Kumaraswamy Layout ☎ 7737669865☎ Book Your One night Stand (B...
Escorts Service Kumaraswamy Layout ☎ 7737669865☎ Book Your One night Stand (B...Escorts Service Kumaraswamy Layout ☎ 7737669865☎ Book Your One night Stand (B...
Escorts Service Kumaraswamy Layout ☎ 7737669865☎ Book Your One night Stand (B...amitlee9823
 
Call Girls Indiranagar Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
Call Girls Indiranagar Just Call 👗 7737669865 👗 Top Class Call Girl Service B...Call Girls Indiranagar Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
Call Girls Indiranagar Just Call 👗 7737669865 👗 Top Class Call Girl Service B...amitlee9823
 
Call Girls Hsr Layout Just Call 👗 7737669865 👗 Top Class Call Girl Service Ba...
Call Girls Hsr Layout Just Call 👗 7737669865 👗 Top Class Call Girl Service Ba...Call Girls Hsr Layout Just Call 👗 7737669865 👗 Top Class Call Girl Service Ba...
Call Girls Hsr Layout Just Call 👗 7737669865 👗 Top Class Call Girl Service Ba...amitlee9823
 
ALSO dropshipping via API with DroFx.pptx
ALSO dropshipping via API with DroFx.pptxALSO dropshipping via API with DroFx.pptx
ALSO dropshipping via API with DroFx.pptxolyaivanovalion
 
Halmar dropshipping via API with DroFx
Halmar  dropshipping  via API with DroFxHalmar  dropshipping  via API with DroFx
Halmar dropshipping via API with DroFxolyaivanovalion
 
Call Girls In Bellandur ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bellandur ☎ 7737669865 🥵 Book Your One night StandCall Girls In Bellandur ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bellandur ☎ 7737669865 🥵 Book Your One night Standamitlee9823
 
Al Barsha Escorts $#$ O565212860 $#$ Escort Service In Al Barsha
Al Barsha Escorts $#$ O565212860 $#$ Escort Service In Al BarshaAl Barsha Escorts $#$ O565212860 $#$ Escort Service In Al Barsha
Al Barsha Escorts $#$ O565212860 $#$ Escort Service In Al BarshaAroojKhan71
 
Midocean dropshipping via API with DroFx
Midocean dropshipping via API with DroFxMidocean dropshipping via API with DroFx
Midocean dropshipping via API with DroFxolyaivanovalion
 
Invezz.com - Grow your wealth with trading signals
Invezz.com - Grow your wealth with trading signalsInvezz.com - Grow your wealth with trading signals
Invezz.com - Grow your wealth with trading signalsInvezz1
 
FESE Capital Markets Fact Sheet 2024 Q1.pdf
FESE Capital Markets Fact Sheet 2024 Q1.pdfFESE Capital Markets Fact Sheet 2024 Q1.pdf
FESE Capital Markets Fact Sheet 2024 Q1.pdfMarinCaroMartnezBerg
 
Mg Road Call Girls Service: 🍓 7737669865 🍓 High Profile Model Escorts | Banga...
Mg Road Call Girls Service: 🍓 7737669865 🍓 High Profile Model Escorts | Banga...Mg Road Call Girls Service: 🍓 7737669865 🍓 High Profile Model Escorts | Banga...
Mg Road Call Girls Service: 🍓 7737669865 🍓 High Profile Model Escorts | Banga...amitlee9823
 
BabyOno dropshipping via API with DroFx.pptx
BabyOno dropshipping via API with DroFx.pptxBabyOno dropshipping via API with DroFx.pptx
BabyOno dropshipping via API with DroFx.pptxolyaivanovalion
 
VidaXL dropshipping via API with DroFx.pptx
VidaXL dropshipping via API with DroFx.pptxVidaXL dropshipping via API with DroFx.pptx
VidaXL dropshipping via API with DroFx.pptxolyaivanovalion
 
Call Girls Jalahalli Just Call 👗 7737669865 👗 Top Class Call Girl Service Ban...
Call Girls Jalahalli Just Call 👗 7737669865 👗 Top Class Call Girl Service Ban...Call Girls Jalahalli Just Call 👗 7737669865 👗 Top Class Call Girl Service Ban...
Call Girls Jalahalli Just Call 👗 7737669865 👗 Top Class Call Girl Service Ban...amitlee9823
 
Ravak dropshipping via API with DroFx.pptx
Ravak dropshipping via API with DroFx.pptxRavak dropshipping via API with DroFx.pptx
Ravak dropshipping via API with DroFx.pptxolyaivanovalion
 

Último (20)

Call Girls In Shalimar Bagh ( Delhi) 9953330565 Escorts Service
Call Girls In Shalimar Bagh ( Delhi) 9953330565 Escorts ServiceCall Girls In Shalimar Bagh ( Delhi) 9953330565 Escorts Service
Call Girls In Shalimar Bagh ( Delhi) 9953330565 Escorts Service
 
Jual Obat Aborsi Surabaya ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Surabaya ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Surabaya ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Surabaya ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
 
Junnasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...
Junnasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...Junnasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...
Junnasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...
 
Edukaciniai dropshipping via API with DroFx
Edukaciniai dropshipping via API with DroFxEdukaciniai dropshipping via API with DroFx
Edukaciniai dropshipping via API with DroFx
 
Escorts Service Kumaraswamy Layout ☎ 7737669865☎ Book Your One night Stand (B...
Escorts Service Kumaraswamy Layout ☎ 7737669865☎ Book Your One night Stand (B...Escorts Service Kumaraswamy Layout ☎ 7737669865☎ Book Your One night Stand (B...
Escorts Service Kumaraswamy Layout ☎ 7737669865☎ Book Your One night Stand (B...
 
Call Girls Indiranagar Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
Call Girls Indiranagar Just Call 👗 7737669865 👗 Top Class Call Girl Service B...Call Girls Indiranagar Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
Call Girls Indiranagar Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
 
Call Girls Hsr Layout Just Call 👗 7737669865 👗 Top Class Call Girl Service Ba...
Call Girls Hsr Layout Just Call 👗 7737669865 👗 Top Class Call Girl Service Ba...Call Girls Hsr Layout Just Call 👗 7737669865 👗 Top Class Call Girl Service Ba...
Call Girls Hsr Layout Just Call 👗 7737669865 👗 Top Class Call Girl Service Ba...
 
ALSO dropshipping via API with DroFx.pptx
ALSO dropshipping via API with DroFx.pptxALSO dropshipping via API with DroFx.pptx
ALSO dropshipping via API with DroFx.pptx
 
Halmar dropshipping via API with DroFx
Halmar  dropshipping  via API with DroFxHalmar  dropshipping  via API with DroFx
Halmar dropshipping via API with DroFx
 
Call Girls In Bellandur ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bellandur ☎ 7737669865 🥵 Book Your One night StandCall Girls In Bellandur ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bellandur ☎ 7737669865 🥵 Book Your One night Stand
 
Al Barsha Escorts $#$ O565212860 $#$ Escort Service In Al Barsha
Al Barsha Escorts $#$ O565212860 $#$ Escort Service In Al BarshaAl Barsha Escorts $#$ O565212860 $#$ Escort Service In Al Barsha
Al Barsha Escorts $#$ O565212860 $#$ Escort Service In Al Barsha
 
Predicting Loan Approval: A Data Science Project
Predicting Loan Approval: A Data Science ProjectPredicting Loan Approval: A Data Science Project
Predicting Loan Approval: A Data Science Project
 
Midocean dropshipping via API with DroFx
Midocean dropshipping via API with DroFxMidocean dropshipping via API with DroFx
Midocean dropshipping via API with DroFx
 
Invezz.com - Grow your wealth with trading signals
Invezz.com - Grow your wealth with trading signalsInvezz.com - Grow your wealth with trading signals
Invezz.com - Grow your wealth with trading signals
 
FESE Capital Markets Fact Sheet 2024 Q1.pdf
FESE Capital Markets Fact Sheet 2024 Q1.pdfFESE Capital Markets Fact Sheet 2024 Q1.pdf
FESE Capital Markets Fact Sheet 2024 Q1.pdf
 
Mg Road Call Girls Service: 🍓 7737669865 🍓 High Profile Model Escorts | Banga...
Mg Road Call Girls Service: 🍓 7737669865 🍓 High Profile Model Escorts | Banga...Mg Road Call Girls Service: 🍓 7737669865 🍓 High Profile Model Escorts | Banga...
Mg Road Call Girls Service: 🍓 7737669865 🍓 High Profile Model Escorts | Banga...
 
BabyOno dropshipping via API with DroFx.pptx
BabyOno dropshipping via API with DroFx.pptxBabyOno dropshipping via API with DroFx.pptx
BabyOno dropshipping via API with DroFx.pptx
 
VidaXL dropshipping via API with DroFx.pptx
VidaXL dropshipping via API with DroFx.pptxVidaXL dropshipping via API with DroFx.pptx
VidaXL dropshipping via API with DroFx.pptx
 
Call Girls Jalahalli Just Call 👗 7737669865 👗 Top Class Call Girl Service Ban...
Call Girls Jalahalli Just Call 👗 7737669865 👗 Top Class Call Girl Service Ban...Call Girls Jalahalli Just Call 👗 7737669865 👗 Top Class Call Girl Service Ban...
Call Girls Jalahalli Just Call 👗 7737669865 👗 Top Class Call Girl Service Ban...
 
Ravak dropshipping via API with DroFx.pptx
Ravak dropshipping via API with DroFx.pptxRavak dropshipping via API with DroFx.pptx
Ravak dropshipping via API with DroFx.pptx
 

OODB

  • 1. Object Oriented Database Group 4 Mathieu Metz Palani Kumaresan Napa Gavinlertvatana Kristine Pei Keow Lee Prabhu Ramachandran
  • 2. Outline  Object definitions  Object Structures  Object-oriented concepts  OODBS  OQL with an example  SQL3 with examples
  • 3. Definition of an object Objects – User defined complex data types An object has structure or state (variables) and methods (behavior/operations) 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 constructors
  • 4. Object Structure  The state (current value) of a complex object may be constructed from other objects (or other values) by using certain type constructors  Can be represented by (i,c,v)  i is an unique id  c is a type constructor  v is the object state  Constructors  Basic types: atom, tuple and set  Collection type: list, bag and array
  • 5. Object-Oriented Concepts  Abstract Data Types  Class definition, provides extension to complex attribute types  Encapsulation  Implementation of operations and object structure hidden  Inheritance  Sharing of data within hierarchy scope, supports code reusability  Polymorphism • Operator overloading
  • 6. What is Object Oriented Database? (OODB)  A database system that incorporates all the important object-oriented concepts  Some additional features  Unique Object identifiers  Persistent object handling
  • 7. Advantages of OODBS  Designer can specify the structure of objects and their behavior (methods)  Better interaction with object-oriented languages such as Java and C++  Definition of complex and user-defined types  Encapsulation of operations and user- defined methods
  • 8. 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)
  • 9. Example of OQL query The following is a sample query “what are the names of the black product?” Select distinct p.name From products p Where p.color = “black” ⇒ Valid in both SQL and OQL, but results are different.
  • 10. Result of the query (SQL) Product no Name Color P1 Ford Mustang Black P2 Toyota Celica Green P3 Mercedes SLK Black - The statement queries a relational database. => Returns a table with rows. Name Ford Mustang Mercedes SLK Result Original table
  • 11. Result of the query (OQL) Product no Name Color P1 Ford Mustang Black P2 Toyota Celica Green P3 Mercedes SLK Black - The statement queries a object- oriented database => Returns a collection of objects. String Ford Mustang Result Original table String Mercedes SLK
  • 12. Comparison  Queries look very similar in SQL and OQL, sometimes they are the same  In fact, the results they give are very different Query returns: OQL SQL Object Collection of objects Tuple Table
  • 13. SQL3 “Object-oriented SQL”  Foundation for several OO database management systems – ORACLE8, DB2, etc  New features – “relational” & “Object oriented”  Relational Features – new data types, new predicates, enhanced semantics, additional security and an active database  Object Oriented Features – support for functions and procedures
  • 14. User defined Data Types Creating a “row type” Example: create row type AddressType( street char(50), city char(20)); create row type StarType( name char(30), address AddressType);
  • 15. Creating Data Types (contd.) Creating “Table” create table Address of type AddressType; create table MovieStar of type StarType; Instances of Row types are tuples in tables
  • 16. Sample Query Find the names 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”;
  • 17. Complex Data and Queries A Water Resource Management example  A database of state wide water projects  Includes a library of picture slides  Indexing according to predefined concepts – prohibitively expensive  Type of queries  Geographic locations  Reservoir levels during droughts  Recent flood conditions, etc
  • 18. Complex Data and Queries (contd.)  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”
  • 19. Creating Functions create function one() returns int4 as ‘select 1 as RESULT' language 'sql'; select one() as answer; answer 1
  • 20. Creating “tables” with “methods” Implementation create table slides ( id int, date date, caption document, picture CD_image, method containsName (name varchar) returns boolean as external name ‘matching’ language ‘C’ );
  • 21. Creating Tables (Contd.) create table landmarks( name varchar (30), location point);
  • 22. Implementation (contd.) Sample query – find a picture of a reservoir with low water level which is in “Sacramento” select P.id from slides P, landmarks L where IsLowWaterLevel (P.picture) and P.containsName (L.name) and L.name = “Sacramento”;

Notas do Editor

  1. 1) In SQL, this statement will query a relational database, i.e., a set of table-like structures (see Section 2.2, Second generation database technology), and return a table, the rows of which are rows of the table called products in which the column called colour has the value "black". If the relational database contains the products table in Figure 6.2 (a), the result of the query will be the Figure 6.2 (b) table.   2) In OQL this statement will query an object database and return a collection-object which contains objects contained in the collection object called products for which the value of the colour attribute is the literal "black". Given the object database in Figure 6.1, this OQL statement will return the object represented in Figure 6.3. 1) That which is interpreted as a table name in SQL, is interpreted as a collection-object name in OQL; 2) That which is interpreted as the name of a column of a table in SQL is interpreted as an object characteristic name (an attribute, relationship, or operation name) in OQL.