object oriented query languages

of 23 /23
OBJECT ORIENTED QUERY LANGUAGES Object Oriented Database Seminar Omar Alasam Julien Aubry Julien Fontaine Bénédicte Gruss School of Computing Beng CNDS 4 Napier

Upload: spence

Post on 14-Jan-2016

49 views

Category:

Documents


0 download

Embed Size (px)

DESCRIPTION

OBJECT ORIENTED QUERY LANGUAGES. Object Oriented Database Seminar Omar Alasam Julien Aubry Julien Fontaine Bénédicte Gruss School of Computing Beng CNDS 4 Napier University. PLAN. Background Requirements Specifications Divergence from SQL Current Situation Query optimisation - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: OBJECT ORIENTED QUERY LANGUAGES

OBJECT ORIENTED QUERY LANGUAGES

Object Oriented Database Seminar

Omar Alasam

Julien Aubry

Julien Fontaine

Bénédicte Gruss

School of Computing

Beng CNDS 4 Napier University

Page 2: OBJECT ORIENTED QUERY LANGUAGES

PLAN

Background Requirements Specifications Divergence from SQL Current Situation Query optimisation Future Direction

Page 3: OBJECT ORIENTED QUERY LANGUAGES

BACKGROUND

Object-Oriented Databases Concepts

Objects and Identity Complex objects Encapsulation Classes Inheritance Overloading, Overriding and late binding

Page 4: OBJECT ORIENTED QUERY LANGUAGES

BACKGROUND 2

Query Languages

SQL took 15 years to become the standard of RDBMS Programming languages were first used to query

OODB Users demand on a SQL-like query facility for OODB. No standard yet accepted Today, each OODBMS has its own query language

implemented.

Page 5: OBJECT ORIENTED QUERY LANGUAGES

OOQL Requirements

The Object-Oriented Database System Manifesto, 1989 High level language Efficient Application independent

Used to interactively query the database on-line.

Page 6: OBJECT ORIENTED QUERY LANGUAGES

OQL requirements

An OQL should provide: Descriptiveness Closure Completeness Expressive power Extensibility orthogonality

Page 7: OBJECT ORIENTED QUERY LANGUAGES

Query Language issues

Should the query language be integreted in the programming language?

How to access the data: Simple data Complex data

What is a result to a query ?

Page 8: OBJECT ORIENTED QUERY LANGUAGES

Query language issues 2

Possibility to make join request

Management of sets of objects

Equal access to attributes and methods

Consequences of class hierarchy

Page 9: OBJECT ORIENTED QUERY LANGUAGES

SQL versus OQL

New concepts have to be added to SQL: Object IDs Members Methods Derived data Hierarchy Recursion

Page 10: OBJECT ORIENTED QUERY LANGUAGES

O2 Query

Query language used by O2 DBMS2 Modes:interactive & programmingWhen interactive, can violate

encapsulationHigh-level SQL-like languageGeneric methods already defined

Page 11: OBJECT ORIENTED QUERY LANGUAGES

LIFOO

Used by O2Pure interrogation language

Quantification, aggregation and Ordering OK

Does not support recursive queriesFunctional language (handles

functional syntax ; min, max..)

Page 12: OBJECT ORIENTED QUERY LANGUAGES

Gemstone

Result of a query: set of class identical as the queried class

Queries: Boolean operations combined to path expression:

Tasks select: {:t | (t.man_years > 20 & (t.leader.specialization = ‘DB’)}

Page 13: OBJECT ORIENTED QUERY LANGUAGES

OSQL

Used by IRIS Very close to SQL

Syntax Use of recursive cursor

Result of a query is an existing object Aggregation and Ordering not supported

Foreign functions can be used Data Model is Multi-Model

Page 14: OBJECT ORIENTED QUERY LANGUAGES

SQL 3

Object-Oriented version of the famous QL Use of ADT so as to describe classes Encapsulation assured thanks to flags Use of constructors, destructors and actors Compatibility with SQL 92

ADT:Abstract Data Type

Page 15: OBJECT ORIENTED QUERY LANGUAGES

OQL

Defined by ODMG OQL adopts the type system of the

application Functional Query Language Orthogonal Query Language

Page 16: OBJECT ORIENTED QUERY LANGUAGES

Query Optimisation

Introduction: Difficulties of OODBMS Queries. Optimisation Issues

Additional Data Types: definition of new types and classes through inheritance can both assist and prevent optimisation of queries

Complex Objects: The path expressions and query closure of OODBMS query languages complicate the processing of queries in several ways

 Methods and Encapsulation: creation of new objects, object identities (OIDs).

Cost Determination of evaluating methods.

Page 17: OBJECT ORIENTED QUERY LANGUAGES

Optimisation Issues Cont.

 Algebras and Calculi Optimisation: The lack of a standard,  Algebra is variable based. Algebraic optimisation has the advantage that a query can be

transformed using well-defined operators.

 Extensible Optimisers:  Ability to change with time through ``Optimiser Generators'':

builds optimisers based on information on the data model, query language, algebra, calculi and cost model. 

Page 18: OBJECT ORIENTED QUERY LANGUAGES

The Query Processing Methodology:

Page 19: OBJECT ORIENTED QUERY LANGUAGES

Scope of Future Work

A Standard Extensible Optimiser Framework.

Better Cost Models. Better Algebras and Rewrite Systems. Eliminating Method Evaluation. Indexing of Path Expressions. Pre-computation and Caching.

Page 20: OBJECT ORIENTED QUERY LANGUAGES

Solutions and Evaluation:

Simple evaluation, dynamic programming methods, Evolutionary Algorithms and randomised search.

Final words on Query Optimisation: It is hard to provide a scheme for evaluating the

success of a research into query optimisation, the only real criterion being faster average execution time of queries.

Page 21: OBJECT ORIENTED QUERY LANGUAGES

OOQL Future Directions

 Innovation in the area of OODBMS query languages !

 Research in OOQL: Super OODBMS Query Language: Polishing ODMG-93 OQL Connection to Rule Systems End-users Queries Graphical Query Construction

Page 22: OBJECT ORIENTED QUERY LANGUAGES

OOQL Future Directions 2

Future Work Scope and Expectations from: ODMG-93 OQL and Rule Systems. Implementation before evaluation. Good end-user OODBMS query mechanism

driven by strong industrial backing.

Page 23: OBJECT ORIENTED QUERY LANGUAGES

Conclusion

ODMG defined a standard with OQL OQL is competing with SQL 3 Vendors also have their own OOQL The popularity of OODB depends a lot on

the query language that will be adopted.