• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Paul Clapham
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Roland Mueller
  • Piet Souris
Bartenders:

Retrieving information for a collection of objects from database

 
Ranch Hand
Posts: 94
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi:
I am redesigning a module that has to get records from the database corresponding a collection of objects.

In the current implementation, for each object in a collection a JDBC call
is made to an oracle database and information for that object is obtained and mapped to an object. Obviously that causes a lot of database calls.

Is it possible to do this in a more efficient manner? How can I pass a collection of primary keys to a stored procedure and get a resultset that can be mapped back to the collection of primary keys? Is it possible using PL/SQL?

Thanks in advance for the help.
 
Ranch Hand
Posts: 1143
1
Eclipse IDE Oracle Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
p,


Is it possible using PL/SQL?


Yes, it is. Please see my reply in the topic Passing Arrays to Oracle stored procedures (in this forum).

Good Luck,
Avi.
 
reply
    Bookmark Topic Watch Topic
  • New Topic