1 / 23

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. PLAN. Background Requirements Specifications Divergence from SQL Current Situation Query optimisation

spence
Télécharger la présentation

OBJECT ORIENTED QUERY LANGUAGES

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. 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

  2. PLAN • Background • Requirements • Specifications • Divergence from SQL • Current Situation • Query optimisation • Future Direction

  3. Object-Oriented Databases Concepts Objects and Identity Complex objects Encapsulation Classes Inheritance Overloading, Overriding and late binding BACKGROUND

  4. 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.

  5. OOQL Requirements • The Object-Oriented Database System Manifesto, 1989 • High level language • Efficient • Application independent • Used to interactively query the database on-line.

  6. OQL requirements • An OQL should provide: • Descriptiveness • Closure • Completeness • Expressive power • Extensibility • orthogonality

  7. 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 ?

  8. Query language issues 2 • Possibility to make join request • Management of sets of objects • Equal access to attributes and methods • Consequences of class hierarchy

  9. SQL versus OQL • New concepts have to be added to SQL: • Object IDs • Members • Methods • Derived data • Hierarchy • Recursion

  10. O2 Query • Query language used by O2 DBMS • 2 Modes:interactive & programming • When interactive, can violate encapsulation • High-level SQL-like language • Generic methods already defined

  11. LIFOO • Used by O2 • Pure interrogation language • Quantification, aggregation and Ordering OK • Does not support recursive queries • Functional language (handles functional syntax ; min, max..)

  12. 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’)}

  13. 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

  14. 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

  15. OQL • Defined by ODMG • OQL adopts the type system of the application • Functional Query Language • Orthogonal Query Language

  16. 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.

  17. 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. 

  18. The Query Processing Methodology:

  19. 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.

  20. 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.

  21. 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

  22. 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.

  23. 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.

More Related