Posts tagged collection
Oracle & JDBC – Passing a 'table of custom object type' to a stored procedure – implementing efficient single round trip data exchange (part two of an ADF application on a PL/SQL API)
One very efficient way of passing data from the Java application to the database is through the use of custom Oracle Types. Even when we want to send a heterogeneous data set, for example a data set with master and details records, custom type based objects can provide a powerful exchange of data. However, also one that is not extremely straightforward to get started with. In this article an example of how to send a TABLE OF MY_TYPE objects as an input parameter to a stored PL/SQL procedure. (more…)
While preparing for a whole different topic, I had to create a few demonstrations of using custom SQL Types and Collections in both SQL and PL/SQL. While nothing spectacular – and for anyone who attended our 7Up class pretty familiar stuff – I thought an example of these small demos of how to create and use Type and Table of Type with for example the TABLE operator (to cast the Table of Type Collection into a relationally accessible construct) and the Merge operation as well as the Collect aggregator for producing quickly a Collection from the result of a simple SQL Query, might be useful. If for no one else, than for me – as I always tend to forget the exact syntax.
Note: all scripts are in a file you can download at the end of this article. (more…)