Movatterモバイル変換


[0]ホーム

URL:


Jump to content
WikipediaThe Free Encyclopedia
Search

Object Query Language

From Wikipedia, the free encyclopedia
Query language for object-oriented databases
This article includes alist of references,related reading, orexternal links,but its sources remain unclear because it lacksinline citations. Please helpimprove this article byintroducing more precise citations.(March 2025) (Learn how and when to remove this message)

Object Query Language (OQL) is aquery language standard forobject-oriented databases modeled afterSQL and developed by theObject 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 asJDOQL andEJB 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 theCPU-speed of all PCs with more than 64MB ofRAM from a fictionalPC database:

SELECTpc.cpuspeedFROMPCspcWHEREpc.ram>64;

Query with grouping and aggregation

[edit]

The following example illustrates how one might retrieve the average amount ofRAM on aPC, grouped by manufacturer:

SELECTmanufacturer,AVG(SELECTpart.pc.ramFROMpartitionpart)FROMPCspcGROUPBYmanufacturer:pc.manufacturer;

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

See also

[edit]

References

[edit]
In current use
Proprietary
Superseded


Stub icon

Thissoftware-engineering-related article is astub. You can help Wikipedia byexpanding it.

Stub icon

Thisprogramming-language-related article is astub. You can help Wikipedia byexpanding it.

Retrieved from "https://en.wikipedia.org/w/index.php?title=Object_Query_Language&oldid=1317891148"
Categories:
Hidden categories:

[8]ページ先頭

©2009-2025 Movatter.jp