fbpx
Wikipedia

Object Query Language

Object Query Language (OQL) is a query language standard for object-oriented databases modeled after SQL and developed by the Object Data Management Group (ODMG). Because of its overall complexity the complete OQL standard has not yet been fully implemented in any software. The OQL standard influenced the design of later query languages such as JDOQL and EJB QL, though none are considered to be any version of OQL.

General rules edit

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 edit

Simple query edit

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 edit

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.

See also edit

object, query, language, this, article, multiple, issues, please, help, improve, discuss, these, issues, talk, page, learn, when, remove, these, template, messages, this, article, does, cite, sources, please, help, improve, this, article, adding, citations, re. This article has multiple issues Please help improve it or discuss these issues on the talk page Learn how and when to remove these template messages This article does not cite any sources Please help improve this article by adding citations to reliable sources Unsourced material may be challenged and removed Find sources Object Query Language news newspapers books scholar JSTOR June 2012 Learn how and when to remove this template message An editor has performed a search and found that sufficient sources exist to establish the subject s notability Please help improve this article by adding citations to reliable sources Unsourced material may be challenged and removed Find sources Object Query Language news newspapers books scholar JSTOR July 2022 Learn how and when to remove this template message Learn how and when to remove this template message Object Query Language OQL is a query language standard for object oriented databases modeled after SQL and developed by the Object Data Management Group ODMG Because of its overall complexity the complete OQL standard has not yet been fully implemented in any software The OQL standard influenced the design of later query languages such as JDOQL and EJB QL though none are considered to be any version of OQL Contents 1 General rules 2 Examples 2 1 Simple query 2 2 Query with grouping and aggregation 3 See alsoGeneral rules editThe 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 editSimple query edit 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 gt 64 Query with grouping and aggregation edit 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 See also editObject Data Management Group ODMG Object Definition Language nbsp This software engineering related article is a stub You can help Wikipedia by expanding it vte nbsp This programming language related article is a stub You can help Wikipedia by expanding it vte Retrieved from https en wikipedia org w index php title Object Query Language amp oldid 1097649686, wikipedia, wiki, book, books, library,

article

, read, download, free, free download, mp3, video, mp4, 3gp, jpg, jpeg, gif, png, picture, music, song, movie, book, game, games.