Layers

LAMP is all about layers. Passing data from a database up to a client. Each layer is responsible for translating the data from its source, to be ready for its destination.

Thus, if the database architecture is less than ideal, it should be masked by the PHP - so the javascript and HTML are not affected. That way, when improvements are made, the upper layers still work.

This is similar to the ISO model. Or is that OSI? The 7 layers (which may not be correct).

Physical
Data
Transport
Application
Message
Session
Presentation

You may say Linux and Apache are layers 1-3
PHP could be layers 4-6
MySQL could be layers 2 and 3
HTML/javascript could be layer 7