I am confused as when to go for stored procedures rather than embedded SQL in the code
When I googled out, I found out these points
- They allow modular programming.
- They can reduce network traffic.
- They can be used as a security mechanism.
Is please tell me how does network traffic is related to it ??
they can reduce network traffic by only returning the required data to the client.
Or to turn it around; a design/coding practice that can waste network traffic is to select a set of data from the DB, return it to the client and do processing there on some of the dataset. Obviously if you are working on some of the data set it would be better from a traffic perspective to not send to the client the data that is not being processed