As you have learned in Chapter 5, Coding with CQL, CQL supports the concepts of both streams and relations. Relations are an abstract definition that can represent a database table. So much so that in Chapter 7, Using Tables and Caches for Contextual Data, you learned how to populate a relation with data coming from either a RBMS table or a distributed cache. This is done by respectively specifying a table or a cache and linking them to a processor in the EPN.
However, there are cases where you may need additional flexibility when retrieving data from a RDBMS table to be used in CQL. For example, you may need to invoke some PL/SQL function, or you may want to aggregate the data in some particular way before getting the result into CQL for the processing of events.
This fine-grained control can be achieved by using the JDBC cartridge. The JDBC cartridge allows you to define CQL functions whose implementation are done in SQL, and return collections to be...