1 / 4

Understanding OQL: A Declarative Query Language for Object Databases

OQL (Object Query Language) is a declarative query language designed for object databases, similar to SQL. It allows users to perform ad-hoc queries, invoking methods easily and accessing any object or value within the database. OQL differentiates itself with its unique approach to object identity and equality, offering three comparison methods: identical, shallow equal, and deep equal. With features such as freely composable queries, built-in forall and exists constructs, and support for advanced optimization techniques, OQL facilitates clean syntax and efficient data retrieval from complex object-oriented structures.

ankti
Télécharger la présentation

Understanding OQL: A Declarative Query Language for Object Databases

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 Database Queries: OQL

  2. Object Query Language (OQL) • Declarative (like SQL) • No updates • Computationally incomplete (like SQL) • Query result: Any object or value • Ad-hoc or embedded (like SQL) • Can invoke methods easily • All queries “start with” named, top-level database objects (vs. relations, in SQL) • OQL is a freely composable, functional language

  3. Object identity and equalities • Can compare referenced objects in 3 ways • Two referenced objects are identical if both references are the same OID • Two referenced objects are shallow equal if the referenced objects contain the same values in all value (e.g. scalar) fields and identical references in object fields • Two referenced objects are deep equal if they contain the same values in all value fields and the objects they reference are also deep equal • ID  shallow equal  deep equal

  4. OQL: Summary • SQL-like; declarative and functional • Freely composable: clean semantics • No need for having or order by • forall and exists both available • Query processing/optimization techniques: • Algebras can be defined: • Extended relational algebras • New algebras • Indexes used (O2, for example) • Query Processing/Optimization research results slowly making their way into products

More Related