Object Query Language: Difference between revisions
Moved page from wikipedia:en:Object Query Language ([[Edithistory:|history]]) |
m automatic correction by IA |
||
| Line 10: | Line 10: | ||
{{Sources exist|date=July 2022}} | {{Sources exist|date=July 2022}} | ||
}} | }} | ||
'''Object Query Language''' ('''OQL''') is a [[query language]] standard for [[object database|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. | '''Object Query Language''' ('''OQL''') is a [[query language]] standard for [[object database|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== | ==General rules== | ||
The following rules apply to OQL statements: | The following rules apply to OQL statements: | ||
* All complete statements must be terminated by a | * All complete statements must be terminated by a semicolon. | ||
* A list of entries in OQL is usually separated by commas but not terminated by a comma(,). | * 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. | * Strings of text are enclosed by matching quotation marks. | ||
==Examples== | ==Examples== | ||
===Simple query=== | ===Simple query=== | ||
The following example illustrates how one might retrieve the [[CPU]] | The following example illustrates how one might retrieve the [[CPU]] speed of all PCs with more than 64MB of [[random-access memory|RAM]] from a fictional [[Personal computer|PC]] database: | ||
<syntaxhighlight lang="sql"> | <syntaxhighlight lang="sql"> | ||
Latest revision as of 11:52, 4 May 2026
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
The following rules apply to OQL statements:
- All complete statements must be terminated by a semicolon.
- 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.
See also
- Object Data Management Group (ODMG)
- Object Definition Language
References
| This software-engineering-related article is a stub. You can help EverybodyWiki by expanding it. |
| This programming-language-related article is a stub. You can help EverybodyWiki by expanding it. |
This article "Object Query Language" is from Wikipedia. The list of its authors can be seen in its historical and/or the page Edithistory:Object Query Language. Articles copied from Draft Namespace on Wikipedia could be seen on the Draft Namespace of Wikipedia and not main one.
