What do I gain if I use Doctrine's Database Abstraction Layer (DBAL) over simple PDO?
Isn't PDO supposed to be an abstraction layer itself? As far as I can tell, the only benefit I gain is the ability to use Oracle's oci8 driver with a PDO-like API.
What am I missing?
The benefit of any DB abstraction layer is reducing the number of developer's errors (not only this).
The difference between them, is the level of an abstraction. For example, DBAL built on top of PDO. This means, DBAL should definitely be a bit higher level of abstraction than PDO.
Anyway, both of them are very low level of an abstraction. You should use them only if you have good knowledge of relative DBs. I mean, you should know all types of stored data, and use it right way, also you should have some experience in building of different DB architectures, and know the advantages of every relation type.
If not, I suggest you to use something higher abstracted (Eloquent for example).
PS I know all what I wrote above, but anyway I use the abstraction layer built on top of Eloquent. So, I see the sense of using the highest level of abstraction I have...
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With