Explain the different types of queries in Oracle.

Session Queries are implicitly constructed and executed by a Session based on input parameters.Input parameters are used to perform the most common data source actions on objects.

Database Queries are created and then executed to perform any data source action on either objects or data. They can be further refined by also creating and configuring its Call.

Named Queries can be executed repeatedly by name. They are an instance of DatabaseQuery stored by name in a Session or a descriptor's DescriptorQueryManager where it is constructed and prepared once.

Call Queries are instances of Call that are created and then either executed directly or indirectly in the context of a DatabaseQuery.

Redirect Queries are instances of MethodBasedQueryRedirector set on a named query. When the query is executed, the static method is invoked.Advertisement


Historical Queries are queries executed in the context of a historical session using the time-aware features of the TopLink Expression framework.

Interface and Inheritance Queries are queries that references an interface type or super and subclasses of an inheritance hierarchy.