Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Single Stored Procedure which will fetch multiple tables and return a common structure

1038606Oct 28 2014 — edited Oct 29 2014

I have a scenario where i have to show a screen which has multiple data fetched from different tables using complex joins etc.,

There will be only one service call from ui to fetch those in JSON format.

Following are the approaches that came to my mind

1) Execute Multiple queries from service layer and populate Object and send the JSON object back.

2) Create a temp table, populate the data required as when the original data is updated.And query the temp table when the above screen is displayed.

For me both are the approaches are not convincing.I don't want multiple db calls from service layer or create temp table for this purpose. Rather iam thinking to have one Stored PRocedure which will execute mutiple queries within and return Custom structure which can be mapped to Java Object which in turn will be returned to UI Layer.

IS this POssible?

Any Suggestions?

Thanks.

Regards

Senthil Kumar Sekar

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 26 2014
Added on Oct 28 2014
7 comments
1,202 views