Which approach would meet the response time requirement with minimal overhead?

You are implementing an online music that will store and play a user’s collection of songs.
You want users to rate their songs and view the top songs from friends. All queries must
complete in four seconds or less. Which approach would meet the response time
requirement with minimal overhead?

You are implementing an online music that will store and play a user’s collection of songs.
You want users to rate their songs and view the top songs from friends. All queries must
complete in four seconds or less. Which approach would meet the response time
requirement with minimal overhead?

A.
Java class that uses JDBC with embedded SQL

B.
Java class that uses an optimized stored procedure

C.
JPA entity class with a lazy fetching strategy

D.
JPA entity class with an eager fetching strategy

Explanation:



Leave a Reply 2

Your email address will not be published. Required fields are marked *


Ashishkumar

Ashishkumar

B is correct answer.

Reason : All queries must complete in four seconds or less

Ashishkumar

Ashishkumar

Stored procedure are not good from 2 points – 1. scaling database (above question doesnt talk about scalability at all) and 2. portability to other db – which again is not given as requirement

So B is right