Difficulty: Easy
Correct Answer: Similar to SQL and uses a select-from-where structure
Explanation:
Introduction / Context:
OQL was designed to be familiar to practitioners of SQL while supporting object features such as path expressions and navigations through relationships. Its overall clause ordering and semantics strongly resemble SQL.
Given Data / Assumptions:
Concept / Approach:
OQL adopts the well-known select–from–where structure. The FROM clause introduces extents or collections; WHERE filters; SELECT projects results. Additional constructs (e.g., GROUP BY) may also appear, but the basic skeleton mirrors SQL.
Step-by-Step Solution:
Verification / Alternative check:
Textbook OQL examples consistently show SELECT–FROM–WHERE, often with path expressions in the select list or predicates.
Why Other Options Are Wrong:
Select-where (without FROM) and from-where omit essential structure.
“Not similar to SQL” contradicts the design goal of OQL.
Common Pitfalls:
Assuming OQL abandons relational thinking entirely; in practice it blends SQL familiarity with object navigation.
Final Answer:
Similar to SQL and uses a select-from-where structure
Discussion & Comments