Markdown

OQL

OQL is the Acronym for Object Query Language

Object Query Language is a query language for databases that store objects rather than only rows. A query can follow a reference from one object to another and can return objects, not only columns of values. It was written as the query companion to a standard for object databases.

The systems it queries are an Object-Oriented Database Management System (OODBMS). The language is how a program asks that system a question. The system stores the objects and runs the query.

What a Query Can Ask

  • An object. Select objects of a given type that meet a condition.
  • A path. Follow a reference from one object to the next inside the query.
  • A result that is still an object. The answer need not be flattened into scalar columns.

Object Queries and Table Queries

ComparedThis LanguageA Table Query Language
What is storedObjects with referencesRows in tables
How related data is reachedA path along referencesA join between tables
The resultObjects or valuesRows of values