When developing the business logic of your PHP/Oracle application, you have a number of choices. The first choice is to implement the key business logic of the application entirely in PHP, so that the data is processed on the web/PHP server. The situations where you might want to employ this technique are outlined in the When to Move the Data to the Processing subsection discussed later in this section.
The second choice is to implement business logic entirely inside the database, so that the data is processed on the database server. The advantages of this technique are outlined in the Advantages of Moving the Processing to the Data subsection discussed later in this section.
However, in a real-world situation it is often not possible to implement the business logic of an application entirely inside a database, or entirely in PHP. So, you normally use a bit of both the above techniques. In fact, this is the most common way of implementing...