Emesary: PHP example of class based inter-object communication
To take a high level view any system is built from a collection of parts - some of these parts need to perform a required job (the primary purpose) and the parts will need to interface to each other.
The database tier needs a defined API, after all accessing the database is the primary purpose.
This is where a set of classes with methods and properties is required.
During the operation of the database tier it may cause exceptions or failures to be raised. Also the database may need to communicate externally to any number of services that are not necessarily known at build time.