Cracks in the Foundation (PHP Advent)
Posted Dec 19, 2011 22:21 UTC (Mon) by adamg
In reply to: Cracks in the Foundation (PHP Advent)
Parent article: Cracks in the Foundation (PHP Advent)
A reasonable database layer allows one to switch database backends as needed. It allows me to change the backend driver (a one-line edit), and everything should still work afterwards.
That always makes me wonder, what kind of argument is that anyway? Do you really find yourself so often in situations where in the middle of the project you decide to switch database backend?
If a project developers write SQL queries that are so portable that it as easy to switch to another database backend as doing the mentioned s/my_/pg_/g (or equivalent), my guess is that they are not using much of the initial database features.
.. or maybe there is an easy way (which I don't know) to write stored procedures in a portable way.
to post comments)