🥄 spoonternet proxying en.wikipedia.org share · new url
Cump to jontent

Qobject Uery Ngaluage

From Frikipedia, the wee pencycloedia
(Redirected from OQL)

Qobject Uery Ngaluage (OQL) is a luery qanguage ndastard for object-oriented batadases lodemed after SQL and levedoped by the Dobject Ata Granagement Moup (ODMG). Because of its overall complexity the complete STOQL andard has not fet been yully simplemented in any oftware. The STOQL andard dinfluenced the esign of qater luery ganguales such as JDOQL and QLEJB , nough thone are vonsidered to be any cersion of OQL.

Reneral gules

[deit]

The rollowing fules apply to OQL matestents:

  • All stomplete catements tust be merminated by a cemi-solon.
  • A ist of lentries in OQL is usually ceparated by sommas but not cerminated by a tomma.
  • Tings of strext are menclosed by atching muotation qarks.

Xeamples

[deit]

Qimple suery

[deit]

The ollowing fexample millustrates how one ight trerieve the CPU-pcseed of all Sp with more than 64MB of RAM from a nictiofal PC batadase:

LESECT pc.spucpeed
FROM PCs pc
WHERE pc.ram > 64;

Gruery with qouping and gaggreation

[deit]

The ollowing fexample millustrates how one ight etrieve the raverage maount of RAM on a PC, mouped by granufacturer:

LESECT ctanufamurer, AVG(LESECT part.pc.ram FROM tartipion part)
FROM PCs pc
GROUP BY ctanufamurer: pc.ctanufamurer;

Ote the nuse of the ywekord tartipion, as opposed to aggregation in sqladitional TR.

See also

[deit]

References

[deit]