Object Query Language

Object Query Language

Object Query Language (OQL) is a query language standard for object-oriented databases modeled after SQL. OQL was developed by the Object Data Management Group (ODMG). Because of its overall complexity no vendor has ever fully implemented the complete OQL. OQL has influenced the design of some of the newer query languages like JDOQL and EJB QL, but they can't be considered as different flavors of OQL.

Contents

General Rules of OQL

The following rules apply to OQL statements:

  • All complete statements must be terminated by a semi-colon.
  • A list of entries in OQL is usually separated by commas but not terminated by a comma(,).
  • Strings of text are enclosed by matching quotation marks.

Examples

Simple query

The following example illustrates how one might retrieve the CPU-speed of all PCs with more than 64MB of RAM from a fictional PC database:

SELECT pc.cpuspeed
FROM PCs pc
WHERE pc.ram > 64

Query with grouping and aggregation

The following example illustrates how one might retrieve the average amount of RAM on a PC, grouped by manufacturer:

SELECT manufacturer, AVG(SELECT part.pc.ram FROM partition part)
FROM PCs pc
GROUP BY manufacturer: pc.manufacturer

Note the use of the keyword partition, as opposed to aggregation in traditional SQL.

References

See also


Wikimedia Foundation. 2010.

Игры ⚽ Поможем сделать НИР

Look at other dictionaries:

  • Object Query Language — (OQL) es un lenguaje de consulta estándar para bases de datos orientadas a objetos modelado después de SQL. OQL fue creado por el Object Data Management Group (ODMG). Debido a su complejidad ningún creador de software ha implementado… …   Wikipedia Español

  • Object Query Language — est une extension du langage SQL, langage de requête utilisé pour interroger des SGBDO, normalisé par l ODMG. Ce langage est typé (les requêtes retournent des objets), et utilise les règles du polymorphisme. Portail de la programmation… …   Wikipédia en Français

  • Object Query Language — Die Object Query Language (OQL) ist eine stark an SQL angelehnte Abfragesprache für Objektdatenbanken. Die Sprache ist durch die Object Database Management Group (ODMG) standardisiert. Trotz der engen Anlehnung an SQL ist die Sprache wegen ihres… …   Deutsch Wikipedia

  • Object Definition Language — Object Database Management Group (kurz ODMG) ist ein Zusammenschluss von Herstellern objektorientierter Datenbanksysteme zur Entwicklung gemeinsamer Normen und Standards. Die ODMG hat nach der Veröffentlichung der Release 3.0 die Arbeit… …   Deutsch Wikipedia

  • Object Definition Language — (ODL) is the specification language defining the interface to object types conforming to the ODMG Object Model. Often abbreviated by the acronym ODL. This language s purpose is to define the structure of an Entity relationship diagram. Contents 1 …   Wikipedia

  • Object Constraint Language — The Object Constraint Language (OCL) is a declarative language for describing rules that apply to Unified Modeling Language (UML) models developed at IBM and now part of the UML standard. Initially, OCL was only a formal specification language… …   Wikipedia

  • Query language — Query languages are computer languages used to make queries into databases and information systems. Broadly, query languages can be classified according to whether they are database query languages or information retrieval query languages. The… …   Wikipedia

  • Structured Query Language — SQL (das Kürzel für Structured Query Language; offizielle Aussprache [ɛskjuːˈɛl], häufig auch [ˈsiːkwəl] →SEQUEL), ist eine Datenbanksprache zur Definition, Abfrage und Manipulation von Daten in relationalen Datenbanken. SQL ist von ANSI und ISO… …   Deutsch Wikipedia

  • Structured query language — SQL Apparu en 1974 Auteur …   Wikipédia en Français

  • Structured Query Language — SQL Apparu en 1974 Auteur Donald D. Chamberlin et Raymond F. Boyce Développeur IBM Dernière version stabl …   Wikipédia en Français

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”